* Re: [Emacs-diffs] trunk r113221: Implement visual-order cursor motion.
[not found] <E1UsvLb-0001hZ-QA@vcs.savannah.gnu.org>
@ 2013-06-29 15:12 ` Stefan Monnier
2013-06-29 15:24 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2013-06-29 15:12 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> + (if (< n 0)
> + (move-point-visually -1)
> + (move-point-visually 1))
Aka
(move-point-visually (if (< n 0) -1 1))
> + (sit-for 0))
I think this deserves a comment, because I for one have no idea why
it's here.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113221: Implement visual-order cursor motion.
2013-06-29 15:12 ` [Emacs-diffs] trunk r113221: Implement visual-order cursor motion Stefan Monnier
@ 2013-06-29 15:24 ` Eli Zaretskii
2013-06-30 14:54 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2013-06-29 15:24 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Sat, 29 Jun 2013 11:12:34 -0400
>
> > + (if (< n 0)
> > + (move-point-visually -1)
> > + (move-point-visually 1))
>
> Aka
> (move-point-visually (if (< n 0) -1 1))
Fixed.
> > + (sit-for 0))
>
> I think this deserves a comment, because I for one have no idea why
> it's here.
It's probably my misunderstanding of something. If I remove sit-for,
invoking the command with N > 1 causes it to see the value of point
that is not updated. That is, if point is at position X and you
invoke
C-u 10 <right>
then inside move-point-visually I see on the 2nd or 3rd call that
point is being reset back to its value before the first call.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113221: Implement visual-order cursor motion.
2013-06-29 15:24 ` Eli Zaretskii
@ 2013-06-30 14:54 ` Eli Zaretskii
2013-06-30 21:33 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2013-06-30 14:54 UTC (permalink / raw)
To: monnier; +Cc: emacs-devel
> Date: Sat, 29 Jun 2013 18:24:29 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> CC: emacs-devel@gnu.org
>
> > > + (sit-for 0))
> >
> > I think this deserves a comment, because I for one have no idea why
> > it's here.
>
> It's probably my misunderstanding of something. If I remove sit-for,
> invoking the command with N > 1 causes it to see the value of point
> that is not updated. That is, if point is at position X and you
> invoke
>
> C-u 10 <right>
>
> then inside move-point-visually I see on the 2nd or 3rd call that
> point is being reset back to its value before the first call.
I found the reason: it was a bug. The code moved point by using
information in the current glyph matrix, but did not invalidate the
cursor position info in the matrix, so redisplay would not update the
cursor position; calling sit-for forced a more thorough redisplay and
"fixed" that.
I fixed the code by invalidating the cursor location, and removed the
call to sit-for.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113221: Implement visual-order cursor motion.
2013-06-30 14:54 ` Eli Zaretskii
@ 2013-06-30 21:33 ` Stefan Monnier
2013-07-01 2:49 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2013-06-30 21:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> The code moved point by using
> information in the current glyph matrix,
Does that means that those functions won't work in batch mode?
> I fixed the code by invalidating the cursor location, and removed the
> call to sit-for.
Great, thanks,
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113221: Implement visual-order cursor motion.
2013-06-30 21:33 ` Stefan Monnier
@ 2013-07-01 2:49 ` Eli Zaretskii
2013-07-01 19:29 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2013-07-01 2:49 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: emacs-devel@gnu.org
> Date: Sun, 30 Jun 2013 17:33:37 -0400
>
> > The code moved point by using
> > information in the current glyph matrix,
>
> Does that means that those functions won't work in batch mode?
They should still work, because there's fallback code which uses
move_it_* functions (needed when the position to the left or right is
outside of the currently displayed portion of the buffer). The code
that uses the current glyph matrices was written because it is
expected to be used almost always in interactive invocation of the
function, since moving point almost never invalidates the current
glyph matrix, and the resulting display update shortcuts almost
everything.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113221: Implement visual-order cursor motion.
2013-07-01 2:49 ` Eli Zaretskii
@ 2013-07-01 19:29 ` Stefan Monnier
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2013-07-01 19:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> They should still work, because there's fallback code which uses
> move_it_* functions (needed when the position to the left or right is
> outside of the currently displayed portion of the buffer). The code
> that uses the current glyph matrices was written because it is
> expected to be used almost always in interactive invocation of the
> function, since moving point almost never invalidates the current
> glyph matrix, and the resulting display update shortcuts almost
> everything.
OK, great,
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-01 19:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1UsvLb-0001hZ-QA@vcs.savannah.gnu.org>
2013-06-29 15:12 ` [Emacs-diffs] trunk r113221: Implement visual-order cursor motion Stefan Monnier
2013-06-29 15:24 ` Eli Zaretskii
2013-06-30 14:54 ` Eli Zaretskii
2013-06-30 21:33 ` Stefan Monnier
2013-07-01 2:49 ` Eli Zaretskii
2013-07-01 19:29 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.