all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cperl-mode "fatigue"
@ 2002-10-28 22:43 Da Witch
  2002-10-28 23:58 ` Matt Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Da Witch @ 2002-10-28 22:43 UTC (permalink / raw)





I've noticed that sometimes, especially after I have been editing a
buffer for a long time, or if I try to use "qw( ... )", cperl-mode
begins to show signs of "fatigue" (for lack of a better word).  For
example, syntax-based highlighting stops, and everything I type
appears in the default foreground text color; or else everything
appears in the color reserved for quoted strings.

Is there a way to fix this problem?

Thanks,

hk


PS: How can I figure out what version of cperl-mode I have?  Our
system has the cperl-mode.elc file only, and I don't know how to
determine the version from it.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cperl-mode "fatigue"
  2002-10-28 22:43 cperl-mode "fatigue" Da Witch
@ 2002-10-28 23:58 ` Matt Armstrong
  2002-10-29  8:51 ` Klaus Zeitler
  2002-10-29 16:08 ` Stefan Monnier <foo@acm.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Matt Armstrong @ 2002-10-28 23:58 UTC (permalink / raw)


In article <apkei9$j2q$1@reader1.panix.com>, Da Witch wrote:
> 
> 
> 
> I've noticed that sometimes, especially after I have been editing a
> buffer for a long time, or if I try to use "qw( ... )", cperl-mode
> begins to show signs of "fatigue" (for lack of a better word).  For
> example, syntax-based highlighting stops, and everything I type
> appears in the default foreground text color; or else everything
> appears in the color reserved for quoted strings.
>
> Is there a way to fix this problem?

I see the same kind of thing.  I just make note of the line I'm on and
C-x C-v <ret> to reload the file again.

If it is annoying enough to you, it should be possible to write a
function to do that for you.  Call it cperl-rest or something.


> PS: How can I figure out what version of cperl-mode I have?  Our
> system has the cperl-mode.elc file only, and I don't know how to
> determine the version from it.

M-x describe-variable <ret> cperl-version

But that may not be present.  I see that in Emacs 21's cperl-mode.el.


-- 
matt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cperl-mode "fatigue"
  2002-10-28 22:43 cperl-mode "fatigue" Da Witch
  2002-10-28 23:58 ` Matt Armstrong
@ 2002-10-29  8:51 ` Klaus Zeitler
  2002-10-29 13:31   ` Da Witch
  2002-10-29 16:08 ` Stefan Monnier <foo@acm.com>
  2 siblings, 1 reply; 8+ messages in thread
From: Klaus Zeitler @ 2002-10-29  8:51 UTC (permalink / raw)


>>>>> "Da" == Da Witch <heather710101@yahoo.com> writes:
    Da> 
    Da> I've noticed that sometimes, especially after I have been editing a
    Da> buffer for a long time, or if I try to use "qw( ... )", cperl-mode
    Da> begins to show signs of "fatigue" (for lack of a better word).  For
    Da> example, syntax-based highlighting stops, and everything I type
    Da> appears in the default foreground text color; or else everything
    Da> appears in the color reserved for quoted strings.
    Da> 
I had this problem every once in a while with all emacs 20 versions, but
haven't observed it anymore since I switched to emacs 21. I always thought
that this is a font-lock problem. From emacs 21.1 on I've used jit-lock
(instead of fast-lock) as font-lock support mode.

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Bill Gates, Chairman and CEO of Microsoft Corporation, announced that
the latest version of their Windows operating system, Windows 2000,
would be delayed until the second quarter of 1901. No reason was given.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cperl-mode "fatigue"
  2002-10-29  8:51 ` Klaus Zeitler
@ 2002-10-29 13:31   ` Da Witch
       [not found]     ` <heather710101@yahoo.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Da Witch @ 2002-10-29 13:31 UTC (permalink / raw)


In <q5gznsx1vcc.fsf@lucent.com> Klaus Zeitler <kzeitler+usenet@sfsw51.lucent.com> writes:

>>>>>> "Da" == Da Witch <heather710101@yahoo.com> writes:
>    Da> 
>    Da> I've noticed that sometimes, especially after I have been editing a
>    Da> buffer for a long time, or if I try to use "qw( ... )", cperl-mode
>    Da> begins to show signs of "fatigue" (for lack of a better word).  For
>    Da> example, syntax-based highlighting stops, and everything I type
>    Da> appears in the default foreground text color; or else everything
>    Da> appears in the color reserved for quoted strings.
>    Da> 
>I had this problem every once in a while with all emacs 20 versions, but
>haven't observed it anymore since I switched to emacs 21. I always thought
>that this is a font-lock problem. From emacs 21.1 on I've used jit-lock
>(instead of fast-lock) as font-lock support mode.

Thanks (and to Matt too).  Nothing comes up when I type jit-lock into
Apropos, but I am using v20.7.2.  Does jit-lock come standard with
v21.1?  If not, where can I get it?

Thanks,

h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cperl-mode "fatigue"
       [not found]     ` <heather710101@yahoo.com>
