From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Agenda view and timestamps Date: Mon, 23 Aug 2010 22:30:05 -0400 Message-ID: <87occsivyq.fsf@fastmail.fm> References: <1281982529.2342.4.camel@localhost> <8762za5sd1.fsf@gnu.org> <1281986101.2342.56.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=39507 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnjH9-0000jp-4x for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 22:30:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnjH7-0002oq-GC for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 22:30:11 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:45078) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnjH7-0002og-EJ for emacs-orgmode@gnu.org; Mon, 23 Aug 2010 22:30:09 -0400 In-Reply-To: <1281986101.2342.56.camel@localhost> (julien cubizolles's message of "Mon, 16 Aug 2010 21:15:01 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: julien cubizolles Cc: emacs-orgmode@gnu.org, Bastien Hi Julien, julien cubizolles writes: > Le lundi 16 ao=C3=BBt 2010 =C3=A0 20:23 +0200, Bastien a =C3=A9crit : >> Hi Julien, >>=20 >> julien cubizolles writes: >>=20 >> > Is there a way to make the agenda view display only the entries with a >> > timestamp ? I would need that for a block agenda. >>=20 >> ,---- >> | (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)))))))))) >> `---- >>=20 >> 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