From: Keith David Bershatsky <esq@lawlist.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,eliz@gnu.org
Cc: 17585@debbugs.gnu.org
Subject: bug#17585: 24.4.50; vertical-motion erroneously adds points
Date: Sat, 31 May 2014 12:00:59 -0700 [thread overview]
Message-ID: <m2y4xhhixg.wl%esq@lawlist.com> (raw)
In-Reply-To: <m2a9a6iaon.wl%esq@lawlist.com>
Eli & Stefan:
My confusion regarding whether the fix for Bug#17585 had been implemented in the version of Emacs Trunk that I've been testing was due to the reason mentioned by Eli below. Indeed, the arrow keys and scrolling with the mouse now work correctly when `visual-line-mode` and `linum-mode` are both active and the line of text (without any spaces) exceeds the `window-width`.
I've been using the following command line prior to building a new Emacs Trunk version, and I believe it gives me the most recent Emacs-24 branch:
bzr branch --stacked bzr://bzr.savannah.gnu.org/emacs/trunk emacs-trunk
`M-x emacs version` yields the following message:
GNU Emacs 24.4.50.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2014-05-29 on MP.local
I am working on writing a custom library that draws a thin vertical line (i.e., "|") and a thin horizontal line (i.e., `underline`), which is compatible with `visual-line-mode` and `linum-mode`. The visual effect is similar to the `crosshairs.el` library, except that mine is done with thin lines only -- i.e., no background highlighting. One of my key functions uses (vertical-motion 1) for every line in the visible window. To deal with the situation best described by Eli (below), I use the following immediately after each execution of (vertical-motion 1):
(when (= (current-column) 2 )
(move-to-column (+ (current-column) (- window-width 2))))
I have not yet done any experimentation with removing the line number overlays for purposes of calculating and placing my cross-hair overlays. My best guess is that adding the line numbers after the cross-hairs have been placed would skew/break the vertical line.
Thanks again for implementing the bug fix. It certainly nice to be able to effectively use the arrow keys and the mouse scroll when dealing with the situation described in the first paragraph above.
Keith
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
At Fri, 30 May 2014 12:21:58 -0400,
Stefan Monnier wrote:
>
> > the Trunk as of May 29, 2014 at 11:18 P.S.T. Approximately when, please,
> > should I expect to see the fix merged into the Trunk?
>
> Please use the `emacs-24' branch instead, which is the one we're
> focusing on right now (and which does have this fix applied).
>
>
> Stefan
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> Date: Thu, 29 May 2014 23:21:05 -0700
> From: Keith David Bershatsky <esq@lawlist.com>
> Cc: 17585-done@debbugs.gnu.org
>
> The `test` function yields the same result with Emacs built (--with-ns) from the Trunk as of May 29, 2014 at 11:18 P.S.T. Approximately when, please, should I expect to see the fix merged into the Trunk?
It was merged to the trunk on May 26, as trunk revision 117154 (yes,
the same revision number as on the emacs-24 branch; it happens).
> I'm using macports / baazar:
>
> /macports/bin/bzr branch --stacked bzr://bzr.savannah.gnu.org/emacs/trunk emacs-trunk
Do you have revision 117154 in your bzr trunk branch? If you do, you
should see this entry in src/ChangeLog:
2014-05-26 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (move_it_in_display_line_to): Don't record wrap position
if we are iterating over an object that generates glyphs for
marginal areas. (Bug#17585)
With the latest trunk, vertical motion in the foo.txt buffer created
by your recipe works OK interactively (i.e. by using arrow keys or
M-:); it didn't work correctly before. Please try that after your
'test' function finishes.
Your test case, which uses vertical-motion non-interactively, indeed
still moves point horizontally as well, but that's because linum-mode
does its line number display in a post-command hook, so it defers the
initial display of the line numbers until _after_ vertical-motion did
its thing. You can see that by inserting (sit-for 1) before each call
to vertical-motion. So I think this is an unrelated problem; if it
gives you trouble in some real-life use case, please describe that use
case.
next prev parent reply other threads:[~2014-05-31 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-25 7:23 bug#17585: 24.4.50; vertical-motion erroneously adds points Keith David Bershatsky
2014-05-25 14:23 ` Eli Zaretskii
2014-05-30 6:21 ` Keith David Bershatsky
2014-05-30 6:47 ` Eli Zaretskii
2014-05-30 16:21 ` Stefan Monnier
2014-05-31 19:00 ` Keith David Bershatsky [this message]
2014-05-31 19:11 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y4xhhixg.wl%esq@lawlist.com \
--to=esq@lawlist.com \
--cc=17585@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.