From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: Re: agenda view opening multiple buffers Date: Tue, 29 Mar 2011 00:00:36 +0530 Message-ID: References: <87ei5sr7gj.fsf@norang.ca> <878vw0y78z.wl%markert.michael@googlemail.com> <815582FF-9288-4B52-9B5A-4D838D6A1FFD@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=49946 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4HDR-0004Z1-1r for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 14:31:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4HDP-0002N4-Mk for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 14:31:00 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:61637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4HDP-0002Mt-JK for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 14:30:59 -0400 Received: by vws4 with SMTP id 4so3274772vws.0 for ; Mon, 28 Mar 2011 11:30:59 -0700 (PDT) In-Reply-To: <815582FF-9288-4B52-9B5A-4D838D6A1FFD@gmail.com> 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: Carsten Dominik Cc: Julian Burgos , Bernt Hansen , emacs-orgmode@gnu.org, Michael Markert On Mon, Mar 28, 2011 at 8:48 PM, Carsten Dominik wrote: > > On 27.3.2011, at 20:55, Manish wrote: > >> On Sun, Mar 27, 2011 at 8:21 PM, Julian Burgos wrote: >>> Thanks. =A0Using x is good enough for now. =A0I=C2=B4ll explore also Mi= chael=C2=B4s >>> suggestions. =A0It would be good to have the agenda open in a buffer >>> without having all the agenda files opened too. >>> >> >> Following code should do what you want (I think). >> >> #+begin_src emacs-lisp >> ;; function code copied from definition of org-agenda-exit >> =A0(add-hook 'org-finalize-agenda-hook >> =A0 =A0 =A0 =A0 =A0 =A0(lambda () >> =A0 =A0 =A0 =A0 =A0 =A0 =A0(interactive) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0(org-release-buffers org-agenda-new-buffers) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0(setq org-agenda-new-buffers nil))) >> #+end_src > > This will make the agenda disfunctional. =A0Each line in the agenda conta= ins 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. > Thanks for pointing that out. Wouldn't "x" that close the agenda as well along with the buffers? OP said: " It would be good to have the agenda open in a buffer without having all the agenda files opened too." May be a special custom agenda command that calls the above lambda function at the end would work better by limiting the damaged behaviour to just one command? /manish