diff options
Diffstat (limited to '.emacs.local.d/lisp')
-rw-r--r-- | .emacs.local.d/lisp/packages/rul-org-agenda.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.emacs.local.d/lisp/packages/rul-org-agenda.el b/.emacs.local.d/lisp/packages/rul-org-agenda.el index 7a6e787..8122afb 100644 --- a/.emacs.local.d/lisp/packages/rul-org-agenda.el +++ b/.emacs.local.d/lisp/packages/rul-org-agenda.el @@ -365,6 +365,23 @@ as the default task." (defvar bh/organization-task-id "eb155a82-92b2-4f25-a3c6-0304591af2f9") +;; https://stackoverflow.com/a/10091330 +(defun zin/org-agenda-skip-tag (tag &optional others) + "Skip all entries that correspond to TAG. + +If OTHERS is true, skip all entries that do not correspond to TAG." + (let ((next-headline (save-excursion (or (outline-next-heading) (point-max)))) + (current-headline (or (and (org-at-heading-p) + (point)) + (save-excursion (org-back-to-heading))))) + (if others + (if (not (member tag (org-get-tags-at current-headline))) + next-headline + nil) + (if (member tag (org-get-tags-at current-headline)) + next-headline + nil)))) + (defun bh/clock-in-organization-task-as-default () (interactive) (org-with-point-at (org-id-find bh/organization-task-id 'marker) |