Subject: RE: bug#16651: 24.3.50; desktop saves temporary buffers

From: Drew Adams <[email-masked]>
Date: Wed, 5 Feb 2014 14:07:27 -0800 (PST)

> > I see two possible solutions: skip saving all buffers with the
> > leading space in the buffer name,
> 
> I cannot imagine any reason why such buffers should ever be
> saved in a desktop.

Many, perhaps most, things a user might want (or might do)
cannot be imagined, by even the most imaginative of designers.

"Should" in such a context, can be applied reasonably only
to the _default_ behavior.

A user doing something that involves _display_ of temporary
buffers (which include buffers such as `*Pp Eval Output*',
`*Messages* and `*scratch*', as well as _internal_ buffers,
which are buffers whose names start with a space) might well
want to save the current Emacs state, including the display of
such a buffer.

There is no sense in deciding the behavior in a black-and-white,
one-size-fits-all way.  One reasonable default behavior would
be to exclude such buffers from saving, but users should be
able to easily customize this.

Another reasonable default behavior would be to exclude all
such buffers that are not displayed.  It is rare that such a
buffer is displayed, and if that happens it is the user who
has forced it.  Emacs should not assume that a displayed
buffer should not be saved (except by default).

In most cases the state (e.g. contents) of a temporary buffer
cannot be restored, in any case.  But the display of such
a buffer can be recorded and restored.  A user might well
position `*Messages*' or `*Buffer List*' specially and want
that display to be restored, regardless of the current
buffer contents.

An internal buffer that is displayed is no different in this
respect.

But again, whatever the default behavior, let users override
it easily.