From debbugs-submit-bounces@debbugs.gnu.org Sun May 25 03:23:53 2014 Received: (at submit) by debbugs.gnu.org; 25 May 2014 07:23:53 +0000 Received: from localhost ([127.0.0.1]:59559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoSme-00058q-1r for submit@debbugs.gnu.org; Sun, 25 May 2014 03:23:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59994) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoSmb-00058a-Ex for submit@debbugs.gnu.org; Sun, 25 May 2014 03:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoSmO-0004lh-Q3 for submit@debbugs.gnu.org; Sun, 25 May 2014 03:23:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoSmO-0004ld-NZ for submit@debbugs.gnu.org; Sun, 25 May 2014 03:23:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoSmI-0003gJ-6v for bug-gnu-emacs@gnu.org; Sun, 25 May 2014 03:23:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoSmB-0004kH-TQ for bug-gnu-emacs@gnu.org; Sun, 25 May 2014 03:23:30 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:47778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoSmB-0004k4-Jx for bug-gnu-emacs@gnu.org; Sun, 25 May 2014 03:23:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date; bh=W4sYa8kNMMJ4+VmFAE+jl4zWUv0fe8Adq6ZVJ39BcdM=; b=Ub8IZdjRYZmEDtnqGpyPh9YrrYYdd+i0kup2QwfyVQje9tKDwckQnf45MqyEq8bDxF26fc/EAZ17L2TB+37W/0lBl7cPO7sFPmsbWSnEwZyZdCOxFSaTNxBnwwXtAoAB; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:50696 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1WoSm8-0003qa-O6 for bug-gnu-emacs@gnu.org; Sun, 25 May 2014 03:23:20 -0400 Date: Sun, 25 May 2014 00:23:20 -0700 Message-ID: From: Keith David Bershatsky To: bug-gnu-emacs@gnu.org Subject: 24.4.50; vertical-motion erroneously adds points User-Agent: / () / () APEL/10.8 Emacs/24.4.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII 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 - 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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) The following test function demonstrates how vertical-motion erroneously adds points when dealing with long lines without spaces that go beyond the window-width: (defun test () (interactive) (switch-to-buffer (get-buffer-create "foo.txt")) (text-mode) (linum-mode t) (visual-line-mode t) (dotimes (i (* (window-width) 4)) (insert ";")) (dotimes (i 10) (insert "\n")) (goto-char (point-min)) (vertical-motion 1) (message "Second Row + 2 points: %s" (current-column)) (vertical-motion 1) (message "Third Row + 4 points: %s" (current-column))) Additional incorrect behavior can be seen by moving the cursor to the beginning of the buffer after running the above test function and evaluating `(vertical-motion 1`). Instead of moving to line number two, the cursor will move to column number 2. I have written a workaround to compensate for the problem -- if point is on the first wrapped line, then ... (vertical-motion 1) (when (= (current-column) 2 ) (move-to-column (+ (current-column) (- window-width 2)))) This bug affects the popular functions that rely upon the behavior of vertical-motion -- e.g., scrolling with the mouse; and using the arrow keys to navigate the buffer. If the wrapped line is at the top of the buffer, and there are many such wrapped lines that don't break nicely at the far right edge (e.g., no space and no tab), then the mouse scroll becomes inoperable unless one uses the scroll bars. Thanks, Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 24.4.50.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2014-04-28 on MP.local Repository revision: 117030 eggert@cs.ucla.edu-20140428165941-zk00wxiq6dy6xcg4 Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure --with-ns' Configured features: ACL LIBXML2 ZLIB Important settings: locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: lawlist-scroll-bar-mode: t lawlist-delete-selection-mode: t desktop-save-mode: t tabbar-mode: t font-lock-mode: t blink-cursor-mode: t transient-mark-mode: t Recent input: x e m a c s - r e p o r t - b u g r e p o r t - b u g - e m a c s e m a c s - b u g r e p o r t r e p o r t - b u g Recent messages: Loading /Users/HOME/.0.data/.0.emacs/init.el (source)... Loading /Users/HOME/.0.data/.0.emacs/.multiple_cursors...done Loading /Users/HOME/.0.data/.0.emacs/init.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Wrote /Users/HOME/.0.data/.0.emacs/.lock Turned ON highlighting current column when Emacs is idle. *beep* [5 times] Load-path shadows: /Users/HOME/.0.data/.0.emacs/.0.flim/md4 hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/md4 /Users/HOME/.0.data/.0.emacs/.0.flim/hex-util hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/hex-util /Users/HOME/.0.data/.0.emacs/.0.flim/sasl hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/net/sasl /Users/HOME/.0.data/.0.emacs/.0.flim/sasl-ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/net/sasl-ntlm /Users/HOME/.0.data/.0.emacs/.0.flim/sasl-digest hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/net/sasl-digest /Users/HOME/.0.data/.0.emacs/.0.flim/sasl-cram hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/net/sasl-cram /Users/HOME/.0.data/.0.emacs/.0.flim/ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/net/ntlm /Users/HOME/.0.data/.0.emacs/.0.flim/hmac-md5 hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/net/hmac-md5 /Users/HOME/.0.data/.0.emacs/.0.flim/hmac-def hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/net/hmac-def /Users/HOME/.0.data/.0.emacs/.0.wl/rfc2368 hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/mail/rfc2368 /Users/HOME/.0.data/.0.emacs/.0.wl/utf7 hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/gnus/utf7 /Users/HOME/.0.data/.0.emacs/.0.simi/smime hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/gnus/smime /Users/HOME/.emacs.d/elpa/tabulated-list-20120406.1351/tabulated-list hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/emacs-lisp/tabulated-list /Users/HOME/.0.data/.0.emacs/.0.simi/pgg hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/obsolete/pgg /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-pgp5 hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp5 /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-pgp hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-parse hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/obsolete/pgg-parse /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-gpg hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/obsolete/pgg-gpg /Users/HOME/.0.data/.0.emacs/.0.simi/pgg-def hides /Users/HOME/.0.data/.0.emacs/Emacs_04_28_2014.app/Contents/Resources/lisp/obsolete/pgg-def Features: (shadow disp-table wl-mime mime-edit pgg-parse pccl pccl-20 signature mime-setup mail-mime-setup semi-setup mime-pgp pgg-def mime-play filename mime-image modb-legacy modb-standard elmo-imap4 emacsbug bbdb-autoloads lawlist-wl wl-demo wl-draft eword-encode wl-template sendmail elmo-net elmo-cache elmo-map elmo-dop wl-news wl-address wl-thread wl-folder wl wl-e21 wl-spam wl-action wl-summary wl-refile wl-util pp elmo-flag elmo-localdir wl-message elmo-mime mmelmo-buffer mmelmo-imap mime-view mime-conf calist semi-def mmimap mime-parse mmbuffer mmgeneric elmo-multi elmo-spam elsp-header elsp-generic elmo elmo-signal wl-highlight wl-vars wl-version elmo-msgdb modb modb-generic modb-entity luna mime elmo-util emu invisible inv-23 poem poem-e20 poem-e20_3 eword-decode std11 elmo-date elmo-vars elmo-version w3m-load mime-w3m w3m browse-url doc-view jka-compr image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util savehist lawlist-vcol lawlist-whitespace lawlist-github conf-mode log-edit add-log find-lisp package esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util dired-x view tramp tramp-compat tramp-loaddefs trampver server grep epa epg epg-config diff-mode autorevert filenotify log-view pcvs-util ido time-stamp vc-git vc vc-dispatcher ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff rx ert ewoc debug eieio-base lawlist-calculator ps-print ps-def lpr flyspell ispell bbdb timezone find-func dired-aux yasnippet help-mode multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-more thingatpt mc-cycle-cursors mc-edit-lines multiple-cursors-core rect saveplace lawlist-tex-mode pcase compile shell pcomplete comint ansi-color ring skeleton compare-w desktop frameset lawlist-tabbar lawlist-org lawlist-calendar edmacro kmacro derived lawlist-toodledo advice url-http url-auth url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core password-cache url-vars mailcap json xml noutline outline easy-mmode gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls utf7 mel path-util mime-def alist mcharset mcs-20 mcs-e20 pcustom pces pces-e20 pces-20 broken poe pym static apel-ver product netrc nnoo parse-time gnus-spec gnus-int gnus-range message cl-macs dired format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr wid-edit cl gv cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs) Memory information: ((conses 16 718578 45882) (symbols 48 54623 0) (miscs 40 83 241) (strings 32 112318 16394) (string-bytes 1 3740329) (vectors 16 40884) (vector-slots 8 721743 31900) (floats 8 957 235) (intervals 56 470 88) (buffers 960 13)) From debbugs-submit-bounces@debbugs.gnu.org Sun May 25 10:23:39 2014 Received: (at 17585-done) by debbugs.gnu.org; 25 May 2014 14:23:40 +0000 Received: from localhost ([127.0.0.1]:59807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoZKt-00029G-EK for submit@debbugs.gnu.org; Sun, 25 May 2014 10:23:39 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:51858) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoZKp-000291-LA for 17585-done@debbugs.gnu.org; Sun, 25 May 2014 10:23:37 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N6400000VOJW400@mtaout29.012.net.il> for 17585-done@debbugs.gnu.org; Sun, 25 May 2014 17:24:07 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N6400IECW07UU90@mtaout29.012.net.il>; Sun, 25 May 2014 17:24:07 +0300 (IDT) Date: Sun, 25 May 2014 17:23:31 +0300 From: Eli Zaretskii Subject: Re: bug#17585: 24.4.50; vertical-motion erroneously adds points In-reply-to: X-012-Sender: halo1@inter.net.il To: Keith David Bershatsky Message-id: <83ha4ej5ss.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17585-done Cc: 17585-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 25 May 2014 00:23:20 -0700 > From: Keith David Bershatsky > > The following test function demonstrates how vertical-motion erroneously adds points when dealing with long lines without spaces that go beyond the window-width: > > (defun test () > (interactive) > (switch-to-buffer (get-buffer-create "foo.txt")) > (text-mode) > (linum-mode t) > (visual-line-mode t) > (dotimes (i (* (window-width) 4)) > (insert ";")) > (dotimes (i 10) > (insert "\n")) > (goto-char (point-min)) > (vertical-motion 1) > (message "Second Row + 2 points: %s" (current-column)) > (vertical-motion 1) > (message "Third Row + 4 points: %s" (current-column))) Fixed in revision 117154 on the emacs-24 branch. The patch is below, in case you want to try it without waiting for it to be merged to the trunk. Thanks. --- src/xdisp.c 2014-05-24 21:28:43 +0000 +++ src/xdisp.c 2014-05-25 14:18:46 +0000 @@ -8556,7 +8556,7 @@ move_it_in_display_line_to (struct it *i } else { - if (it->line_wrap == WORD_WRAP) + if (it->line_wrap == WORD_WRAP && it->area == TEXT_AREA) { if (IT_DISPLAYING_WHITESPACE (it)) may_wrap = 1; From debbugs-submit-bounces@debbugs.gnu.org Fri May 30 02:21:16 2014 Received: (at 17585-done) by debbugs.gnu.org; 30 May 2014 06:21:16 +0000 Received: from localhost ([127.0.0.1]:36790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqGBn-0004NO-4G for submit@debbugs.gnu.org; Fri, 30 May 2014 02:21:15 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:50835) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqGBk-0004NA-Jy for 17585-done@debbugs.gnu.org; Fri, 30 May 2014 02:21:13 -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=QTtvP7wXVoyOppcjVpLKf6WLpZ7woIEM4R6nqfig/vk=; b=7TWQqfppkHbo+Ffe+3+hgb84ASiEwUnZfkb6z1UaJztXazRcr0HTHnZ1Bs8wKBc+t1dz+BmUwfKQLLG92dwXRJ8rGKXAELBnIK/bAplxkjrJUMI/yw8TLybYB+6F5iDk; Received: from cpe-75-85-5-102.socal.res.rr.com ([75.85.5.102]:62007 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1WqGBc-0007IN-9V; Fri, 30 May 2014 02:21:04 -0400 Date: Thu, 29 May 2014 23:21:05 -0700 Message-ID: From: Keith David Bershatsky To: Eli Zaretskii Subject: Re: bug#17585: 24.4.50; vertical-motion erroneously adds points User-Agent: / () / () APEL/10.8 Emacs/24.4.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17585-done Cc: 17585-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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? I'm using macports / baazar: /macports/bin/bzr branch --stacked bzr://bzr.savannah.gnu.org/emacs/trunk emacs-trunk Thanks, Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Sun, 25 May 2014 17:23:31 +0300, Eli Zaretskii wrote: > > > Date: Sun, 25 May 2014 00:23:20 -0700 > > From: Keith David Bershatsky > > > > The following test function demonstrates how vertical-motion erroneously adds points when dealing with long lines without spaces that go beyond the window-width: > > > > (defun test () > > (interactive) > > (switch-to-buffer (get-buffer-create "foo.txt")) > > (text-mode) > > (linum-mode t) > > (visual-line-mode t) > > (dotimes (i (* (window-width) 4)) > > (insert ";")) > > (dotimes (i 10) > > (insert "\n")) > > (goto-char (point-min)) > > (vertical-motion 1) > > (message "Second Row + 2 points: %s" (current-column)) > > (vertical-motion 1) > > (message "Third Row + 4 points: %s" (current-column))) > > Fixed in revision 117154 on the emacs-24 branch. The patch is below, > in case you want to try it without waiting for it to be merged to the > trunk. > > Thanks. > > --- src/xdisp.c 2014-05-24 21:28:43 +0000 > +++ src/xdisp.c 2014-05-25 14:18:46 +0000 > @@ -8556,7 +8556,7 @@ move_it_in_display_line_to (struct it *i > } > else > { > - if (it->line_wrap == WORD_WRAP) > + if (it->line_wrap == WORD_WRAP && it->area == TEXT_AREA) > { > if (IT_DISPLAYING_WHITESPACE (it)) > may_wrap = 1; From debbugs-submit-bounces@debbugs.gnu.org Fri May 30 02:47:15 2014 Received: (at 17585) by debbugs.gnu.org; 30 May 2014 06:47:15 +0000 Received: from localhost ([127.0.0.1]:36801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqGax-0005FX-7m for submit@debbugs.gnu.org; Fri, 30 May 2014 02:47:15 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:38687) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqGas-0005FE-Dx for 17585@debbugs.gnu.org; Fri, 30 May 2014 02:47:12 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N6D00600K3CFD00@a-mtaout22.012.net.il> for 17585@debbugs.gnu.org; Fri, 30 May 2014 09:47:03 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N6D006GOK6E3F50@a-mtaout22.012.net.il>; Fri, 30 May 2014 09:47:03 +0300 (IDT) Date: Fri, 30 May 2014 09:47:17 +0300 From: Eli Zaretskii Subject: Re: bug#17585: 24.4.50; vertical-motion erroneously adds points In-reply-to: X-012-Sender: halo1@inter.net.il To: Keith David Bershatsky Message-id: <83zjhzg3uy.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17585 Cc: 17585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > 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. From debbugs-submit-bounces@debbugs.gnu.org Fri May 30 12:22:33 2014 Received: (at 17585-done) by debbugs.gnu.org; 30 May 2014 16:22:33 +0000 Received: from localhost ([127.0.0.1]:37942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqPZc-0001D2-TK for submit@debbugs.gnu.org; Fri, 30 May 2014 12:22:33 -0400 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:59579) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqPZW-0001Cq-Mr for 17585-done@debbugs.gnu.org; Fri, 30 May 2014 12:22:27 -0400 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 78F072C0AD; Fri, 30 May 2014 12:22:22 -0400 (EDT) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 6DA9F1E5874; Fri, 30 May 2014 12:21:58 -0400 (EDT) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 5E55DB40F6; Fri, 30 May 2014 12:21:58 -0400 (EDT) From: Stefan Monnier To: Keith David Bershatsky Subject: Re: bug#17585: 24.4.50; vertical-motion erroneously adds points Message-ID: References: Date: Fri, 30 May 2014 12:21:58 -0400 In-Reply-To: (Keith David Bershatsky's message of "Thu, 29 May 2014 23:21:05 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17585-done Cc: Eli Zaretskii , 17585-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > 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 From debbugs-submit-bounces@debbugs.gnu.org Sat May 31 15:01:11 2014 Received: (at 17585) by debbugs.gnu.org; 31 May 2014 19:01:11 +0000 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 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; 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 Date: Sat, 31 May 2014 12:00:59 -0700 Message-ID: From: Keith David Bershatsky To: Stefan Monnier ,eliz@gnu.org Subject: Re: bug#17585: 24.4.50; vertical-motion erroneously adds points User-Agent: / () / () APEL/10.8 Emacs/24.4.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17585 Cc: 17585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Sat May 31 15:11:28 2014 Received: (at 17585) by debbugs.gnu.org; 31 May 2014 19:11:28 +0000 Received: from localhost ([127.0.0.1]:39157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wqogi-0000HY-01 for submit@debbugs.gnu.org; Sat, 31 May 2014 15:11:28 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:45843) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wqoge-0000HJ-Mg for 17585@debbugs.gnu.org; Sat, 31 May 2014 15:11:26 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0N6G00G00CQOV100@mtaout27.012.net.il> for 17585@debbugs.gnu.org; Sat, 31 May 2014 22:08:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N6G00E9ZD5L7Q50@mtaout27.012.net.il>; Sat, 31 May 2014 22:08:09 +0300 (IDT) Date: Sat, 31 May 2014 22:11:13 +0300 From: Eli Zaretskii Subject: Re: bug#17585: 24.4.50; vertical-motion erroneously adds points In-reply-to: X-012-Sender: halo1@inter.net.il To: Keith David Bershatsky Message-id: <83y4xhbw6m.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17585 Cc: 17585@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 31 May 2014 12:00:59 -0700 > From: Keith David Bershatsky > Cc: 17585@debbugs.gnu.org > > 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)))) This shouldn't be necessary. Try invoking linum-update (or whatever function is put by linum-mode on the post-command hook) before/when you display the buffer for the first time, and I think the problem should go away. It is caused by the fact that the line numbers are not displayed until the first command that displays the buffer finishes, and therefore any functions in that first command will not be aware that the window has non-zero left margin. From unknown Mon Aug 18 15:39:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 29 Jun 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator