[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: Fri, 08 Dec 2023 13:56:33 +0000

Kenny Ballou <kb@devnulllabs.io> writes:

> * org-capture.el (org-capture-fill-template): fill %K values using org
> ID's if `org-id-link-to-org-use-id' is non-nil.
> * doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.

Thanks for the patch!

> +                  (if org-id-link-to-org-use-id
> +                      (org-link-make-string
> +                       (format "id:%s" (org-id-get org-clock-marker))
> +                       v-k)

`org-id-link-to-org-use-id' may have a number of non-nil values with
slightly different behaviour: t, create-if-interactive,
create-if-interactive-and-no-custom-id, use-existing, nil.

Your patch will only work as expected for t and nil values, but not for
others. You may consider leveraging `org-store-link' to account for all
the possibilities.

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]