I know about the %a
template element, which inserts the stored link in the entry. I'd also like to automatically store a link whenever org-capture
is called from within emacs (as opposed to spawning a capture window externally via emacsclient
).
This would be useful, for example, when coding and needing to capture a task relevant to the passage of code I'm currently writing, or when I'm reading email and decide the current email needs to become a task.
When appropriate, I'd like to include the line number in the link.
Is this something that's already built in, or would it require a custom lisp function? I'm thinking I can probably advise org-capture
to run org-store-link
first, but perhaps there's a better idea.