emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/org df0e96ba42 1/2: org-agenda-remove-restriction-lock:


From: ELPA Syncer
Subject: [elpa] externals/org df0e96ba42 1/2: org-agenda-remove-restriction-lock: Remove 'file restriction
Date: Sun, 17 Jul 2022 08:57:40 -0400 (EDT)

branch: externals/org
commit df0e96ba42151542ed8dc24cb91e725632fd10a7
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-agenda-remove-restriction-lock: Remove 'file restriction
    
    * lisp/org-agenda.el (org-agenda-remove-restriction-lock): Remove
    agenda restriction set by `org-agenda-set-restriction-lock' called
    with prefix argument.  `org-agenda-restrict' may be nil while
    `org-agenda-overriding-restriction' is non-nil.
    
    Fixes https://list.orgmode.org/87v8w2qdgp.fsf@gmail.com
---
 lisp/org-agenda.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 305460b819..ace76729f4 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7924,11 +7924,14 @@ subtree."
 (defun org-agenda-remove-restriction-lock (&optional noupdate)
   "Remove agenda restriction lock."
   (interactive "P")
-  (if (not org-agenda-restrict)
+  (if (not (or org-agenda-restrict org-agenda-overriding-restriction))
       (message "No agenda restriction to remove.")
     (delete-overlay org-agenda-restriction-lock-overlay)
     (delete-overlay org-speedbar-restriction-lock-overlay)
     (setq org-agenda-overriding-restriction nil)
+    (unless org-agenda-keep-restricted-file-list
+      ;; There is a request to keep the file list in place
+      (put 'org-agenda-files 'org-restrict nil))
     (setq org-agenda-restrict nil)
     (put 'org-agenda-files 'org-restrict nil)
     (move-marker org-agenda-restrict-begin nil)



reply via email to

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