@ 2002-10-29 13:51       ` Peter S Galbraith
  0 siblings, 0 replies; 8+ messages in thread
From: Peter S Galbraith @ 2002-10-29 13:51 UTC (permalink / raw)
  Cc: help-gnu-emacs

Da Witch <heather710101@yahoo.com> wrote:

> In <q5gznsx1vcc.fsf@lucent.com> Klaus Zeitler <kzeitler+usenet@sfsw51.lucent.com> writes:
> 
> >>>>>> "Da" == Da Witch <heather710101@yahoo.com> writes:
> >    Da> 
> >    Da> I've noticed that sometimes, especially after I have been editing a
> >    Da> buffer for a long time, or if I try to use "qw( ... )", cperl-mode
> >    Da> begins to show signs of "fatigue" (for lack of a better word).  For
> >    Da> example, syntax-based highlighting stops, and everything I type
> >    Da> appears in the default foreground text color; or else everything
> >    Da> appears in the color reserved for quoted strings.
> >    Da> 
> >I had this problem every once in a while with all emacs 20 versions, but
> >haven't observed it anymore since I switched to emacs 21. I always thought
> >that this is a font-lock problem.

Whenever font-lock stops working in a buffer, it's a very good bet that
a font-lock error occurs.  Perhaps the mode uses functions to return
matches and one of them is not behaviour correctly under certain
conditions.  Might be hard to track down (I'm not volunteering either).

> >                                  From emacs 21.1 on I've used jit-lock
> >(instead of fast-lock) as font-lock support mode.
> 
> Thanks (and to Matt too).  Nothing comes up when I type jit-lock into
> Apropos, but I am using v20.7.2.  Does jit-lock come standard with
> v21.1?  If not, where can I get it?

Yes, it's the default in emacs-21.2:

font-lock-support-mode's value is jit-lock-mode

Peter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cperl-mode "fatigue"
  2002-10-28 22:43 cperl-mode "fatigue" Da Witch
  2002-10-28 23:58 ` Matt Armstrong
  2002-10-29  8:51 ` Klaus Zeitler
@ 2002-10-29 16:08 ` Stefan Monnier <foo@acm.com>
  2002-10-29 21:57   ` Ilya Zakharevich
  2 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-10-29 16:08 UTC (permalink / raw)


>>>>> "Da" == Da Witch <heather710101@yahoo.com> writes:
> I've noticed that sometimes, especially after I have been editing a
> buffer for a long time, or if I try to use "qw( ... )", cperl-mode
> begins to show signs of "fatigue" (for lack of a better word).  For
> example, syntax-based highlighting stops, and everything I type
> appears in the default foreground text color; or else everything
> appears in the color reserved for quoted strings.

It's probably a bug in CPerl which raises a signal during font-locking
and which in turn turns off on-the-fly fontification.
Upgrading cperl-mode might/should fix it.


        Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cperl-mode "fatigue"
  2002-10-29 16:08 ` Stefan Monnier <foo@acm.com>
@ 2002-10-29 21:57   ` Ilya Zakharevich
  2002-10-30 16:08     ` Stefan Monnier <foo@acm.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Ilya Zakharevich @ 2002-10-29 21:57 UTC (permalink / raw)


[A complimentary Cc of this posting was sent to
Stefan Monnier 
<foo@acm.com>], who wrote in article <5ld6ptz0r8.fsf@rum.cs.yale.edu>:
> >>>>> "Da" == Da Witch <heather710101@yahoo.com> writes:
> > I've noticed that sometimes, especially after I have been editing a
> > buffer for a long time, or if I try to use "qw( ... )", cperl-mode
> > begins to show signs of "fatigue" (for lack of a better word).  For
> > example, syntax-based highlighting stops, and everything I type
> > appears in the default foreground text color; or else everything
> > appears in the color reserved for quoted strings.
> 
> It's probably a bug in CPerl which raises a signal during font-locking
> and which in turn turns off on-the-fly fontification.

And due to an incredible design flaw, no message about this is emited.
This (and other flaws in the debugger w.r.t. "wrapping" exceptions)
makes debugging the situation *very* hard.  Several years ago I fixed
one of such problems; it took *hours* to find the problematic place.

> Upgrading cperl-mode might/should fix it.

The fix was available all these years, but Emacs was shipping with a
broken version nevertheless.  I think one in 21 is updated at last;
but of course, one cannot exclude a possibility of another bug.

BTW, to "restart", M-x normal-mode is enough.

Hope this helps,
Ilya

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cperl-mode "fatigue"
  2002-10-29 21:57   ` Ilya Zakharevich
@ 2002-10-30 16:08     ` Stefan Monnier <foo@acm.com>
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-10-30 16:08 UTC (permalink / raw)


>> It's probably a bug in CPerl which raises a signal during font-locking
>> and which in turn turns off on-the-fly fontification.
> And due to an incredible design flaw, no message about this is emitted.
> This (and other flaws in the debugger w.r.t. "wrapping" exceptions)
> makes debugging the situation *very* hard.  Several years ago I fixed
> one of such problems; it took *hours* to find the problematic place.

I doubt it's a design flaw (it's not that hard to fix).
But yes, debugging font-lock patterns can sometimes be very frustrating
and even more so with Emacs-21's jit-lock mode.


        Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-10-30 16:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-28 22:43 cperl-mode "fatigue" Da Witch
2002-10-28 23:58 ` Matt Armstrong
2002-10-29  8:51 ` Klaus Zeitler
2002-10-29 13:31   ` Da Witch
     [not found]     ` <heather710101@yahoo.com>
2002-10-29 13:51       ` Peter S Galbraith
2002-10-29 16:08 ` Stefan Monnier <foo@acm.com>
2002-10-29 21:57   ` Ilya Zakharevich
2002-10-30 16:08     ` Stefan Monnier <foo@acm.com>

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.