emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH 1/2] Redo Agenda in more cases even in sticky mode


From: Nikolai Weibull
Subject: [O] [PATCH 1/2] Redo Agenda in more cases even in sticky mode
Date: Thu, 20 Aug 2015 20:25:32 +0200

* 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.
---
 lisp/org-agenda.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 07b77ac..5fd1cd4 100644
--- a/lisp/org-agenda.el
+++ b/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)
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]