]> git.earman.xyz Git - emacsinit.git/commitdiff
Add defun and binding for custom agenda on single key
authorrearman <rearman@r717.net>
Thu, 9 May 2024 20:51:01 +0000 (16:51 -0400)
committerrearman <rearman@r717.net>
Thu, 9 May 2024 20:51:01 +0000 (16:51 -0400)
init.org

index aa2d09c3cde7dca7784187799f9c6fb5eb6a7126..ebba86b7c9bed5f96b8d0d78994789e74fc75418 100644 (file)
--- a/init.org
+++ b/init.org
@@ -835,6 +835,22 @@ Resume clocking when emacs restarts, save&load running clock and history on exit
       org-pretty-entities t)
 #+END_SRC
 
+**** Custom Agenda on Single key
+:PROPERTIES:
+:ID:       c921d7e6-63ef-4a89-851a-0f3a122e9fa0
+:END:
+Stolen from [[https://emacs.stackexchange.com/questions/864/how-to-bind-a-key-to-a-specific-agenda-command-list-in-org-mode][Stack Exchange]]
+#+BEGIN_SRC emacs-lisp
+(defun org-agenda-show-custom (&optional arg)
+  "Show my custom agenda."
+  (interactive "P")
+  (org-agenda arg " "))
+
+(add-hook 'org-mode-hook
+          (lambda ()
+            (keymap-set org-mode-map "<f2>" 'org-agenda-show-custom)))
+#+END_SRC
+
 *** Templates
 :PROPERTIES:
 :ID:       ab7c773c-5a03-4c7b-be8a-318f2b3fd0db