>>>>> Regarding 'Re: [Orgmode] Re: how to do this org-agenda command?'; Manish >>>>> adds:
> How about switching the TODO state when you clock in to a task and > adding a block to the custom agenda to inlude tasks with that state? > --8<---------------cut here---------------start------------->8--- > (setq org-clock-in-switch-to-state "STARTED") > --8<---------------cut here---------------end--------------->8--- Thanks, in the end I wrote a hackish org-agenda-skip-function for my needs. Thank you for your input. ,---- | (defun rk-org-agenda-skip-not-interesting () | "Skip not interesting TODO entries, only keep: | - [#A] priority entries, | - scheduled for today entries, | - entries that are clocked in. | Ripped from org-agenda-skip-if function." | (let (beg end m) | (org-back-to-heading t) | (setq beg (point) | end (progn (outline-next-heading) (1- (point)))) | (goto-char beg) | (and (and | ;; CLOCKED IN entries | (not (save-excursion | (when (re-search-forward "^ +CLOCK: \\[.*?\\]$" end t) | (beginning-of-line) | (not (re-search-forward "--" (line-end-position) t)) | ))) | ;; PRIORITY [#A] entries | (not (save-excursion | (re-search-forward "\\[#A\\]" end t))) | ;; SCHEDULED FOR (TO)DAY entries | (not (save-excursion | (when (re-search-forward org-ts-regexp | end t) | (calendar-date-equal (org-date-to-gregorian | (time-to-days | (org-time-string-to-time (match-string 0)))) | date | ))))) | end))) `---- Usage example: ,---- | ... | (alltodo "" ((org-agenda-skip-function | 'rk-org-agenda-skip-not-interesting))) | ... `---- -- Richard _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode