[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lisp/org-capture.el: use link ID's for %K

From: Ihor Radchenko
Subject: Re: [PATCH] lisp/org-capture.el: use link ID's for %K
Date: Sun, 10 Dec 2023 12:19:21 +0000

Kenny Ballou <kb@devnulllabs.io> writes:

>> The last step is unnecessary. You may just examine `org-stored-links'
>> (documented in the docstring of `org-store-link') or
>> `org-store-link-plist' (undocumented, but containing more info and also
>> used by `org-capture-fill-template').
> I ended up using `org-store-link-plist'.  For some reason that I don't
> understand, the `save-excursion' -> `org-store-link' was not updating
> `org-stored-links'.

I can see it from the code now. Basically, instead of updating
`org-stored-links', `org-store-link' returns the link when called
non-interactively (with nil INTERACTIVE? argument).
Now documented on main.

> ... Similarly, I had to use `save-window-excursion' or
> the `org-clock-goto' would really break things.

You should not use `org-clock-goto' - it is intended for interactive use
and does a lot of unnecessary work.
You may instead do (org-with-point-at org-clock-marker ...)

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]