emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Get a list of tasks completed today


From: Trevor Murphy
Subject: Re: [O] Get a list of tasks completed today
Date: Mon, 17 Feb 2014 09:12:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

"Loris Bennett" <address@hidden> writes:

#+begin_src emacs-lisp (add-to-list 'org-agenda-custom-commands '("." "Completed today" ((todo "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp (format-time-string "CLOSED: \\[%Y-%m-%d"))))) (org-agenda-sorting-strategy '(priority-down)))))) t) #+end_src

However, more useful to me would be "last week", so what approach should I take for that?

I get pretty decent mileage out of this command (note that it's a tags search, not a todo keyword search.) (add-to-list 'org-agenda-custom-commands '("." "Closed this week." tags "CLOSED>\"<-1w>\"" ((org-agenda-sorting-strategy '(priority-down))))) Though now I've got a related question.

One thing I'd like to do is run a function over every item that was closed this past week. For sake of example, let's say I've added a property ":mood: 5" to several closed items and I'd like to delete it (but only from the closed items; I'm not necessarily deleting the property globally.)

To do this I tried pulling all the closed items, visiting them in turn, and calling (org-delete-property "mood"). But I got stuck pulling all the closed items, because `org-tags-view' and friends all build an agenda as a side effect.

Is my best bet simply re-implementing the parts of `org-tags-view' that I need?

Or is there a more common way to use the org machinery to work with items in lisp code?
Thanks!

--
Trevor Murphy
GnuPG Key: 0x83881C0A




reply via email to

[Prev in Thread] Current Thread [Next in Thread]