emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Sascha Ziemann <ceving@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to view everything DONE today?
Date: Wed, 26 Nov 2014 14:44:47 -0500	[thread overview]
Message-ID: <m2k32h926o.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <CAGUt3y6F3wiogTH0YZ+5WeeGjwUK==RZL-WC_x8tYysCeJ+oXQ@mail.gmail.com> (Sascha Ziemann's message of "Wed, 26 Nov 2014 14:56:03 +0100")

I am not sure how to do this through the agenda, but here is a way to
find headlines in the current file that were closed today. You could
wrap this in a loop over the files in your agenda list. It is a little
clumsy on the time comparisons but it works ;)

* Getting items done today

** DONE item 1
   CLOSED: [2014-11-26 Wed 13:09] DEADLINE: <2014-11-26 Wed>



** DONE item 2
   CLOSED: [2014-11-25 Tue 13:09] DEADLINE: <2014-11-26 Wed>


** Mapping entries to find what closed today.

First, we look at a timestamp comparison function. 
#+BEGIN_SRC emacs-lisp
(org-time= "<2014-11-26 Wed>" "<2014-11-26 Wed>")
#+END_SRC

#+RESULTS:
: t

#+BEGIN_SRC emacs-lisp
(org-map-entries
  (lambda ()
    (let* ((closed (org-entry-get (point) "CLOSED"))
           (today (format-time-string "<%Y-%m-%d>")))
      (when closed
	(when
	    (org-time=
	     today
	     (let ((parts (org-parse-time-string closed)))
	       (format "<%s-%s-%s>"
		       (nth 5 parts) ; year
		       (nth 4 parts) ; month
		       (nth 3 parts) ; day
		       )))
	  (message-box "Found a closed task: %s"
		       (org-heading-components)))))))
 
#+END_SRC

#+RESULTS:
| nil | Found a closed task: (2 2 DONE nil item 1 nil) | nil | nil |




Sascha Ziemann <ceving@gmail.com> writes:

> Hi,
>
> I tried to get a list of all items done today. I tried to open the
> agenda view but is does not show anything. What is the right command
> to see the items done today?
>
> Regards,
> Sascha
>

-- 
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

  parent reply	other threads:[~2014-11-26 19:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 13:56 How to view everything DONE today? Sascha Ziemann
2014-11-26 16:49 ` Richard Lawrence
2014-11-26 19:44 ` John Kitchin [this message]
2014-11-27 14:39   ` Sascha Ziemann
2014-11-27 19:58     ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k32h926o.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=ceving@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).