emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nathan Neff <nathan.neff@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Org-capture %a expansion - create ID link
Date: Wed, 25 Sep 2019 15:28:23 -0500	[thread overview]
Message-ID: <CAC=HedDexkcYqmmBHT94NYP9cK1AdzuqVRpn62vfkBT+1GrQKQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]

Hello all,

I'm using capture templates with the %a expansion element [1]

The documentation says:  "Annotation, normally the link created with
org-store-link."

The expansion results in links like this:
file:~/org-mode/inbox.org::*Heading

This not really so good, because I routinely refile things in my inbox -
which
renders the link useless.

Is there a way to force org-capture to generate a link with a globally
unique ID?

A brief look at the code
https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-capture.el#L631
seems to suggest
that org-store-link is called with a nil argument - I don't know what that
exactly does but I wonder if that's what is causing the generated link to
behave differently than when org-store-link is called interactively?

I would also like a globally unique ID generated for the currently clocked
item (the %K expansion
element), but hey, one thing at a time, right? :-)

Any ideas?

Thanks,
--Nate

[1] https://orgmode.org/manual/Template-expansion.html#Template-expansion

[-- Attachment #2: Type: text/html, Size: 1641 bytes --]

                 reply	other threads:[~2019-09-25 20:27 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='CAC=HedDexkcYqmmBHT94NYP9cK1AdzuqVRpn62vfkBT+1GrQKQ@mail.gmail.com' \
    --to=nathan.neff@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).