diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw-org.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 96f3f69..8821b28 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el | |||
@@ -451,6 +451,19 @@ probably abandon it at some point for a better solution (see: | |||
451 | (nth day-of-week '("Sun" "Mon" "Tue" "Wed" "Thu" | 451 | (nth day-of-week '("Sun" "Mon" "Tue" "Wed" "Thu" |
452 | "Fri" "Sat")) | 452 | "Fri" "Sat")) |
453 | "]"))))))) | 453 | "]"))))))) |
454 | |||
455 | ;;; Org task stuff | ||
456 | |||
457 | (defun org-narrow-to-task () | ||
458 | "Narrow buffer to the nearest task and its subtree." | ||
459 | (interactive) | ||
460 | (save-excursion | ||
461 | (save-match-data | ||
462 | (widen) | ||
463 | (while (not (org-entry-is-todo-p)) | ||
464 | ;; TODO: need a better error message | ||
465 | (org-previous-visible-heading 1)) | ||
466 | (org-narrow-to-subtree)))) | ||
454 | 467 | ||
455 | 468 | ||
456 | (provide 'acdw-org) | 469 | (provide 'acdw-org) |