[Orgmode] Re: Agenda view and timestamps

2010-08-30 Thread julien cubizolles
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.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Agenda view and timestamps

2010-08-23 Thread Matt Lundin
Hi Julien,

julien cubizolles  writes:

> Le lundi 16 août 2010 à 20:23 +0200, Bastien a écrit :
>> Hi Julien,
>> 
>> julien cubizolles  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

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode