reddit / emacs

Storing links from an agenda buffer when `org-agenda-sticky` is set to `t`

graduale · 2022-02-24 21:30
Out of the box, calling `org-store-link` when point is on a headline displayed on an agenda view behaves as you would expect: it does much what it would have done had you called `org-store-link` from an `org-mode` buffer visiting the relevant file with point on the same headline. But if you set `org-agenda-sticky` to `t` , calling `org-store-link` from an agenda buffer gives the following error: user-error: No method for storing a link from this buffer After digging around a bit I think I found the culprit: for the agenda relevant behavior of `org-store-link` to be activated, you need to be in a buffer with the name specified in `org-agenda-buffer-name`. On my end, `org-agenda-buffer-name` is set to `*Org Agenda*`, but when `org-agenda-sticky` is set to `t`, agenda buffers have a different name of the form `*Org Agenda(VIEW)*`, where `VIEW` is the key to the relevant agenda view (so, e.g. `*Org Agenda(a)*`). Now, if I set `org-agenda-buffer-name` to e.g. `*Org Agenda(a)*`, I get `org-store-link` to work as expected when visiting an agenda buffer with that name. But I do not seem to be able to use `org-agenda-buffer-name` to get Emacs to recognize an agenda buffer when `org-agenda-sticky` is set to `t`. Any ideas?
yantar92 · 2022-10-16 08:22
Will be fixed in the next Org release. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=15b3aa43a8193d6d9e712ee7271ced29c2bc5311
graduale · 2022-10-16 14:16
Thanks for the update!