GNU bug report logs - #6343
Log-edit font lock changes lead to loop

Previous Next

Package: emacs;

Reported by: Chong Yidong <cyd <at> stupidchicken.com>

Date: Thu, 3 Jun 2010 17:19:02 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.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 6343 in the body.
You can then email your comments to 6343 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 owner <at> debbugs.gnu.org, dann <at> ics.uci.edu, bug-gnu-emacs <at> gnu.org:
bug#6343; Package emacs. (Thu, 03 Jun 2010 17:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
New bug report received and forwarded. Copy sent to dann <at> ics.uci.edu, bug-gnu-emacs <at> gnu.org. (Thu, 03 Jun 2010 17:19:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Log-edit font lock changes lead to loop
Date: Thu, 03 Jun 2010 13:17:52 -0400
I had the following text in my kill ring:

  * cedet/semantic/lex-spp.el
  (semantic-lex-spp-table-write-slot-value): Instead of erroring on
  invalid values during save, just save a nil (Bug#6324).

From VC-dir, I marked some files and typed "v" to commit them.  In the
log edit buffer, I type "C-y" to attempt to yank into the buffer.  Emacs
became unresponsive to all keyboard input.  According to the debugger,
Emacs is looping on `jit-lock-fontify-now'.


If I revert the following change, the problem goes away.

22010-06-02  Dan Nicolaescu  <dann <at> ics.uci.edu>

  * log-edit.el (log-edit-font-lock-keywords): Make group 4 match lax.

This is on an up-to-date trunk build:

GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-03 on furry




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6343; Package emacs. (Thu, 03 Jun 2010 17:37:02 GMT) Full text and rfc822 format available.

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

From: Dan Nicolaescu <dann <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 6343 <at> debbugs.gnu.org
Subject: Re: bug#6343: Log-edit font lock changes lead to loop
Date: Thu, 03 Jun 2010 13:36:50 -0400
Chong Yidong <cyd <at> stupidchicken.com> writes:

> I had the following text in my kill ring:
>
>   * cedet/semantic/lex-spp.el
>   (semantic-lex-spp-table-write-slot-value): Instead of erroring on
>   invalid values during save, just save a nil (Bug#6324).
>
> From VC-dir, I marked some files and typed "v" to commit them.  In the
> log edit buffer, I type "C-y" to attempt to yank into the buffer.  Emacs
> became unresponsive to all keyboard input.  According to the debugger,
> Emacs is looping on `jit-lock-fontify-now'.
>
>
> If I revert the following change, the problem goes away.
>
> 22010-06-02  Dan Nicolaescu  <dann <at> ics.uci.edu>
>
>   * log-edit.el (log-edit-font-lock-keywords): Make group 4 match lax.

The motivation for the above change was that the *Messages* would get a lot of errors of the form:
(from memory, so the wording is not exactly this)

Error in redisplay, could not match (4 font-lock-warning-face)





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6343; Package emacs. (Fri, 04 Jun 2010 01:42:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 6343 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#6343: Log-edit font lock changes lead to loop
Date: Fri, 4 Jun 2010 03:40:54 +0200
On Thu, Jun 3, 2010 at 19:17, Chong Yidong <cyd <at> stupidchicken.com> wrote:

> In the
> log edit buffer, I type "C-y" to attempt to yank into the buffer.  Emacs
> became unresponsive to all keyboard input.

I've seen the same problem just by typing

  bla bla blah

then moving the point to the beginning of line and trying to add
"somefile: ", i.e.

 somefile[ ]blah blah blah

[ ] marks the point. Emacs blocks when trying to type `:'.

> If I revert the following change, the problem goes away.

Same here.

    Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6343; Package emacs. (Fri, 04 Jun 2010 02:14:01 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 6343 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#6343: Log-edit font lock changes lead to loop
Date: Fri, 4 Jun 2010 04:12:47 +0200
On Fri, Jun 4, 2010 at 3:40 AM, Juanma Barranquero <lekktu <at> gmail.com> wrote:
> On Thu, Jun 3, 2010 at 19:17, Chong Yidong <cyd <at> stupidchicken.com> wrote:
>
>> In the
>> log edit buffer, I type "C-y" to attempt to yank into the buffer.  Emacs
>> became unresponsive to all keyboard input.
>
> I've seen the same problem just by typing

A little bit off-topic: you mean you can't even stop with C-g?

How do you normally handle that? (I put some limit on all font lock
loops in my code ... ;-) )




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6343; Package emacs. (Fri, 04 Jun 2010 10:16:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6343 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#6343: Log-edit font lock changes lead to loop
Date: Fri, 4 Jun 2010 12:15:01 +0200
On Fri, Jun 4, 2010 at 04:12, Lennart Borgman <lennart.borgman <at> gmail.com> wrote:

> A little bit off-topic: you mean you can't even stop with C-g?

C-g acts weird. It stops, sort of, but then moving around makes Emacs
loop again.

> How do you normally handle that? (I put some limit on all font lock
> loops in my code ... ;-) )

You'll have to be a bit more specific.

    Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6343; Package emacs. (Fri, 04 Jun 2010 10:35:02 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 6343 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#6343: Log-edit font lock changes lead to loop
Date: Fri, 4 Jun 2010 12:34:15 +0200
On Fri, Jun 4, 2010 at 12:15 PM, Juanma Barranquero <lekktu <at> gmail.com> wrote:
> On Fri, Jun 4, 2010 at 04:12, Lennart Borgman <lennart.borgman <at> gmail.com> wrote:
>
>> A little bit off-topic: you mean you can't even stop with C-g?
>
> C-g acts weird. It stops, sort of, but then moving around makes Emacs
> loop again.


I did not notice that it stops first. Strange.


>> How do you normally handle that? (I put some limit on all font lock
>> loops in my code ... ;-) )
>
> You'll have to be a bit more specific.


I just do something like this in case I make a stupid error somewhere:

(defsubst visual-indent-while (limit counter where)
  (let ((count (symbol-value counter)))
    (if (= count limit)
        (progn
          (message "Reached (while limit=%s, where=%s)" limit where)
          nil)
      (set counter (1+ count)))))

        (while (and (visual-indent-while 200 'n-while
"visual-indent-jit-lock-fun")
                    (< (point) bound)) ;; Max bound = (point-max)




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Tue, 12 Jul 2011 08:11:02 GMT) Full text and rfc822 format available.

Notification sent to Chong Yidong <cyd <at> stupidchicken.com>:
bug acknowledged by developer. (Tue, 12 Jul 2011 08:11:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 6343-done <at> debbugs.gnu.org
Subject: Re: bug#6343: Log-edit font lock changes lead to loop
Date: Tue, 12 Jul 2011 04:10:03 -0400
Looks like this was fixed by your 2010-06-12 change to log-edit.




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

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

Previous Next


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