Homepage: https://git.kyleam.com/org-link-edit/about
Author: Kyle Meyer
Updated:
Slurp and barf with Org links
Org Link Edit provides Paredit-inspired slurping and barfing
commands for Org link descriptions.
There are four slurp and barf commands, all which operate when
point is on an Org link.
- org-link-edit-forward-slurp
- org-link-edit-backward-slurp
- org-link-edit-forward-barf
- org-link-edit-backward-barf
Org Link Edit doesn't bind these commands to any keys. Finding
good keys for these commands is difficult because, while it's
convenient to be able to quickly repeat these commands, they won't
be used frequently enough to be worthy of a short, repeat-friendly
binding. Using Hydra [1] provides a nice solution to this. After
an initial key sequence, any of the commands will be repeatable
with a single key. (Plus, you get a nice interface that displays
the key for each command.) Below is one example of how you could
configure this.
(define-key org-mode-map YOUR-KEY
(defhydra hydra-org-link-edit ()
"Org Link Edit"
("j" org-link-edit-forward-slurp "forward slurp")
("k" org-link-edit-forward-barf "forward barf")
("u" org-link-edit-backward-slurp "backward slurp")
("i" org-link-edit-backward-barf "backward barf")
("q" nil "cancel")))
In addition to the slurp and barf commands, the command
`org-link-edit-transport-next-link' searches for the next (or
previous) link and moves it to point, using the word at point or
the selected region as the link's description.
[1] https://github.com/abo-abo/hydra