bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6241: Please make buffer-offer-save permanent local


From: Lennart Borgman
Subject: 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@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.





reply via email to

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