Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
# This file: # http://angg.twu.net/ORG/emacsconf2022-kla.org.html # http://angg.twu.net/ORG/emacsconf2022-kla.org # (find-angg "ORG/emacsconf2022-kla.org") # Author: Eduardo Ochs <eduardoochs@gmail.com> # # (defun eklo () (interactive) (find-angg "ORG/emacsconf2022-kla.org")) # # Some eev-isms: # (defun b () (interactive) (find-TH "emacsconf2022-kla")) # (defun c () (interactive) (eek "C-c C-e h h")) # (defun o () (interactive) (find-angg "ORG/emacsconf2022-kla.org")) # (defun oo () (interactive) (find-angg "emlua/README.org")) # (defun cv () (interactive) (c) (v)) # (defun v () (interactive) (brg "~/ORG/emacsconf2022-kla.html")) # #+OPTIONS: toc:nil #+TITLE: Bidirectional links with eev #+AUTHOR: Eduardo Ochs #+EMAIL: eduardoochs@gmail.com Consider the two sexps below: #+begin_src elisp (code-c-d "foobar" "/tmp/foo/bar/" :anchor) (code-c-d "fb" "/tmp/foo/bar/" :anchor) #+end_src Each one of them defines several "short hyperlink" functions. After running them the three sexps below are roughly equivalent: #+begin_src elisp (find-file "/tmp/foo/bar/plic.txt") (find-foobarfile "plic.txt") (find-fbfile "plic.txt") #+end_src The "~code-c-d~"s above also define functions with even shorter names -- ~find-foobar~ and ~find-fb~ - that point to "anchors" in files in the directory ~/tmp/foo/bar/~. The three sexps below are roughly equivalent - #+begin_src elisp (find-fline "/tmp/foo/bar/plic.txt" "«bletch»") (find-foobar "plic.txt" "bletch") (find-fb "plic.txt" "bletch") #+end_src Until feb/2022 the only way that I had to produce these hyperlinks to anchors quickly required a LOT of muscle memory... I had to type this, #+begin_src M-1 M-h M-w M-h M-h 9*<down> M-h M-2 M-h M-y M-h M-- M-h M-w M-k #+end_src where the number of "~<down>~"s depended on whether I preferred ~find-foobar~ of ~find-fb~ - i.e., of on what is my preferred "code" for the "directory" ~/tmp/foo/bar/~; either "~foobar~" or "~fb~". In this presentation I will show a much better way to generate short hyperlinks to anchors and push these short hyperlinks to the kill ring, and how I use that to create bidirectional hyperlinks between my notes on a language $LANGUAGE and programs written in that language. For more info see [[http://angg.twu.net/emacsconf2022-kla.html][this page]]. # Local Variables: # coding: utf-8-unix # modes: (org-mode fundamental-mode) # org-html-postamble: nil # End: