[Emacs] Add priority functions

This commit is contained in:
Ivan Malison 2023-08-20 22:36:29 -06:00
parent c6caa55ad5
commit b26d4126bc

View File

@ -3049,7 +3049,7 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
(org-lowest-priority 69) ;; The character E (org-lowest-priority 69) ;; The character E
(org-enforce-todo-dependencies t) (org-enforce-todo-dependencies t)
(org-deadline-warning-days 0) (org-deadline-warning-days 0)
(org-default-priority ?D) (org-default-priority ?C)
(org-agenda-skip-scheduled-if-done t) (org-agenda-skip-scheduled-if-done t)
(org-agenda-skip-deadline-if-done t) (org-agenda-skip-deadline-if-done t)
(org-agenda-window-setup 'other-window) (org-agenda-window-setup 'other-window)
@ -3383,7 +3383,17 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
(or (outline-next-heading) (or (outline-next-heading)
(point-max))))) (point-max)))))
(defun org-get-priority-at-point ()
(save-excursion
(beginning-of-line)
(org-back-to-heading t)
(when (looking-at org-priority-regexp)
(let ((ms (match-string 2)))
(org-priority-to-value ms)))))
(defmacro imalison:def-agenda-priority-pred (priority)
`(imalison:def-agenda-pred
(>= (org-get-priority-at-point) ,priority)))
(let ((this-week-high-priority (let ((this-week-high-priority
;; The < in the following line has behavior that is opposite ;; The < in the following line has behavior that is opposite