[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] org-store-link and org-git-link
From: |
Per Unneberg |
Subject: |
[O] org-store-link and org-git-link |
Date: |
Sun, 09 Oct 2016 14:21:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] org-store-link and org-git-link,
Per Unneberg <=