From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17585: 24.4.50; vertical-motion erroneously adds points Date: Sat, 31 May 2014 12:00:59 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1401562947 11572 80.91.229.3 (31 May 2014 19:02:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2014 19:02:27 +0000 (UTC) Cc: 17585@debbugs.gnu.org To: Stefan Monnier ,eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 31 21:02:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WqoXq-0006lR-EZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 May 2014 21:02:18 +0200 Original-Received: from localhost ([::1]:60901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqoXq-0002fi-3F for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 May 2014 15:02:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqoXg-0002de-Jb for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 15:02:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WqoXb-0000oz-7F for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 15:02:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqoXb-0000os-3t for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 15:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WqoXa-0008Uq-6s for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 15:02:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 May 2014 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17585-submit@debbugs.gnu.org id=B17585.140156287132593 (code B ref 17585); Sat, 31 May 2014 19:02:02 +0000 Original-Received: (at 17585) by debbugs.gnu.org; 31 May 2014 19:01:11 +0000 Original-Received: from localhost ([127.0.0.1]:39153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqoWj-0008Tc-U3 for submit@debbugs.gnu.org; Sat, 31 May 2014 15:01:11 -0400 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:57740) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqoWg-0008Sz-Tx for 17585@debbugs.gnu.org; Sat, 31 May 2014 15:01:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Cc:Subject:To:From:Message-ID:Date; bh=5UDLgfQiYA/3yoQTVDNRqtxG88KMasuBXUVHcd2RoHQ=; b=JrG+GhT+apEzpcqsuRPjpmIIRjRCg4L0E3hfbKGu/jGXAIXfwLAriXgOdyhs7jEH71zv3YY91hRX9lGbG6em/r3/UGLAYPjp+joa8XyyVwRFqCw2V2RuGuz7xMD3WJ63; Original-Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:50054 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1WqoWX-0005w1-M2; Sat, 31 May 2014 15:00:57 -0400 User-Agent: / () / () APEL/10.8 Emacs/24.4.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89821 Archived-At: 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 > 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 * 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.