unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: MON KEY <monkey@sandpframing.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Proposal: `buffer-offer-save' be made a permanent-local
Date: Mon, 14 Jun 2010 11:18:02 +0200	[thread overview]
Message-ID: <AANLkTilnXROAvc6lBymV7wgaIWkRJPvt-1GGwc6XDCWQ@mail.gmail.com> (raw)
In-Reply-To: <AANLkTiktoOeEjyo_qWR33OmoXNXmr5hT6wDYIzVDxNr3@mail.gmail.com>

On Mon, Jun 14, 2010 at 10:48 AM, MON KEY <monkey@sandpframing.com> wrote:
>
> In this thread below RMS establishes a clear recipe for how he
> suggest to address exactly this sort of issue:
>
> ,----
> |  Here's a possible implementation.
> |
> |  1. Put a property on hook variables to identify them for this
> |  special processing.
> |
> |  2. Put another property (as you suggested) on hook functions
> |  to indicate they should be preserved.
> |
> |  3. Now it is possible for kill-all-local-variables
> |  to identify hook variables, scan their local values,
> |  and preserve specific hooks.
> `----
>  http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg00366.html


No. This is for a more complicated problem.

It might be more easy to understand with a small picture. In this
discussion we can think of variable scope versus buffers in a
hierarchy like this:

1) * global variable values
2) ** buffer local variable that are permanently local
3) *** buffer local variable that are not permantly local

3, the lowest level are variables associated with major modes. If
there are several major modes in a buffer those variable will change
with the point in the buffer.

2 are the buffer level. Those variable are associated with the buffer
instead of the major mode. If the major mode is changed the
permanently local does not change. They never change with the point in
the buffer.


The situation that RMS tried to handle was when a hook variable was
local and some members of it should be independent of the major mode,
but not the whole list of variables in the hook. This is something in
between 2 and 3 above.


> | I think it is very unclean to dynamically change `permanent-local'
> | properties.  That's the sort of thing that we are sure to regret.


That is what we are trying to avoid by making buffer-offer-save
permanently local.


> So, what is wrong with the solution RMS proposed.


Nothing, but it does not fit here.



  reply	other threads:[~2010-06-14  9:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-14  0:17 Proposal: `buffer-offer-save' be made a permanent-local MON KEY
2010-06-14  0:59 ` Lennart Borgman
2010-06-14  1:00 ` Stefan Monnier
2010-06-14  8:48   ` MON KEY
2010-06-14  9:18     ` Lennart Borgman [this message]
2010-06-16  7:21       ` MON KEY
2010-06-16 11:39         ` Lennart Borgman
2010-06-16 22:02           ` MON KEY
2010-06-16 23:11             ` Lennart Borgman
2010-06-28  4:39               ` MON KEY
2010-06-14 13:38     ` Stefan Monnier
2010-06-17  4:15   ` Kevin Rodgers
2010-06-17 20:19     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2010-06-17 21:36 MON KEY
2010-06-17 22:25 ` Lennart Borgman
2010-06-18  0:13   ` MON KEY
2010-06-18  0:33     ` Lennart Borgman
2010-06-18  2:53       ` MON KEY
2010-06-19 15:20         ` Lennart Borgman
2010-06-20  5:05           ` MON KEY

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=AANLkTilnXROAvc6lBymV7wgaIWkRJPvt-1GGwc6XDCWQ@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monkey@sandpframing.com \
    --cc=monnier@iro.umontreal.ca \
    /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).