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

2023-12-11 Thread Kenny Ballou
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

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

2023-12-11 Thread Kenny Ballou
* org-capture.el (org-capture-fill-template): fill %K values using link value from `org-store-link', which respects `org-id-link-to-use-id'. * doc/ORG-NEWS: (Template variable expansion %K) Document new behavior. Reported-by: Nathaniel W Griswold Signed-off-by: Kenny Ballou Link: https://list.o

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

2023-12-11 Thread Kenny Ballou
On 2023-12-10 12:19 GMT, Ihor Radchenko wrote: > Kenny Ballou writes: > >> >> 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, inst

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

2023-12-10 Thread Kenny Ballou
* 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. Reported-by: Nathaniel W Griswold Signed-off-by: Kenny Ballou Link: https://list.orgmode.org/EF459D47-FC

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

2023-12-10 Thread Kenny Ballou
e `save-window-excursion' or the `org-clock-goto' would really break things. If there's a better approach for getting the link, I'm all ears. >From e618508cdfbf899b93d5081aeec3eda18d5bd306 Mon Sep 17 00:00:00 2001 From: Kenny Ballou Date: Thu, 7 Dec 2023 10:29:46 -0700 Subj

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

2023-12-10 Thread Kenny Ballou
On 2023-12-08 13:56 GMT, Ihor Radchenko wrote: > Kenny Ballou writes: >> + (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-

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

2023-12-10 Thread Ihor Radchenko
Kenny Ballou 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

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

2023-12-08 Thread Ihor Radchenko
Kenny Ballou writes: > I'm currently struggling through modifying it to work with > `org-store-link'. Something, save-excursion -> org-clock-goto -> > org-store-link -> org-insert-link is what I'm trying for now, but that's > not quite working. I'll come back to this in a few hours. The last s

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

2023-12-08 Thread Ihor Radchenko
Kenny Ballou 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 > +