From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Dominik Newsgroups: gmane.emacs.devel Subject: Re: [bug]org-mode with flyspell-mode freezes emacs Date: Tue, 17 Oct 2006 15:13:11 +0200 Message-ID: <9dc86f9fd2c6b2ad03093cb1e92e6aa6@science.uva.nl> References: <17716.23811.425109.929050@kahikatea.snap.net.nz> <4d08b83ef805bfb7828085d8e1f67daf@science.uva.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161091300 23797 80.91.229.2 (17 Oct 2006 13:21:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Oct 2006 13:21:40 +0000 (UTC) Cc: Nick Roberts , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 17 15:21:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GZosl-0004UC-Eu for ged-emacs-devel@m.gmane.org; Tue, 17 Oct 2006 15:21:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZosk-0005Hd-IA for ged-emacs-devel@m.gmane.org; Tue, 17 Oct 2006 09:21:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZol0-0005Tk-EQ for emacs-devel@gnu.org; Tue, 17 Oct 2006 09:13:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZokx-0005Py-DI for emacs-devel@gnu.org; Tue, 17 Oct 2006 09:13:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZokx-0005Pq-3l for emacs-devel@gnu.org; Tue, 17 Oct 2006 09:13:19 -0400 Original-Received: from [146.50.4.51] (helo=imap.science.uva.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GZouH-0007hI-MB; Tue, 17 Oct 2006 09:22:57 -0400 Original-Received: from nb-dominik2.science.uva.nl [146.50.22.167] by imap.science.uva.nl with ESMTP (sendmail 8.11.6p2/config 11.38). id k9HDDFq15944; Tue, 17 Oct 2006 15:13:15 +0200 X-Organisation: Faculty of Science, University of Amsterdam, The Netherlands X-URL: http://www.science.uva.nl/ In-Reply-To: <4d08b83ef805bfb7828085d8e1f67daf@science.uva.nl> Original-To: Carsten Dominik X-Mailer: Apple Mail (2.624) X-Virus-Scanned: by amavisd-new X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60817 Archived-At: 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 > > something]] > > 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) > > or > > 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