emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: moving point over invisible and intangible text


From: Luc Teirlinck
Subject: Re: moving point over invisible and intangible text
Date: Fri, 17 Oct 2003 11:05:13 -0500 (CDT)

Stefan Monnier wrote:

   I'm not aware of this C-f problem.  Could you describe a scenario?

Actually, as I already pointed out in a prior posting, your feature
tales care of that problem too, so really there is no need for the
older feature anymore.  The two ways of taking care of the problem are
nearly identical, but different in a subtle way  (in prior postings
I was misunderstanding the difference).

line1
line2
line3
line4

Again, line2 including trailing newline intangible and invisible.
Result:

line1
line3
line4

Without either of the two features, both C-f and C-n at the beginning
of line2 would move to the beginning of line3, leaving the cursor at
the same place, making it appear to stand still.  Both the feature in
the NEWS and your feature do something about that.  Your
implementation solves both the C-f and C-n problem, the alternative
solution in the NEWS solves the C-f problem, but makes the C-n feature
much worse.

Edebug shows that the crucial difference is a call to
`beginning-of-line' in `line-move-to-column'.

With point at the end of line3, an interactive C-a (or, equivalently,
`M-x beginning of line') carries point to the beginning of line2 in
both your and the alternative implementation.

If one does `M-: beginning-of-line' instead, the feature I quoted from
the NEWS still moves to the beginning of line2, but your
implementation now moves to the beginning of line3, where, from the
perspective of `line-move-to-column' it should be.

I guess that the difference is that your implementation only adjusts
point after an interactive command.  As there is no reason to worry
about "the cursor appearing to stand still" in a non-interactive
situation, that would appear to be clearly better and it gets rid of
Klaus' bug.

Sincerely,

Luc.





reply via email to

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