[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug]org-mode with flyspell-mode freezes emacs

From: Carsten Dominik
Subject: Re: [bug]org-mode with flyspell-mode freezes emacs
Date: Tue, 17 Oct 2006 15:13:11 +0200

And here is one more piece of the puzzle:

I just found out that the emacs-wiki and muse people have been struggling with the same problem. Their fix was to use inhibit-point-motion-hooks. This points into the direction that a search function gets thrown off into a loop by the point-motion-hooks.

- Carsten

On Oct 17, 2006, at 12:57, Carsten Dominik wrote:

On Oct 17, 2006, at 6:33, Nick Roberts wrote:

Anyway, I do now have a backtrace for this problem. Can anyone extract
something useful from this?

If Emacs is hanging, a static backtrace is unlikely to be much use. You need
to follow the instructions in DEBUG:

I have not been able to do this well, the results are very confusing to me, I sometimes end up in the garbage collection, sometimes in search functions like looking-at-1 or search-buffer. So for now I don't have better information on this bug, and I don't have much time for going much further on this.

However, on the Lisp level, I have been able to dig deeper and found the following.

This error happens if flyspell is trying to check a word that is followed by a character with the `intangible' text property. The words in the buffer where Emacs enters an infinite loop look like this


where the "]]" carry both the invisible and the intangible text property. If I remove the intangible text property and only keep invisible, there is no problem and Emacs functions normally. If I remove invisible and keep intangible, the error still happens.

Also when a C backtrace is useful, it usually helps to include lisp backtrace. This is output automatically with `bt' if you run Emacs under GDB from the src directory otherwise you need to source .gdbinit (in the src directory) first.

A typical lisp backtrace looks like this:

Lisp Backtrace:
"flyspell-get-word" (0x3800209)
"flyspell-word-search-backward" (0x1add4e3)
"flyspell-word" (0x3800209)
"flyspell-post-command-hook" (0x0)
"run-hooks" (0x3809c69)


Lisp Backtrace:
"re-search-forward" (0x1b0d1b3)
"flyspell-get-word" (0x3800209)
"flyspell-word-search-backward" (0x1add4e3)
"flyspell-word" (0x3800209)
"flyspell-post-command-hook" (0x0)
"run-hooks" (0x3809c69)

This is strange because it looks like there is an infinite loop on the lisp level, but when I use the lisp debugger, it is the call to accept-process-output where Emacs gets stuck.

I guess as a temporary fix I could remove the intangible text property, since invisible text is handled by the point-motion functions much like intangible text, so it is not really necessary to have both. Is this a correct assessment?

Thanks, and sorry that I cannot be more helpful.

- Carsten

Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

reply via email to

[Prev in Thread] Current Thread [Next in Thread]