From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [bug]org-mode with flyspell-mode freezes emacs Date: Wed, 18 Oct 2006 00:38:32 +0200 Message-ID: <85zmbumutz.fsf@lola.goethe.zz> References: <17716.23811.425109.929050@kahikatea.snap.net.nz> <4d08b83ef805bfb7828085d8e1f67daf@science.uva.nl> <9dc86f9fd2c6b2ad03093cb1e92e6aa6@science.uva.nl> <4535178C.8050003@gmx.at> <45355489.3080503@student.lu.se> <854pu2oahs.fsf@lola.goethe.zz> <4535587B.8010601@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161124790 10972 80.91.229.2 (17 Oct 2006 22:39:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Oct 2006 22:39:50 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 18 00:39:48 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 1GZxb8-0005BA-W9 for ged-emacs-devel@m.gmane.org; Wed, 18 Oct 2006 00:39:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZxb8-0001YS-Ak for ged-emacs-devel@m.gmane.org; Tue, 17 Oct 2006 18:39:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZxat-0001Vx-Hp for emacs-devel@gnu.org; Tue, 17 Oct 2006 18:39:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZxar-0001SE-Ss for emacs-devel@gnu.org; Tue, 17 Oct 2006 18:39:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZxar-0001Rs-LS for emacs-devel@gnu.org; Tue, 17 Oct 2006 18:39:29 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GZxar-0007Hi-PY for emacs-devel@gnu.org; Tue, 17 Oct 2006 18:39:29 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GZxaq-0004wJ-TG; Tue, 17 Oct 2006 18:39:29 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 2ABAE1C3B771; Wed, 18 Oct 2006 00:38:32 +0200 (CEST) Original-To: Lennart Borgman In-Reply-To: <4535587B.8010601@student.lu.se> (Lennart Borgman's message of "Wed\, 18 Oct 2006 00\:26\:03 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:60843 Archived-At: Lennart Borgman writes: > David Kastrup wrote: >> Lennart Borgman writes: >> >> >>> Stefan Monnier wrote: >>> >>>> - `intangible' is evil. Why do you use it in org-mode? >>>> >>> Why is `intangible' evil? >> >> Because it violates basic assumptions of a loooot of code. It is >> better to use post-command-hook to move the cursor out of forbidden >> areas (and pre-command-hook to figure out from which direction the >> forbidden area was entered, so that one can move out the other >> side): that way, the effect is restricted to the command loop and >> does not cause surprises to normal code. >> > > Thanks, I see. But is there then a reason why not intangible mimics > the behaviour that you describe? Botched-up design. > Is it even possible to look at this as a bug? More like a misfeature. intangible behaves as documented. It is just that the documented behavior can cause a lot of ugly surprises except in very tightly controlled circumstances, since normal movement commands skid on intangible areas like on banana peels. What will some convenience function like "mark-word" do in the presence of intangible? There is really no way to find out from reading its DOC string. You have to read every code line to figure out where it merely calculates cursor distances, and where it tries moving there. And when the circumstances are very tightly controlled so that intangible is not encountered by any function not expecting it, you don't actually need intangible. In my opinion, it might be a good idea to introduce another property (like `unpleasant') which is merely not used as a final resting place in the command loop, at the same time deprecating `intangible', and removing it at some later time. I don't think there is much _reliably_ working code using it around, anyway. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum