GNU bug report logs - #6241
Please make buffer-offer-save permanent local

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Fri, 21 May 2010 17:35:01 UTC

Severity: minor

Tags: fixed

Merged with 13792

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #33 received at 6241 <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: MON KEY <monkey <at> sandpframing.com>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, 6241 <at> debbugs.gnu.org,
	Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#6241: Please make buffer-offer-save permanent local
Date: Fri, 28 May 2010 00:25:20 +0200
On Thu, May 27, 2010 at 11:56 PM, MON KEY <monkey <at> sandpframing.com> wrote:
>
> Many major mode hooks run `kill-all-local-variables' implicilty.


All of them should.


> What you may have missed is that a good deal of them also invoke it
> _explicitly_ when switching.


That is because they were written before define-derived-mode was available.


> IMHO locals like this _should_ be killed when changing major mode.


Most buffer local variables should be killed normally because they
more or less belong to the major modes.

However or buffer local variables are not the same type of creatures.
Some of them do not belong to the major mode. They rather belong to
the buffer contents (or are a state in the user interaction with the
buffer, like editor emulator state).

I think that `buffer-offer-save' belongs to the content. It protect
the contents from being thrown away by the user of mistake. And that
is a very important function, far above major modes need. Don't you
think so?

There might be exceptions when `buffer-offer-save' should be killed
when the major mode is changed, but these can easily be fixed if we
find such cases.


> FWIW my impression is that _you_ need this variable to be
> permanent-local w/re mumamo.


This has nothing to do with mumamo, but I am aware of the different
forms of buffer local variables because of mumamo.


> I also suspect that there are (or will be) modes which take advantage
> of asynchrous processing in conjunction with a major-mode which will
> now have to worry about unsetting this variable regardless of whether
> the results of the asynchrounous process succeed or not...


Please explain more exactly in what situations and why you think they
want to kill `buffer-offer-save'. If you do that we can fix such
cases. I can't think of any myself at the moment.


> Likewise, I imagine there are some immediate corner cases where
> tramp'd buffers wouldn't appreciate buffer-offer-save being permanent
> local.


Same question as above. Exactly when and why?


> Should you insist that this change be made please ask on emacs-devel
> before asserting that:
>
>  "I think everyone expects that."
>
> I don't.


Of course, if you can be more specific in your concerns. I just don't
understand them yet.




This bug report was last modified 12 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.