From a0a26cddda56e493322de3926b1f9eedfde18332 Mon Sep 17 00:00:00 2001 From: Bernt Hansen Date: Fri, 30 Dec 2011 05:49:07 -0500 Subject: [PATCH] Honour existing restrictions when regenerating the agenda * lisp/org.el: Honour existing restrictions when regenerating the agenda Narrowed org buffers are now retained when regenerating the agenda with org-agenda-redo --- lisp/org.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 4251a0710..78dfd4afc 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16498,13 +16498,13 @@ When a buffer is unmodified, it is just killed. When modified, it is saved (rea (concat ":" org-archive-tag ":")) bmp file re) (save-excursion - (save-restriction - (while (setq file (pop files)) - (catch 'nextfile - (if (bufferp file) - (set-buffer file) - (org-check-agenda-file file) - (set-buffer (org-get-agenda-file-buffer file))) + (while (setq file (pop files)) + (catch 'nextfile + (if (bufferp file) + (set-buffer file) + (org-check-agenda-file file) + (set-buffer (org-get-agenda-file-buffer file))) + (save-restriction (widen) (setq bmp (buffer-modified-p)) (org-refresh-category-properties)