From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: agenda view opening multiple buffers Date: Mon, 28 Mar 2011 17:18:38 +0200 Message-ID: <815582FF-9288-4B52-9B5A-4D838D6A1FFD@gmail.com> References: <87ei5sr7gj.fsf@norang.ca> <878vw0y78z.wl%markert.michael@googlemail.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=38449 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4EDO-0006i8-Lr for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 11:18:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4EDM-0007Qr-Ne for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 11:18:46 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:51355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4EDM-0007Qn-II for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 11:18:44 -0400 Received: by eyd9 with SMTP id 9so845675eyd.0 for ; Mon, 28 Mar 2011 08:18:43 -0700 (PDT) In-Reply-To: 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: Manish Cc: Julian Burgos , Bernt Hansen , emacs-orgmode@gnu.org, Michael Markert On 27.3.2011, at 20:55, Manish wrote: > On Sun, Mar 27, 2011 at 8:21 PM, Julian Burgos wrote: >> Thanks. Using x is good enough for now. I=C2=B4ll explore also = Michael=C2=B4s >> suggestions. It would be good to have the agenda open in a buffer >> without having all the agenda files opened too. >>=20 >=20 > Following code should do what you want (I think). >=20 > #+begin_src emacs-lisp > ;; function code copied from definition of org-agenda-exit > (add-hook 'org-finalize-agenda-hook > (lambda () > (interactive) > (org-release-buffers org-agenda-new-buffers) > (setq org-agenda-new-buffers nil))) > #+end_src This will make the agenda disfunctional. Each line in the agenda = contains a pointer to the entry the line was derived from, so remote = editing etc will stop working. Exiting with "x" is the much better solution. HTH - Carsten >=20 > HTH > --=20 > Manish >=20 >> On Sun, Mar 27, 2011 at 2:21 PM, Michael Markert >> wrote: >>> On 27 Mar 2011, Bernt Hansen wrote: >>>> Julian Burgos writes: >>>>=20 >>>>> Dear list, >>>>>=20 >>>>> When asking for an agenda view (C-c a), org mode opens all files = in >>>>> the agenda list in individual buffers. I keep lots of files in my >>>>> list (one per project), so having all those buffers open each time = I >>>>> visit my agenda is pretty annoying. Is there a way to make org = mode >>>>> not open each file in a buffer (or close the buffers after reading = the >>>>> file) when asking for an agenda view? >>>>> Thanks, >>>>>=20 >>>>> Julian >>>>=20 >>>> Hi Julian, >>>>=20 >>>> I think 'e' in the agenda is supposed to exit the agenda and close >>>> automatically opened agenda files. >>>=20 >>> It's `x'. But I think Julian meant that the buffers should be closed >>> automatically and not open at least as long as the agenda is shown. >>>=20 >>> For the original issue I think the following would help: >>> #+begin_src emacs-lisp >>> (defun project-agenda (&optional args keys restriction) >>> (interactive) >>> (let ((org-agenda-files '("~/project-file1" >>> "~/project-file2"))) >>> (org-agenda args keys restriction))) >>> #+end_src >>>=20 >>> Or pressing `<' in the prompt buffer, for more see = (describe-function >>> 'org-agenda) >>>=20 >>> Michael >>>=20 >>=20 >>=20 >>=20 >> -- >> Julian Mariano Burgos >> Hafranns=C3=B3knastofnunin/Marine Research Institute >> Sk=C3=BAlagata 4, 121 Reykjav=C3 k, Iceland >> S=C3 mi/Telephone : +354-5752037 >> Br=C3=A9fs=C3 mi/Telefax: +354-5752001 >> Netfang/Email: julian@hafro.is, jmburgos@uw.edu >>=20 >>=20 >=20