[Emacs] Fancy stuff to make imalison:assigned-to-me accesible in an async call

from org-wild-notifier
This commit is contained in:
Ivan Malison 2023-08-31 12:52:49 -06:00
parent 9fbce617d9
commit b9cb1dbfaa

View File

@ -271,10 +271,10 @@ We're going to use this to write separate parts of our config to different secti
(advice-add 'org-schedule :after 'imalison:maybe-auto-assign-to-self) (advice-add 'org-schedule :after 'imalison:maybe-auto-assign-to-self)
(cl-defun imalison:assigned-to-me (&key (include-unassigned t)) (defmacro imalison:assigned-to-me ()
(let ((assignee (org-entry-get nil "ASSIGNEE"))) `(let ((assignee (org-entry-get nil "ASSIGNEE")))
(or (string-equal assignee imalison:org-whoami) (or (string-equal assignee imalison:org-whoami)
(and include-unassigned (null assignee))))) (null assignee))))
(defalias 'imalison:assigned-to-me-agenda-pred (defalias 'imalison:assigned-to-me-agenda-pred
(imalison:def-agenda-pred (imalison:def-agenda-pred
@ -856,11 +856,12 @@ alphanumeric characters only."
(org-wild-notifier-alert-time '(30 5 0)) (org-wild-notifier-alert-time '(30 5 0))
(org-wild-notifier-extra-alert-plist '(:persistent t)) (org-wild-notifier-extra-alert-plist '(:persistent t))
(org-wild-notifier-predicate-whitelist (org-wild-notifier-predicate-whitelist
'((lambda (marker) `((lambda (marker)
,(async-inject-variables (rx (or "org-whoami")))
(save-excursion (save-excursion
(set-buffer (marker-buffer marker)) (set-buffer (marker-buffer marker))
(goto-char (marker-position marker)) (goto-char (marker-position marker))
(imalison:assigned-to-me))))) ,(macroexpand '(imalison:assigned-to-me))))))
(org-wild-notifier-predicate-blacklist (org-wild-notifier-predicate-blacklist
'(org-wild-notifier-done-keywords-predicate)) '(org-wild-notifier-done-keywords-predicate))
(org-wild-notifier-show-any-overdue-with-day-wide-alerts t) (org-wild-notifier-show-any-overdue-with-day-wide-alerts t)