emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Removing org files after opening agenda


From: Carsten Dominik
Subject: Re: [Orgmode] Removing org files after opening agenda
Date: Sat, 3 Nov 2007 22:26:00 +0100


On  2Nov2007, at 1:45 PM, Stefan Kamphausen wrote:

Hi,

when opening an agenda for TODO items (via M-x org-agenda t) all files
from org-agenda-files will be opened.  This clutters the buffer space
and I think the buffers should be killed after reading their contents.

Probably I could do it myself using org-finalize-agenda-hook but it
may be worth thinking about a general solution.  And maybe I am
missing something?

The simple approach, to close all buffers associated with files in
org-agenda-files, is obviously not what one wants, instead only those
opened transparently should be removed afterwards.

What do you think?

Org-mode does remove all those buffers when you exit the agenda
with "x" instead of "q". Then all buffers loaded for constructing the TODO list
will be removed. Buffers that were already present before the agenda
was constructed are not removed.  If buffers have been modified,
you will be asked if you want to save them.

Org-mode is not removing the buffers immediately after constructing
the list, because it assumes that while working with the list you will still
need them for lookup purposes.

If you insist on immediately getting rid of the buffers,
you can put something like this into the org-finalize-agenda-hook:

(add-hook 'org-finalize-agenda-hook
  (lambda ()
    (org-release-buffers org-agenda-new-buffers)
    (setq org-agenda-new-buffers nil)))


- Carsten





reply via email to

[Prev in Thread] Current Thread [Next in Thread]