emacs-devel
[Top][All Lists]
Advanced

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

Re: Proposal: `buffer-offer-save' be made a permanent-local


From: MON KEY
Subject: Re: Proposal: `buffer-offer-save' be made a permanent-local
Date: Wed, 16 Jun 2010 03:21:41 -0400

On Mon, Jun 14, 2010 at 5:18 AM, Lennart Borgman
<address@hidden> wrote:
> 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

Thanks, but that didn't really help. :-)

I guess I don't understand why this is the distinction being made and
in this manner.  It seems conflated to further mix up a variable's
scope with its extent in this way.

What I thought I knew:

Emacs/Emacs-lisp has variables that are always global.

A variable is an object accessible as symbol instantiated via defvar,
defconstant, set, setq, fset, etc.

These can be dynamically bound via let, let*,lambda, condition-case
etc. and have dynamic scope.  How a variable value exists(or doesn't)
does not affect its scope.

Whether a variable is bound as a property of a buffer (e.g. with a
specific locality/place) it still has a scope which the standard
operators can access, bind, and void.

These conventional behaviours have been made to act exceptionally if a
variable is both buffer-local and permanent (e.g. by making the
variable locally buffer immutable).

As Stefan hinted, and as I concurred, I'm not at all adverse/concerned
with variables being permanent-local it's the selectivity that bothers
me b/c it guarantees difficulty for others in knowing the if, when, how, why a
variable is being acted upon (or isn't).

It seems unclean to make some variables permanent local and others not
esp. as we don't have a specification to help resolve an ambiguity
(which BTW is why I believe some concern over this is justified). Are
the rules for variable buffer locality arbitrary? Where is the
documentation for proper/idiomatic use of permanent-local variable.  I
ask this because I'm unable to find a reference to the
`permanent-local-hook' though it _does_ exist.

What should others understand about the proposed change?

What specific problems does it solve?

What happens if the proposed change is not implemented.

How is it envisioned it shall be implemented in solving those
problems?

Where is some code to illustrate an idiomatic use-case for the
proposed change?.

--
/s_P\



reply via email to

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