From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Help with agenda-custom commands Date: Sun, 28 Sep 2008 07:16:41 +0200 Message-ID: References: <20080924231637.GM28285@cpoint.net> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: multipart/mixed; boundary="===============0719296762==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KjoeV-0001RC-V6 for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:17:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KjoeU-0001QW-VX for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:17:03 -0400 Received: from [199.232.76.173] (port=33484 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjoeU-0001QD-K1 for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:17:02 -0400 Received: from postduif.ic.uva.nl ([145.18.40.180]:56357) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KjoeU-0000H3-Eg for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:17:02 -0400 In-Reply-To: <20080924231637.GM28285@cpoint.net> 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: pholcomb@cpoint.net Cc: emacs-orgmode@gnu.org --===============0719296762== Content-Type: multipart/alternative; boundary=Apple-Mail-2--541334463 --Apple-Mail-2--541334463 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi Paul, On Sep 25, 2008, at 1:16 AM, Paul Holcomb wrote: > > I'm pretty new to elisp and I'm having difficulty figuring out how > to implement two things in org-agenda-custom-commands: > > *) Is there a simple way to construct an agenda view that: > -shows all past scheduled events for one TODO keyword only > -skips for all others > > The only way I could figure out it could work is to write a large > org-agenda-skip function that explicitly looks at subtrees and > duplicates the org-scheduled-past-days check code. > > Unless I'm mistaken a block view won't work because the value of > org-scheduled-past-days is local to the agenda command and not each > block inside of it. I have not tested this, but you might be able to use the general tags/ property/todo matcher on `C-c a m' like this: SCHEDULED<""/!+MYTODOKEYWORD > *) Using a defconst symbol or function that evaluates to a stringp > in place of an actual string in for the match field. > > ex: > ("A" "" tags-todo 'org-pah-todo-exclude nil nil) > > > (type-of org-pah-todo-exclude) > ==> stringp > > I also tried using concat and format for that argument. The error > is always: > > Debugger entered--Lisp error: (wrong-type-argument stringp (quote > org-pah-todo-exclude)) > string-match("/+" (quote org-pah-todo-exclude)) > org-make-tags-matcher((quote org-pah-todo-exclude)) > org-tags-view((4) (quote org-pah-todo-exclude)) > > It seems like the evaluation order is at fault, but I couldn't get > further. indeed, currently the match entry is not evaluated. I guess we could do that, but it would involve changing several functions. I would need a convincing use case before I invest the time. How would you want to use this? - Carsten --Apple-Mail-2--541334463 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
Hi = Paul,


On Sep 25, 2008, at = 1:16 AM, Paul Holcomb wrote:


= I'm pretty new to elisp and I'm having difficulty figuring out how
= to implement two things in org-agenda-custom-commands:

*) Is = there a simple way to construct an agenda view that:
 -shows = all past scheduled events for one TODO keyword only
 -skips for = all others

The only way I could figure out it could work is to = write a large
org-agenda-skip function that explicitly looks at = subtrees and
duplicates the org-scheduled-past-days check = code.

Unless I'm mistaken a block view won't work because the = value of
org-scheduled-past-days is local to the agenda command and = not each
block inside of it.

I = have not tested this, but you might be able to use the general = tags/property/todo matcher 
on `C-c a m' like = this:

SCHEDULED<"<today>"/!+MYTODOKEYWORD

*) Using a defconst = symbol or function that evaluates to a stringp
in place of an actual = string in for the match field.  

ex:
=      ("A" ""  tags-todo = 'org-pah-todo-exclude nil nil)


=           (type-of = org-pah-todo-exclude)  
=        =3D=3D> stringp

=  I also tried using concat and format for that argument.  The = error
 is always:

 Debugger entered--Lisp error: = (wrong-type-argument stringp (quote org-pah-todo-exclude))
=    string-match("/+" (quote org-pah-todo-exclude))
=    org-make-tags-matcher((quote = org-pah-todo-exclude))
   org-tags-view((4) (quote = org-pah-todo-exclude))

 It seems like the evaluation order = is at fault, but I couldn't get = further.

indeed, currently the = match entry is not evaluated.  I guess we could do that, but it = would involve changing several functions.  I would need a = convincing use case before I invest the time.  How would you want = to use this?

- = Carsten

= --Apple-Mail-2--541334463-- --===============0719296762== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0719296762==--