GNU bug report logs - #46558
Interaction between font-lock-extend-region-wholelines and font-lock-extend-region-multiline

Previous Next

Package: emacs;

Reported by: sebastien.miquel <at> posteo.eu

Date: Tue, 16 Feb 2021 12:14:02 UTC

Severity: normal

Tags: moreinfo

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46558 in the body.
You can then email your comments to 46558 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46558; Package emacs. (Tue, 16 Feb 2021 12:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to sebastien.miquel <at> posteo.eu:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 16 Feb 2021 12:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sébastien Miquel <sebastien.miquel <at> posteo.eu>
To: bug-gnu-emacs <at> gnu.org
Subject: Interaction between font-lock-extend-region-wholelines and
 font-lock-extend-region-multiline
Date: Tue, 16 Feb 2021 13:13:17 +0100
Hi,

In org-mode, blocks are fontified with the font-lock-multiline
property. When editing the line right before a block, the whole block
is needlessly refontified (use highlight-refontification-mode to
check).

This is because the font-lock-extend-region-wholelines extends the
region to the beginning of the next line, which has the
font-lock-multiline property. Then font-lock-extend-region-multiline
extends the region to the end of the block.

If a second block follows the first one, with no empty line between,
it is refontified as well.

Maybe font-lock-extend-region-multiline should check if the char
right before font-lock-end has the font-lock-multiline property as
well before extending the region. I've tried it, and haven't found any
issue in this use case.

-- 
Sébastien Miquel





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46558; Package emacs. (Fri, 17 Jun 2022 15:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 46558 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sébastien Miquel <sebastien.miquel <at> posteo.eu>
Cc: 46558 <at> debbugs.gnu.org
Subject: Re: bug#46558: Interaction between
 font-lock-extend-region-wholelines and font-lock-extend-region-multiline
Date: Fri, 17 Jun 2022 17:19:52 +0200
Sébastien Miquel <sebastien.miquel <at> posteo.eu> writes:

> Maybe font-lock-extend-region-multiline should check if the char
> right before font-lock-end has the font-lock-multiline property as
> well before extending the region. I've tried it, and haven't found any
> issue in this use case.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Do you have a patch to propose here, by any chance?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 17 Jun 2022 15:21:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46558; Package emacs. (Sun, 19 Jun 2022 12:57:02 GMT) Full text and rfc822 format available.

Message #13 received at 46558 <at> debbugs.gnu.org (full text, mbox):

From: Sébastien Miquel <sebastien.miquel <at> posteo.eu>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46558 <at> debbugs.gnu.org
Subject: Re: bug#46558: Interaction between font-lock-extend-region-wholelines
 and font-lock-extend-region-multiline
Date: Sun, 19 Jun 2022 12:56:24 +0000
[Message part 1 (text/plain, inline)]
Hi,

Lars Ingebrigtsen writes:
> Do you have a patch to propose here, by any chance?

Here's what I had in mind.

-- 
Sébastien Miquel
[0001-Small-fix-in-font-lock-extend-region-multiline-Bug-4.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46558; Package emacs. (Sun, 19 Jun 2022 13:14:01 GMT) Full text and rfc822 format available.

Message #16 received at 46558 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sébastien Miquel <sebastien.miquel <at> posteo.eu>
Cc: 46558 <at> debbugs.gnu.org
Subject: Re: bug#46558: Interaction between
 font-lock-extend-region-wholelines and font-lock-extend-region-multiline
Date: Sun, 19 Jun 2022 15:13:01 +0200
Sébastien Miquel <sebastien.miquel <at> posteo.eu> writes:

>> Do you have a patch to propose here, by any chance?
>
> Here's what I had in mind.

Thanks; pushed to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 46558 <at> debbugs.gnu.org and sebastien.miquel <at> posteo.eu Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 19 Jun 2022 13:14:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 18 Jul 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 281 days ago.

Previous Next


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