summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-02-22 21:46:08 -0500
committerKyle Meyer <kyle@kyleam.com>2016-02-22 21:46:08 -0500
commitda5ae89315f2571c6b68a81db1b75c22d203c613 (patch)
tree85ac2ce55263c9a060dafab21790d5750989ab98
parent627fb5c27515ea0b1950251475550fe175b8ca00 (diff)
downloademacs.d-da5ae89315f2571c6b68a81db1b75c22d203c613.tar.gz
Add org-agenda-set-restriction-lock variant
-rw-r--r--init.el5
-rw-r--r--lisp/km-org.el9
2 files changed, 13 insertions, 1 deletions
diff --git a/init.el b/init.el
index 0f891a0..febceea 100644
--- a/init.el
+++ b/init.el
@@ -316,7 +316,10 @@
(add-hook 'org-agenda-finalize-hook #'km/org-agenda-store-current-span)
(add-to-list 'org-agenda-bulk-custom-functions
- '(?D km/org-agenda-delete-subtree)))
+ '(?D km/org-agenda-delete-subtree))
+
+ (define-key org-mode-map [remap org-agenda-set-restriction-lock]
+ #'km/org-agenda-set-restriction-lock))
(after 'ox-md
(advice-add 'org-md-paragraph :filter-return #'km/org-md-fill-string))
:config
diff --git a/lisp/km-org.el b/lisp/km-org.el
index 74f7eb7..7f4d5da 100644
--- a/lisp/km-org.el
+++ b/lisp/km-org.el
@@ -370,6 +370,15 @@ displayed in the agenda."
(interactive)
(org-agenda-archive-with #'km/org-delete-subtree))
+;;;###autoload
+(defun km/org-agenda-set-restriction-lock (&optional type)
+ "Call `org-agenda-set-restriction-lock' with flipped C-u meaning."
+ (interactive "P")
+ (org-agenda-set-restriction-lock
+ (cond ((equal type '(4)) nil)
+ (type)
+ (t '(4)))))
+
;;; Refiling