Now showing

Emacs: tone down Org citations on demand

Documentaries & Learning2024Creative Commons
Poster for Emacs: tone down Org citations on demand

About this film

This is a short video demonstration of how I tone down Org citations using some custom code I wrote. I share the code and its annotated version. See the following two sections. The code without any commentary UPDATE 2024-12-26 20:02 +0200: I updated the code to include the save-excursion , which I forgot to cover in my original publication. The annotated version has the same update. UPDATE 2024-12-29 10:33 +0200: Also check the code of JD Smith, which relies on the Org API to achieve this result: https://gist.github.com/jdtsmith/d49eaaae852c5496a80e2489014bc41c . In principle, this is a more reliable approach than using regular expressions. Still, what I provide below is useful in general. The annotated version is in the next section. (defvar prot-org-cite-regexp "\\(?1:cite: ?\\)?\\(?2:@\\)\\(?:[a-z]+\\)\\(?3:.*?\\)\\(?:[0-9]\\{4,\\}\\)\\(?:[a-z]\\)?" "Regular expression matching an Org citation. Groups 1, 2, and 3 are meant to be hidden when the minor mode `prot-org-cite-mode' is enabled.") (defun prot-org-cite-add-overlays () "Add invisible overlays to `prot-org-cite-regexp' numbered groups." (let ((case-fold-search nil)) (save-excursion (save-restriction (widen) (goto-char (poi…

Directors & creators

Protesilaos Stavrou

View on archive.org ↗

More from this pool

Documentaries & Learning

See all →