[Top][All Lists]

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

Re: How to add pseudo vector types

From: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Fri, 30 Jul 2021 09:35:17 +0300

> From: Richard Stallman <rms@gnu.org>
> Cc: eliz@gnu.org, cpitclaudel@gmail.com,
>       stephen_leake@stephe-leake.org, monnier@iro.umontreal.ca,
>       emacs-devel@gnu.org
> Date: Thu, 29 Jul 2021 20:35:33 -0400
> I suggest we create a way for the program to declare the purpose for
> each instance of narrowing.
> I know of two kinds of purposes for using narrowing.
> 1. To focus operations on syntactic entity in a buffer containing
> other things which are essentially unrelated.  Let's call this "semantic" 
> narrowing.
> For instance, when Rmail narrows the file buffer to just one message,
> that is semantic narrowing.  Whatever is outside the buffer bounds is
> unrelated to parsing the current message.
> 2. To show just part of the text you're looking at.  This is a display
> feature, usually temporary, and would be enabled or disabled by the
> user.  Let's call it "display" narrowing.

So another way of discerning between the two is to distinguish the
"Lisp narrowing" from the "user narrowing".

> I don't think Emacs can tell heuristically which kind of narrowing a
> program is doing.

If we agree that the second kind is only done by the user, then no
heuristic is needed.

But I agree that having this recorded explicitly would be a good idea.
We could provide something similar to prog-indentation-context for
this purpose.

> I propose we create a way for Lisp programs to declare when they do
> semantic narrowing.  They could specify markers for the beginning and
> end of that narrowing.
> Facilities for parsing the buffer should heed semantic narrowing but
> disregard display narrowing.
> Various kinds of semantic narrowing should be able to nest, and
> display narrowing should be able to nest inside semantic narrowings.
> Comments or critiques?

We had a long discussion of a similar proposal, see


At the time, we were unable to come to an agreed-upon design, so this
feature was never implemented in mainline Emacs.  Maybe we should
revisit it now.

reply via email to

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