Browse Source

Redo Agenda in more cases even in sticky mode

* org-agenda.el (org-agenda-maybe-redo): Test for
org-agenda-this-buffer-name as well.

The Agenda buffer will have a different name if it’s in sticky mode,
but some commands that alter the agenda should still redo it, for
example, org-agenda-remove-restriction-lock, just like
org-agenda-filter-by-category does.
Nikolai Weibull 6 years ago
parent
commit
983170c0bc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org-agenda.el

+ 3 - 1
lisp/org-agenda.el

@@ -7169,7 +7169,9 @@ in the file.  Otherwise, restriction will be to the current subtree."
 
 (defun org-agenda-maybe-redo ()
   "If there is any window showing the agenda view, update it."
-  (let ((w (get-buffer-window org-agenda-buffer-name t))
+  (let ((w (get-buffer-window (or org-agenda-this-buffer-name
+				  org-agenda-buffer-name)
+			      t))
 	(w0 (selected-window)))
     (when w
       (select-window w)