GNU bug report logs - #56682
Fix the long lines font locking related slowdowns

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Thu, 21 Jul 2022 18:01:01 UTC

Severity: normal

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56682 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, akrl <at> sdf.org
Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing.
Date: Thu, 09 Feb 2023 20:47:11 +0000
>> Indeed, but returning the label would defeat the purpose of the tool. 
>> If a program can by itself determine that it is in a labeled narrowing 
>> and get its label, it can escape that narrowing without much ado.
>
> We make a point of documenting these labeled narrowings in great detail, 
> including the labels and their effects.  It makes no sense to describe 
> them and not let programs adapt their behaviors to these situations. 
> Without access to the label, the without-narrowing macro is not useful, 
> so why provide such a macro at all if we really don't want Lisp programs 
> to use it?
>

Why do you think it's not useful?  It is meant to be used for example in a 
function that is called in fontification-functions to temporarily escape 
the narrowing set around fontification-functions, when its author has 
determined that it is safe to do that, like this:

(without-narrowing
  :label long-line-optimizations-in-fontification-functions
  ... some code ...)

IMO, if it becomes possible to escape the narrowing programmatically (IOW, 
without even checking where and why the narrowing has been set), the 
exercise becomes even more pointless.  (Also, in that case it seems to me 
that there is no reason anymore to label these narrowings: their label 
serves no real purpose.)

>> (Note that I'm writing the above to "defend" a feature that I still 
>> believe should better be removed from Emacs.)
>
> I'm not sure what to do with this remark.  I'm not accusing you of 
> anything, so you don't need to justify or defend yourself.  We are 
> discussing what should this feature include assuming that it will be in 
> Emacs.
>

Don't worry, I don't feel accused at all.  I was only expressing that I'm 
reasoning against my intuition here.





This bug report was last modified 2 years and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.