From: Per Unneberg <punneberg@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-store-link and org-git-link
Date: Sun, 09 Oct 2016 14:21:12 +0200 [thread overview]
Message-ID: <87a8edaf2f.fsf@gmail.com> (raw)
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
reply other threads:[~2016-10-09 12:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8edaf2f.fsf@gmail.com \
--to=punneberg@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).