unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: MON KEY <monkey@sandpframing.com>
Cc: Juanma Barranquero <lekktu@gmail.com>, 6241@debbugs.gnu.org
Subject: bug#6241: Please make buffer-offer-save permanent local
Date: Fri, 28 May 2010 00:25:20 +0200	[thread overview]
Message-ID: <AANLkTinWI2Q-LdLGycrt-4t4uDXvn0rcdt12DaoEKTNL@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikFfZHv16p40qwZVferRAhRPj8udUbIZpVp4gAL@mail.gmail.com>

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	other threads:[~2010-05-27 22:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 17:33 bug#6241: Please make buffer-offer-save permanent local Lennart Borgman
2010-05-25 16:49 ` Stefan Monnier
2010-05-25 17:24   ` Juanma Barranquero
2010-05-25 18:09     ` Stefan Monnier
2010-05-25 18:53       ` Lennart Borgman
2010-05-27  1:28 ` MON KEY
2010-05-27  1:35   ` Lennart Borgman
2010-05-27 21:56     ` MON KEY
2010-05-27 22:25       ` Lennart Borgman [this message]
2010-05-28  0:27         ` Stefan Monnier
2010-05-28  0:39           ` Lennart Borgman
2011-07-13 21:59             ` Lars Magne Ingebrigtsen
2011-07-16 19:02               ` Stefan Monnier
2011-07-16 20:00                 ` Lars Magne Ingebrigtsen
2010-05-28  4:38           ` MON KEY
2010-05-28  4:48         ` MON KEY
2010-05-28 10:39           ` Lennart Borgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinWI2Q-LdLGycrt-4t4uDXvn0rcdt12DaoEKTNL@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=6241@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monkey@sandpframing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).