From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Queipo de Llano Moya Subject: custom agenda command with function doesn't work Date: Fri, 20 Jan 2012 07:52:07 +0100 Message-ID: <4F190F17.3000808@ietcc.csic.es> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------090306020600000105070008" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro8Ka-0004HH-Ao for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 01:52:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ro8KZ-0000gi-7l for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 01:52:12 -0500 Received: from ironport.csic.es ([161.111.10.143]:45277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro8KY-0000ge-UD for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 01:52:11 -0500 Received: from [161.111.230.4] (pc004.ietcc.csic.es [161.111.230.4]) by estafeta.csic.es (Postfix) with ESMTP id 1EF501A0BF8 for ; Fri, 20 Jan 2012 07:52:06 +0100 (CET) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------090306020600000105070008 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hello, I'm trying to write a custom agenda command that cycles through a list of names and builds an agenda block for each one with his tasks. I wrote a command, that I have called org-sec-tasksbymember that throws a list of tags-todo with the parameters I want. For example, for a list of members ("Me" "Pablo" "Miguel" "Carlos"), defined in a variable, the evaluation of (org-sec-tasksbymember) throws: ((tags-todo "+Resp=\"Me\"") (tags-todo "+Resp=\"Pablo\"") (tags-todo "+Resp=\"Miguel\"") (tags-todo "+Resp=\"Carlos\"")) If I define a custom agenda command like (without using the command): ("q" "Tasks by member" ((tags-todo "+Resp=\"Me\"") (tags-todo "+Resp=\"Pablo\"") (tags-todo "+Resp=\"Miguel\"") (tags-todo "+Resp=\"Carlos\""))) It works, but if use this agenda command: ("q" "Tasks by member" (org-sec-tasksbymember)) I got an error of Wrong type argument: listp, org-sec-tasksbymember I can't find a solution. Can anyone help me. I'm sorry if this is dumb. Thanks -- *Juan Queipo de Llano Moya* Instituto de Ciencias de la Construcción Eduardo Torroja - CSIC c/ Serrano Galvache, 4 28033 MADRID jqueipo@ietcc.csic.es Tel: 91 302 04 40 ext. 202 --------------090306020600000105070008 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello,

I'm trying to write a custom agenda command that cycles through a list of names and builds an agenda block for each one with his tasks.

I wrote a command, that I have called org-sec-tasksbymember that throws a list of tags-todo with the parameters I want. For example, for a list of members ("Me" "Pablo" "Miguel" "Carlos"), defined in a variable, the evaluation of (org-sec-tasksbymember) throws:

((tags-todo "+Resp=\"Me\"") (tags-todo "+Resp=\"Pablo\"") (tags-todo "+Resp=\"Miguel\"") (tags-todo "+Resp=\"Carlos\""))

If I define a custom agenda command like (without using the command):
("q" "Tasks by member" ((tags-todo "+Resp=\"Me\"") (tags-todo "+Resp=\"Pablo\"") (tags-todo "+Resp=\"Miguel\"") (tags-todo "+Resp=\"Carlos\"")))

It works, but if use this agenda command:
("q" "Tasks by member" (org-sec-tasksbymember))
I got an error of Wrong type argument: listp, org-sec-tasksbymember

I can't find a solution. Can anyone help me. I'm sorry if this is dumb.

Thanks



