* Org-capture %K "Link to the currently clocked task" link with id?
@ 2021-05-19 13:26 Nathaniel W Griswold
2021-05-19 17:29 ` Nathaniel W Griswold
0 siblings, 1 reply; 4+ messages in thread
From: Nathaniel W Griswold @ 2021-05-19 13:26 UTC (permalink / raw)
To: emacs-orgmode
Looking at the source (org-capture.el), it appears org-capture doesn't allow you to make a permalink for "Link to the currently clocked task", or %K in your template.
`org-capture-fill-template` looks like this:
...
(v-K (if (marker-buffer org-clock-marker)
(org-link-make-string
(format "%s::*%s"
(buffer-file-name (marker-buffer org-clock-marker))
v-k)
v-k)
""))
...
So i guess it's hardcoded to just make a bracket link.
I guess i can hack something, but can you guys make a nice change to the source so that i can have a permalink to my clocked in task? Or is there something i'm missing and i can actually do it already?
Thank you
Nate
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Org-capture %K "Link to the currently clocked task" link with id?
2021-05-19 13:26 Org-capture %K "Link to the currently clocked task" link with id? Nathaniel W Griswold
@ 2021-05-19 17:29 ` Nathaniel W Griswold
2021-05-24 12:25 ` Nathaniel W Griswold
0 siblings, 1 reply; 4+ messages in thread
From: Nathaniel W Griswold @ 2021-05-19 17:29 UTC (permalink / raw)
To: emacs-orgmode
Rereading my message, i realized it might not be clear what i mean here.
I use (org-id-link-to-org-use-id t) because i like to be able to still follow links after i archive stuff. I want that behavior here so i want the link to an `id:<UUID>` link instead of a `file:/path/to/file` link.
Nate
> On May 19, 2021, at 8:26 AM, Nathaniel W Griswold <nate@manicmind.earth> wrote:
>
> Looking at the source (org-capture.el), it appears org-capture doesn't allow you to make a permalink for "Link to the currently clocked task", or %K in your template.
>
> `org-capture-fill-template` looks like this:
>
> ...
> (v-K (if (marker-buffer org-clock-marker)
> (org-link-make-string
> (format "%s::*%s"
> (buffer-file-name (marker-buffer org-clock-marker))
> v-k)
> v-k)
> ""))
> ...
>
> So i guess it's hardcoded to just make a bracket link.
>
> I guess i can hack something, but can you guys make a nice change to the source so that i can have a permalink to my clocked in task? Or is there something i'm missing and i can actually do it already?
>
> Thank you
>
> Nate
^ permalink raw reply [flat|nested] 4+ messages in thread
* Org-capture %K "Link to the currently clocked task" link with id?
2021-05-19 17:29 ` Nathaniel W Griswold
@ 2021-05-24 12:25 ` Nathaniel W Griswold
2021-05-29 8:10 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Nathaniel W Griswold @ 2021-05-24 12:25 UTC (permalink / raw)
To: emacs-orgmode
>
> On May 19, 2021, at 8:26 AM, Nathaniel W Griswold <nate@manicmind.earth> wrote:
>
> Looking at the source (org-capture.el), it appears org-capture doesn't allow you to make a permalink for "Link to the currently clocked task", or %K in your template.
>
> I use (org-id-link-to-org-use-id t) because i like to be able to still follow links after i archive stuff. I want that behavior here so i want the link to an `id:<UUID>` link instead of a `file:/path/to/file` link.
Would a patch for this be welcome? Does anyone have any suggestions or ideas? I was thinking it should just respect current value of `org-id-link-to-org-use-id` but maybe there should be something more specific?
Thanks!
Nate
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Org-capture %K "Link to the currently clocked task" link with id?
2021-05-24 12:25 ` Nathaniel W Griswold
@ 2021-05-29 8:10 ` Ihor Radchenko
0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2021-05-29 8:10 UTC (permalink / raw)
To: Nathaniel W Griswold; +Cc: emacs-orgmode
Nathaniel W Griswold <nate@manicmind.earth> writes:
> Would a patch for this be welcome? Does anyone have any suggestions or ideas? I was thinking it should just respect current value of `org-id-link-to-org-use-id` but maybe there should be something more specific?
Sounds useful to me. Ideally, it would be even better to remove
hard-coded replacements in org-capture-fill-template and use some kind
of (?char . #'fill-function) alist to allow more flexibility.
Best,
Ihor
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-29 8:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 13:26 Org-capture %K "Link to the currently clocked task" link with id? Nathaniel W Griswold
2021-05-19 17:29 ` Nathaniel W Griswold
2021-05-24 12:25 ` Nathaniel W Griswold
2021-05-29 8:10 ` Ihor Radchenko
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).