emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug #22983 (syntax-ppss returns wrong result) is still open. Could w


From: Clément Pit--Claudel
Subject: Re: Bug #22983 (syntax-ppss returns wrong result) is still open. Could we fix it before the release, please.
Date: Sun, 12 Jun 2016 21:44:35 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 2016-06-12 18:58, Dmitry Gutov wrote:
>> I have encountered no such problems in over 15 years of hacking
>> Emacs. I think you're seeing problems somewhere and blaming 
>> narrow-to-region/widen, when the real problem is somewhere else.
> 
> It's been a known problem for a while, and it has come up in multiple
> discussions over the last years.
> 
> The "real problem" is a matter of perspective. Some might argue that
> trying to use narrowing at all, for any purpose, is a bad idea, and
> then, of course, the right choice would be to use something else.

I can share one instance of running into issues with narrow-to-region. I was 
implementing a simple ‘presenter’ mode, such that special comments were used to 
delimit ‘slides’. The mode functioned by narrowing the buffer to regions 
delimited by these special comments. It was a very convenient way to page 
through code in front of an audience.

Unfortunately, this approach was not robust. I ran into issues with modes using 
(point-min) and (point-max) without widening, and thereby misplacing overlays. 
In the end things kept breaking, and I ended up implementing the same feature 
using two overlays with an invisible property, hiding everything before 
(respectively after) the region being shown. It was a pain.

Not sure whether this is a useful contribution :) In any case, that's one 
problem I ran into.

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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