emacs-orgmode
[Top][All Lists]
Advanced

[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: Kenny Ballou
Subject: Re: [PATCH] lisp/org-capture.el: use link ID's for %K
Date: Mon, 11 Dec 2023 14:21:41 -0700
User-agent: mu4e 1.10.8; emacs 30.0.50

On 2023-12-11 19:16 GMT, Ihor Radchenko wrote:
>
>> +*** Capture template expansion now supports ID links
>> +
>> +The capture template expansion element `%K' creates links using
>> +`org-store-link', which respects the values of
>> +`org-id-link-to-use-id'.
>
> Here, we simply use Org markup. So, =%K=, ~org-store-link~, and 
> ~org-id-link-to-use-id~.
> See doc/Documentation_Standards.org for details.

I'll update for the new patch version.

>
>> +                  (save-excursion
>
> `save-excursion' should be unnecessary here. `org-with-point-at' already
> takes care about restoring window configuration and point.
>

Correct, I'll remove it.  The patch is now much simpler :)

>> +                    (org-with-point-at org-clock-marker
>> +                      (substring-no-properties (org-store-link 
>> current-prefix-arg nil))))
>>              ""))
>
> Using `current-prefix-arg' is incorrect here.
> `org-capture-fill-template' is called from `org-capture' that assigns a
> completely different meaning to the prefix argument (see the
> docstring).
>

Okay, I'll pass `nil' instead.  I'm not sure any other value makes
sense.

> Also, why `substring-no-properties'?

I figured the link should not come with the face properties inherited
from `org-store-link'.  If that's incorrect, I'll drop it.  It seems to
work either way.

-- 
-Kenny



reply via email to

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