GNU bug report logs - #19796
25.0.50; Regression: highlight-lines-matching-regexp can't re-highlight the same string

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Sat, 7 Feb 2015 06:58:02 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 19796 in the body.
You can then email your comments to 19796 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#19796; Package emacs. (Sat, 07 Feb 2015 06:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 07 Feb 2015 06:58:02 GMT) Full text and rfc822 format available.

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

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 Regression: highlight-lines-matching-regexp can't re-highlight the
 same string
Date: Fri, 06 Feb 2015 22:57:30 -0800
Hi.

The following commit broke some hi-lock functionality:

commit 6711a21f1125c0047c56eb266eb374c1ec90a967
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date:   Wed May 28 23:45:29 2014 -0400

    ...
    * lisp/hi-lock.el (hi-lock-mode, hi-lock-unface-buffer)
    (hi-lock-set-pattern, hi-lock-set-file-patterns): Use font-lock-flush.
    ...


Recipe to reproduce:

1. seq 1000 > /tmp/dat
2. emacs -Q /tmp/dat
3. M-s h l 7       (highlight all lines matching "7")
4. M-s h u [enter] (un-highlight the default, "7" in this case)
5. M-s h l 7       (highlight all lines matching "7" again)

After that commit, nothing is highlighted anymore





Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 11 Feb 2015 21:43:01 GMT) Full text and rfc822 format available.

Notification sent to Dima Kogan <dima <at> secretsauce.net>:
bug acknowledged by developer. (Wed, 11 Feb 2015 21:43:02 GMT) Full text and rfc822 format available.

Message #10 received at 19796-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 19796-done <at> debbugs.gnu.org
Subject: Re: bug#19796: 25.0.50;
 Regression: highlight-lines-matching-regexp can't re-highlight the
 same string
Date: Wed, 11 Feb 2015 16:41:41 -0500
> 1. seq 1000 > /tmp/dat
> 2. emacs -Q /tmp/dat
> 3. M-s h l 7       (highlight all lines matching "7")
> 4. M-s h u [enter] (un-highlight the default, "7" in this case)
> 5. M-s h l 7       (highlight all lines matching "7" again)

> After that commit, nothing is highlighted anymore

Yuck, the old behavior looked right but was subtly wrong (the
highlighting at step 5 was done via font-lock whereas it was done with
overlays at step 3), and the recent change made the difference "more
visible" ;-)

The real problem is in font-lock, I think, but I don't have the courage
to fix it now, so I've installed a workaround that I hope will be sufficient.


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 Mar 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 104 days ago.

Previous Next


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