mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 19:37:52 +00:00
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
This commit is contained in:
parent
702b0a81e1
commit
df0e96ba42
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue