From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Lu Subject: Re: How to call org-agenda with the parameter Date: Mon, 19 Jan 2015 20:57:20 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d8bd968849e050d0bc2c7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDO4M-0003xg-He for emacs-orgmode@gnu.org; Mon, 19 Jan 2015 20:57:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDO4I-0003Ci-2N for emacs-orgmode@gnu.org; Mon, 19 Jan 2015 20:57:26 -0500 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:44565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDO4H-0003CR-Oc for emacs-orgmode@gnu.org; Mon, 19 Jan 2015 20:57:22 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so19701367wiv.0 for ; Mon, 19 Jan 2015 17:57:21 -0800 (PST) In-Reply-To: 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: Dan Griswold , rasmus@gmx.us Cc: emacs-orgmode --047d7b5d8bd968849e050d0bc2c7 Content-Type: text/plain; charset=UTF-8 Actually I'm trying to write a function, which simply split the window into two, inside one (org-agenda nil "1") is called, while inside the other call (org-agenda nil "2"), however, (org-agenda) will always split the window using its own way. Is there anyway to get around this? Thanks. (defun lch-recur () (interactive) (split-window-horizontally) (org-agenda nil "1") (other-window 1) (org-agenda nil "2") ) (run-with-idle-timer 300 t 'lch-recur) And also how to define a function which delete all the org-agenda buffer and run org-agenda-quit on each one (so all the opened org file will be closed)? Best, Chao On Mon, Jan 19, 2015 at 7:34 PM, Chao Lu wrote: > Thanks, it works. > > Best, > > Chao > > On Mon, Jan 19, 2015 at 5:03 PM, Dan Griswold > wrote: > >> Probably this instead: >> >> (org-agenda nil "1" nil) >> >> Dan >> >> On Mon, Jan 19, 2015 at 4:50 PM, Chao Lu wrote: >> >>> Hi all, >>> >>> I defined a few org-agenda custom set, where I could M-x org-agenda RET >>> then press "1" to list all my active TODOs. And I'm trying to write a >>> function when I could pop-up a buffer and show me all the active TODOs. I >>> tried (org-agenda "1"), and it does not work, then what should be the right >>> way to do that? >>> >>> (defun lch-recur () >>> (interactive) >>> (split-window-vertically) >>> (lch-cowsay-fortune) >>> (other-window 1) >>> *(org-agenda "1")* >>> ) >>> >>> Thanks, >>> >>> Chao >>> >> >> > --047d7b5d8bd968849e050d0bc2c7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Actually I= 9;m trying to write a function, which simply split the window into two, ins= ide one (org-agenda nil "1") is called, while inside the other ca= ll (org-agenda nil "2"), however, (org-agenda) will always split = the window using its own way. Is there anyway to get around this? Thanks.
(defun lch-recur ()
=C2=A0=C2=A0=C2=A0=C2=A0 (interact= ive)
=C2=A0=C2=A0=C2=A0=C2=A0 (split-window-horizontally)
=C2=A0=C2=A0=C2=A0=C2=A0 (org-agenda nil "1")
=C2=A0=C2= =A0=C2=A0=C2=A0 (other-window 1)
=C2=A0=C2=A0=C2=A0=C2=A0 (org-age= nda nil "2")
)
(run-with-idle-timer 300 t 'lch-re= cur)

And also how to define a function which delete all the or= g-agenda buffer and run org-agenda-quit on each one (so all the opened org = file will be closed)?

Best,

Chao

On Mon, Jan 19, 2015 at 7:34 P= M, Chao Lu <loochao.list@gmail.com> wrote:
Thanks, it works.

= Best,

Chao

On Mon, Jan 19, 2015 at 5= :03 PM, Dan Griswold <dgriswol@rochester.rr.com> wro= te:
Probably t= his instead:

(org-agenda nil "1" nil)

Da= n

On Mon, Jan 19, 2015 at 4:50 PM, Chao Lu <loochao.l= ist@gmail.com> wrote:
Hi all,

I defined a few org-agenda custom= set, where I could M-x org-agenda RET then press "1" to list all= my active TODOs. And I'm trying to write a function when I could pop-u= p a buffer and show me all the active TODOs. I tried (org-agenda "1&qu= ot;), and it does not work, then what should be the right way to do that?
(defun lch-recur ()
=C2=A0 (interactive)
=C2=A0 (split-wi= ndow-vertically)
=C2=A0 (lch-cowsay-fortune)
=C2=A0 (other-window 1)<= br>=C2=A0 (org-agenda "1")
)

Thanks,<= br>
Chao



--047d7b5d8bd968849e050d0bc2c7--