emacs-devel
[Top][All Lists]
Advanced

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

RE: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits fu


From: Drew Adams
Subject: RE: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits functionality
Date: Thu, 24 Mar 2016 07:31:46 -0700 (PDT)

> > One could argue that the surprise is your fault. ;-)  You asked
> > to widen to the full buffer, and that's what you got.  Presumably,
> > if you ask for that then you want the whole buffer (whatever that
> > might be), and in this context presumably you know what that whole
> > buffer is (an Info file).  If not, you shouldn't be using `C-x n w'.
> 
> Just how, then, should a user undo the result of narrow-to-region, which
> is a user-level operation?  Even if it's one that's disabled by default.

Good question.  Depends what you mean by "undo" it.  Depends
what the user wants.

In vanilla Emacs, so far, `C-x n w' undoes a buffer restriction,
restoring the full buffer.  That's clear.

But if you mean something other than that as "undo" then you need
to specify just what that other is.

FWIW, my library `zones.el' has this very question at heart, and
it provides some other useful meanings of "undo" for narrowing.
I have no problem with vanilla Emacs adding additional ones.

What I question is co-opting `widen' to redefine it so that it
performs only one particular sort of new kind of "undo" for
narrowing.

Instead, please consider any forms of "undo" for narrowing, other
than widening to the full buffer, to be changes to a different
narrowing.  As long as the result is a buffer restriction (a
narrowing), such a change is still narrowing.

FWIW, zones.el provides for multiple narrowings, and "undoing"
from one to another.

The first title in the doc for this is "Problem: Narrowing is
Fine-Grained, But Widening Is Not".  So I think I understand
the use of having other kinds of undo, besides just `C-x n w'.

(https://www.emacswiki.org/emacs/MultipleNarrowings)

The Emacs world is a wider place than what you have in mind
for one form of widening, whatever that might be.  Your form
can line up with any number of others - they are all narrowings
(buffer restrictions), and I doubt that any one of them should
be privileged to be considered "the hard" widening.



reply via email to

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