Browse Source

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.
Ihor Radchenko 1 year ago
parent
commit
15b3aa43a8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/ol.el

+ 1 - 1
lisp/ol.el

@@ -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