emacs-devel
[Top][All Lists]
Advanced

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

Re: xref and leaving "temporary" buffers open


From: Dmitry Gutov
Subject: Re: xref and leaving "temporary" buffers open
Date: Tue, 28 Jul 2015 16:30:55 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 07/27/2015 08:34 PM, Nix wrote:

FWIW, there are existing packages which automatically kill buffers that
weren't modified for a certain period of time and are no longer
displayed in any frame (using the buffer-modified-tick). If you combine
that with a modification such that the comparatively limited set of
commands that explicitly open buffers on user request set a buffer-local
'persistent-buffer' variable in them, you can then arrange to
automatically erase all non-persistent buffers without touching the
packages that open such buffers.

I think we'd rather move into the direction of other packages using the "hidden buffers" facility, thus indicating that their buffers can actually be cleaned up.

Cleaning those up will cause issues already: I'm sure someone, somewhere will use find-file-hidden, don't mark the returned buffer as persistent, save a reference to it, and then try to use it later.

(However, this would tend to break
third-party modes that open lots of extra buffers -- but how many of
those are there? It's mostly things, like Gnus, that implement whole
multi-buffer applications inside Emacs, I think. There seem to be
arguments in favour both of the local variable to mark temporariness and
the local variable to mark *non*-temporariness...)

A variable to mark temporariness might help a lot, actually. As long as it very obvious to the caller, so that we don't end up with heaps of hidden buffers, without any of them marked as temporary.



reply via email to

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