emacs-devel
[Top][All Lists]
Advanced

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

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


From: David Kastrup
Subject: Re: [bug]org-mode with flyspell-mode freezes emacs
Date: Wed, 18 Oct 2006 00:38:32 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Lennart Borgman <address@hidden> writes:

> David Kastrup wrote:
>> Lennart Borgman <address@hidden> 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




reply via email to

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