From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Global agenda views creates lots of buffers. Date: Fri, 15 Jan 2010 06:50:04 +0100 Message-ID: References: <87iqb43eco.fsf@telefonica.net> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVf5Y-0002v5-CJ for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 00:51:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVf5T-0002rE-MN for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 00:51:15 -0500 Received: from [199.232.76.173] (port=58861 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVf5T-0002r8-Ej for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 00:51:11 -0500 Received: from postduif.ic.uva.nl ([145.18.40.180]:47267) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVf5S-0003AR-Um for emacs-orgmode@gnu.org; Fri, 15 Jan 2010 00:51:11 -0500 In-Reply-To: <87iqb43eco.fsf@telefonica.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: =?ISO-8859-1?Q?=D3scar_Fuentes?= Cc: emacs-orgmode@gnu.org On Jan 14, 2010, at 4:17 PM, =D3scar Fuentes wrote: > I have quite a few org files in org-agenda-files. When a global agenda > view is displayed (the Global TODO, for instance) org-mode visits all > the files and keeps the buffer for each of them. I'll prefer this > behavior: > > for each file in org-agenda-files > have we a buffer containing it? > no -> create a buffer and visit it > do our stuff (gather TODO items, etc) > if we were not visiting the file > kill the buffer that contains it. > > Is there a reason for keeping all those buffers around? The reason is that org makes links from the agenda to the files using markers, and markers die when the buffer is closed. What could be possible is throwing away all buffers that have not produced an entry. However, I have worked with the assumption that once you start the agenda you might run more agenda commands, so keeping the buffers removes the overhead of reopening many files again and again. As Darlan has said, you can exit the agenda with "x" to get rid of all buffers that where created to make the agenda and have not been modified since making them. HTH - Carsten