org-store-link: Fix for sticky agenda buffers

* lisp/ol.el: Do not assume a single agenda buffer at a time.  Simply
check if we are in a buffer with `org-agenda-mode' active.
This commit is contained in:
Ihor Radchenko 2022-10-16 16:21:31 +08:00
parent e47e9aa079
commit 15b3aa43a8
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -1609,7 +1609,7 @@ non-nil."
(t (setq link nil)))))
;; We are in the agenda, link to referenced location
((equal (bound-and-true-p org-agenda-buffer-name) (buffer-name))
((eq major-mode 'org-agenda-mode)
(let ((m (or (get-text-property (point) 'org-hd-marker)
(get-text-property (point) 'org-marker))))
(when m