emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Agenda view and timestamps
@ 2010-08-16 18:15 julien cubizolles
  2010-08-16 18:23 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: julien cubizolles @ 2010-08-16 18:15 UTC (permalink / raw)
  To: emacs-orgmode

Is there a way to make the agenda view display only the entries with a
timestamp ? I would need that for a block agenda.

Julien.

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

* Re: Agenda view and timestamps
  2010-08-16 18:15 Agenda view and timestamps julien cubizolles
@ 2010-08-16 18:23 ` Bastien
  2010-08-16 19:15   ` julien cubizolles
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2010-08-16 18:23 UTC (permalink / raw)
  To: julien cubizolles; +Cc: emacs-orgmode

Hi Julien,

julien cubizolles <j.cubizolles@free.fr> writes:

> Is there a way to make the agenda view display only the entries with a
> timestamp ? I would need that for a block agenda.

,----
| (setq org-agenda-custom-commands
|       '(("d" "With timestamps" agenda "List of tasks with a timestamp"
|          ((org-agenda-skip-function
|            (lambda ()
|              (let* ((ts (org-entry-get nil "TIMESTAMP")))
|                (if (or (not ts) (equal ts ""))
|                    (progn (outline-next-heading) (point))))))))))
`----

Not tested but it should work.

-- 
 Bastien

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

* Re: Agenda view and timestamps
  2010-08-16 18:23 ` Bastien
@ 2010-08-16 19:15   ` julien cubizolles
  2010-08-24  2:30     ` Matt Lundin
  0 siblings, 1 reply; 5+ messages in thread
From: julien cubizolles @ 2010-08-16 19:15 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Le lundi 16 août 2010 à 20:23 +0200, Bastien a écrit :
> Hi Julien,
> 
> julien cubizolles <j.cubizolles@free.fr> writes:
> 
> > Is there a way to make the agenda view display only the entries with a
> > timestamp ? I would need that for a block agenda.
> 
> ,----
> | (setq org-agenda-custom-commands
> |       '(("d" "With timestamps" agenda "List of tasks with a timestamp"
> |          ((org-agenda-skip-function
> |            (lambda ()
> |              (let* ((ts (org-entry-get nil "TIMESTAMP")))
> |                (if (or (not ts) (equal ts ""))
> |                    (progn (outline-next-heading) (point))))))))))
> `----
> 
> Not tested but it should work.

Just tested, and it works perfectly. Thanks a lot, I would never have
come up with such an elaborate solution : my only experience of lisp
programming is parenthesis matching while adapting other
people's .emacs.

Julien.

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

* Re: Agenda view and timestamps
  2010-08-16 19:15   ` julien cubizolles
@ 2010-08-24  2:30     ` Matt Lundin
  2010-08-30 12:34       ` julien cubizolles
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Lundin @ 2010-08-24  2:30 UTC (permalink / raw)
  To: julien cubizolles; +Cc: emacs-orgmode, Bastien

Hi Julien,

julien cubizolles <j.cubizolles@free.fr> writes:

> Le lundi 16 août 2010 à 20:23 +0200, Bastien a écrit :
>> Hi Julien,
>> 
>> julien cubizolles <j.cubizolles@free.fr> writes:
>> 
>> > Is there a way to make the agenda view display only the entries with a
>> > timestamp ? I would need that for a block agenda.
>> 
>> ,----
>> | (setq org-agenda-custom-commands
>> |       '(("d" "With timestamps" agenda "List of tasks with a timestamp"
>> |          ((org-agenda-skip-function
>> |            (lambda ()
>> |              (let* ((ts (org-entry-get nil "TIMESTAMP")))
>> |                (if (or (not ts) (equal ts ""))
>> |                    (progn (outline-next-heading) (point))))))))))
>> `----
>> 
>> Not tested but it should work.
>
> Just tested, and it works perfectly. Thanks a lot, I would never have
> come up with such an elaborate solution : my only experience of lisp
> programming is parenthesis matching while adapting other
> people's .emacs.
>

Another solution is to use the variable org-agenda-entry-types. This is
slightly more efficient, since it searches solely for timestamps when
creating the agenda, rather than considering all agenda types and then
filtering out everything that is not a timestamp.

--8<---------------cut here---------------start------------->8---
(setq org-agenda-custom-commands
       '(("d" "With timestamps" agenda "List of tasks with a timestamp"
	  ((org-agenda-entry-types '(:timestamp))))))
--8<---------------cut here---------------end--------------->8---

Best,
Matt

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

* Re: Agenda view and timestamps
  2010-08-24  2:30     ` Matt Lundin
@ 2010-08-30 12:34       ` julien cubizolles
  0 siblings, 0 replies; 5+ messages in thread
From: julien cubizolles @ 2010-08-30 12:34 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode, Bastien

Le lundi 23 août 2010 à 22:30 -0400, Matt Lundin a écrit :
> Hi Julien,

> Another solution is to use the variable org-agenda-entry-types. This is
> slightly more efficient, since it searches solely for timestamps when
> creating the agenda, rather than considering all agenda types and then
> filtering out everything that is not a timestamp.
> 
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-custom-commands
>        '(("d" "With timestamps" agenda "List of tasks with a timestamp"
> 	  ((org-agenda-entry-types '(:timestamp))))))
> --8<---------------cut here---------------end--------------->8---

It works, thanks a lot. I don't know how I missed org-agenda-entry-types
while reading the doc.

Julien.

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

end of thread, other threads:[~2010-08-30 12:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-16 18:15 Agenda view and timestamps julien cubizolles
2010-08-16 18:23 ` Bastien
2010-08-16 19:15   ` julien cubizolles
2010-08-24  2:30     ` Matt Lundin
2010-08-30 12:34       ` julien cubizolles

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