emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to view everything DONE today?
@ 2014-11-26 13:56 Sascha Ziemann
  2014-11-26 16:49 ` Richard Lawrence
  2014-11-26 19:44 ` John Kitchin
  0 siblings, 2 replies; 5+ messages in thread
From: Sascha Ziemann @ 2014-11-26 13:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to view everything DONE today?
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Lawrence @ 2014-11-26 16:49 UTC (permalink / raw)
  To: emacs-orgmode

Hi Sascha,

Sascha Ziemann <ceving@gmail.com> writes:

> 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?

If you use logging, one way to do this is to press "l" in the agenda, to
turn on "log mode".  This will show you all the tasks you worked on,
including the ones that you marked done.

I'm not sure if this is possible without logging, since your org files
won't record when tasks were marked done.  You can turn on logging with
a line like

#+STARTUP: logdone

in the preamble of an org file to turn logging on for that file, or

(setq org-log-done 'time) 

in your .emacs, to turn it on globally.

To keep things neat, you might also want to use

#+STARTUP: logdrawer

or 

(setq org-log-into-drawer t)

so your logs go in a LOGBOOK drawer.

Hope that helps!

Best,
Richard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to view everything DONE today?
  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
  2014-11-27 14:39   ` Sascha Ziemann
  1 sibling, 1 reply; 5+ messages in thread
From: John Kitchin @ 2014-11-26 19:44 UTC (permalink / raw)
  To: Sascha Ziemann; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to view everything DONE today?
  2014-11-26 19:44 ` John Kitchin
@ 2014-11-27 14:39   ` Sascha Ziemann
  2014-11-27 19:58     ` John Kitchin
  0 siblings, 1 reply; 5+ messages in thread
From: Sascha Ziemann @ 2014-11-27 14:39 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2755 bytes --]

This:

http://jcardente.blogspot.de/2010/06/org-mode-hack-tasks-done-last-month.html

inspired my to do this:

(defun org-done-view (&optional offset)
  "Shows all TODOs, which are done."
  (interactive "nOffset: ")
  (let ((offset (or offset 0)))
    (let ((t0 (calendar-current-date offset))
      (t1 (calendar-current-date (+ offset 1))))
      (org-tags-view nil
             (format "CLOSED>=\"[%s-%s-%s]\"+CLOSED<=\"[%s-%s-%s]\""
                 (calendar-extract-year t0)
                 (calendar-extract-month t0)
                 (calendar-extract-day t0)
                 (calendar-extract-year t1)
                 (calendar-extract-month t1)
                 (calendar-extract-day t1))))))

How can I open a calendar to pick a date?

Regards,
Sascha


2014-11-26 20:44 GMT+01:00 John Kitchin <jkitchin@andrew.cmu.edu>:

> 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
>

[-- Attachment #2: Type: text/html, Size: 4108 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to view everything DONE today?
  2014-11-27 14:39   ` Sascha Ziemann
@ 2014-11-27 19:58     ` John Kitchin
  0 siblings, 0 replies; 5+ messages in thread
From: John Kitchin @ 2014-11-27 19:58 UTC (permalink / raw)
  To: Sascha Ziemann; +Cc: emacs-orgmode

try (org-read-date)? It seems to return a string after you select the date.

#+BEGIN_SRC emacs-lisp
(org-read-date)
#+END_SRC

#+RESULTS:
: 2014-11-28




Sascha Ziemann <ceving@gmail.com> writes:

> This:
>
> http://jcardente.blogspot.de/2010/06/org-mode-hack-tasks-done-last-month.html
>
> inspired my to do this:
>
> (defun org-done-view (&optional offset)
> "Shows all TODOs, which are done."
> (interactive "nOffset: ")
> (let ((offset (or offset 0)))
> (let ((t0 (calendar-current-date offset))
> (t1 (calendar-current-date (+ offset 1))))
> (org-tags-view nil 
> (format "CLOSED>=\"[%s-%s-%s]\"+CLOSED<=\"[%s-%s-%s]\""
> (calendar-extract-year t0)
> (calendar-extract-month t0)
> (calendar-extract-day t0)
> (calendar-extract-year t1)
> (calendar-extract-month t1)
> (calendar-extract-day t1))))))
>
> How can I open a calendar to pick a date?
>
> Regards,
> Sascha
>
> 2014-11-26 20:44 GMT+01:00 John Kitchin <jkitchin@andrew.cmu.edu>:
>
>     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
>     
>
>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-27 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2014-11-27 14:39   ` Sascha Ziemann
2014-11-27 19:58     ` John Kitchin

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).