Hi list,
in my configuration I require org-git-link to provide org links to
specific file versions. This means that for org-capture-templates, the
annotation "%a" will insert the org-git-link for org files under git
version control. However, I would like to insert the "usual" org link
("org" or "id"), which manually can be called with "C-u C-u C-c C-l". I
tried defining a function that emulates the prefix arg thus:
(defun peru/org-store-link ()
(setq current-prefix-arg '(16))
(call-interactively 'org-store-link "org")
)
Calling (peru/org-store-link) from within an org file works as expected,
but I can't get the capture template to work. The template is defined as
(setq org-capture-templates (quote
(("w" "test" entry
(file "~/Org/refile.org")
"* TODO %? %^G\n%u\n%(peru/org-store-link)\n\n" :prepend t)
))
which produces the following:
* TODO
[2016-10-09 Sun]
%![Error: (user-error No method for storing a link from this buffer)]
Any help would be appreciated.
Cheers,
Per