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: Andreas Röhler
Subject: Re: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits functionality
Date: Wed, 23 Mar 2016 14:02:31 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0



On 23.03.2016 12:58, Vitalie Spinu wrote:
On Wed, Mar 23 2016 08:16, Andreas Röhler wrote:
preventing unwanted widen instead seems the way to go.
That's precisely what extra limit do. Prevent unwanted widen. How do you propose
to implement that?

I see 4 ways to go about it:

   1) Add an extra prog-widen and teach all modes out there to use it in 
contexts
      like syntax-parsing, indentation, font-lock and who know what else. A half
      backed version of this in already part of emacs.

   2) Have low level restrictions directly in `widen` and a macro
      `with-widen-limit` that multi-modes can use. This is the current patch.

   3) Have two types of narrowing (soft and hard). This is harder to implement
      but has the benefit that it can be used in non-transient situations like
      Info mode.

   4) Bring widen to elisp and allow minor modes (and Info mode) advice widen in
      whatever way they see.

I think (1) is a bad idea. (4) is simplest and very general. (3) might be useful
but it's hard. (2) is implemented to get rid of (1).

I proposed (4) very early in the thread, but didn't hear much support for
it. There are only three trivial usages of Fwiden in C code. Bringing `narrow`
to elisp is equally easy.

   Vitalie

Hi Vitali,

may you point me to spot/bug where widen goes wrong?

Thanks,

Andreas



reply via email to

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