From 5b1bd4f2e6501a09370fbead87eedb2495b6246d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 28 Aug 2023 19:11:51 -0600 Subject: [PATCH] [Emacs] Add a function to lower org priorities by 1 --- dotfiles/emacs.d/org-config.org | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dotfiles/emacs.d/org-config.org b/dotfiles/emacs.d/org-config.org index 1e99d449..261bf6c4 100644 --- a/dotfiles/emacs.d/org-config.org +++ b/dotfiles/emacs.d/org-config.org @@ -174,6 +174,16 @@ We're going to use this to write separate parts of our config to different secti (org-today (&rest r) (time-to-days date))) (cond ((eq major-mode 'org-mode) (org-todo)) ((eq major-mode 'org-agenda-mode) (org-agenda-todo))))) + +(defun imalison:lower-todo-priorities () + "Lower the priority of each TODO heading in all org-agenda files by 1." + (interactive) + (org-map-entries + (lambda () + (when (org-entry-is-todo-p) + (org-priority-down))) + nil + 'agenda)) #+end_src ** Miscellaneous #+begin_src emacs-lisp :tangle org-config-config.el