From: rearman Date: Thu, 9 May 2024 20:51:01 +0000 (-0400) Subject: Add defun and binding for custom agenda on single key X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=57baec0438af736287a6c1f69d29a0658745fd3b;p=emacsinit.git Add defun and binding for custom agenda on single key --- diff --git a/init.org b/init.org index aa2d09c..ebba86b 100644 --- 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 "" 'org-agenda-show-custom))) +#+END_SRC + *** Templates :PROPERTIES: :ID: ab7c773c-5a03-4c7b-be8a-318f2b3fd0db