Skip next steps in org todo lists
Projects can fill up the task list quite easily, though actually only the immediately next task is of real interest.
This commit is contained in:
parent
d25cc62263
commit
3eb9eb45f3
1 changed files with 21 additions and 6 deletions
|
@ -82,16 +82,31 @@
|
|||
(setq outline-path (concat "[ " outline-path " ] ")))
|
||||
outline-path))
|
||||
|
||||
(defun oni:org-heading-has-predecessor-p ()
|
||||
"Determine if a heading has a predecessor.
|
||||
|
||||
Only tasks of a level greater than 3 are considered. A task has a
|
||||
predecessor if there is a non-DONE sibling defined before it."
|
||||
(let ((point (point)))
|
||||
(save-excursion
|
||||
(org-backward-heading-same-level 1)
|
||||
(let ((components (org-heading-components)))
|
||||
(not (or (< (car components) 3)
|
||||
(= point (point))
|
||||
(member (elt components 2) org-done-keywords)))))))
|
||||
|
||||
(defun oni:next-heading-position ()
|
||||
(or (ignore-errors (org-forward-element)
|
||||
(point))
|
||||
(point-max)))
|
||||
|
||||
(defun org-init-skip-tags ()
|
||||
"Skip the \"ex\" and \"unconfirmed\" tags."
|
||||
(let ((tags (org-get-tags-at (point))))
|
||||
(when (or (member "ex" tags)
|
||||
(member "unconfirmed" tags))
|
||||
(save-excursion
|
||||
(or
|
||||
(ignore-errors (org-forward-element)
|
||||
(point))
|
||||
(point-max))))))
|
||||
(member "unconfirmed" tags)
|
||||
(oni:org-heading-has-predecessor-p))
|
||||
(oni:next-heading-position))))
|
||||
|
||||
(defun org-init-get-tag-name ()
|
||||
"Get the name for a new tag for the currently loaded desktop."
|
||||
|
|
Loading…
Reference in a new issue