--
Juan Queipo de Llano Moya
Instituto de Ciencias de la Construcción Eduardo Torroja - CSIC
c/ Serrano Galvache, 4
28033 MADRID
jqueipo@ietcc.csic.es
Tel: 91 302 04 40 ext. 202
--------------090306020600000105070008-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: custom agenda command with function doesn't work Date: Fri, 20 Jan 2012 17:02:40 +0100 Message-ID: <87bopy5plr.fsf@gnu.org> References: <4F190F17.3000808@ietcc.csic.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoGuF-0002WD-LK for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 11:01:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoGuB-00005w-5V for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 11:01:35 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:54546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoGuA-00005l-T3 for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 11:01:31 -0500 Received: by wgbdq13 with SMTP id dq13so599767wgb.30 for ; Fri, 20 Jan 2012 08:01:29 -0800 (PST) In-Reply-To: <4F190F17.3000808@ietcc.csic.es> (Juan Queipo de Llano Moya's message of "Fri, 20 Jan 2012 07:52:07 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Juan Queipo de Llano Moya Cc: emacs-orgmode@gnu.org Hi Juan, Juan Queipo de Llano Moya writes: > If I define a custom agenda command like (without using the command): > ("q" "Tasks by member" ((tags-todo "+Resp=\"Me\"") (tags-todo "+Resp= > \"Pablo\"") (tags-todo "+Resp=\"Miguel\"") (tags-todo "+Resp=\"Carlos > \""))) > > It works, but if use this agenda command: > ("q" "Tasks by member" (org-sec-tasksbymember)) > I got an error of Wrong type argument: listp, org-sec-tasksbymember You want (setq org-agenda-custom-commands `(("q" "Tasks by member" ,(org-sec-tasksbymember)))) Look for Macro expansion in the Emacs (lisp) manual. HTH, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Queipo de Llano Moya Subject: Re: custom agenda command with function doesn't work Date: Fri, 20 Jan 2012 17:20:55 +0100 Message-ID: <4F199467.3020607@ietcc.csic.es> References: <4F190F17.3000808@ietcc.csic.es> <87bopy5plr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------080000000909090501090701" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoHDB-0008W2-5Z for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 11:21:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoHD5-0004Jg-GU for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 11:21:09 -0500 Received: from ironport.csic.es ([161.111.10.143]:7300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoHD5-0004JM-9n for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 11:21:03 -0500 Received: from [161.111.230.4] (pc004.ietcc.csic.es [161.111.230.4]) by estafeta.csic.es (Postfix) with ESMTP id E2B861A0C06 for ; Fri, 20 Jan 2012 17:20:59 +0100 (CET) In-Reply-To: <87bopy5plr.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------080000000909090501090701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit El 20/01/12 17:02, Bastien escribió: > Hi Juan, > > Juan Queipo de Llano Moya writes: > >> If I define a custom agenda command like (without using the command): >> ("q" "Tasks by member" ((tags-todo "+Resp=\"Me\"") (tags-todo "+Resp= >> \"Pablo\"") (tags-todo "+Resp=\"Miguel\"") (tags-todo "+Resp=\"Carlos >> \""))) >> >> It works, but if use this agenda command: >> ("q" "Tasks by member" (org-sec-tasksbymember)) >> I got an error of Wrong type argument: listp, org-sec-tasksbymember > You want > > (setq org-agenda-custom-commands > `(("q" > "Tasks by member" > ,(org-sec-tasksbymember)))) > > Look for Macro expansion in the Emacs (lisp) manual. > > HTH, > It works! Thanks a lot. I've learned something today. :) *Juan Queipo de Llano Moya* --------------080000000909090501090701 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

El 20/01/12 17:02, Bastien escribió:
Hi Juan,

Juan Queipo de Llano Moya <jqueipo@ietcc.csic.es> writes:

If I define a custom agenda command like (without using the command):
("q" "Tasks by member" ((tags-todo "+Resp=\"Me\"") (tags-todo "+Resp=
\"Pablo\"") (tags-todo "+Resp=\"Miguel\"") (tags-todo "+Resp=\"Carlos
\"")))

It works, but if use this agenda command:
("q" "Tasks by member" (org-sec-tasksbymember))
I got an error of Wrong type argument: listp, org-sec-tasksbymember
You want

(setq org-agenda-custom-commands
  `(("q" 
     "Tasks by member" 
     ,(org-sec-tasksbymember))))

Look for Macro expansion in the Emacs (lisp) manual.

HTH,

It works!
Thanks a lot. I've learned something today. :)

Juan Queipo de Llano Moya



--------------080000000909090501090701--