From unknown Fri Jun 20 20:09:10 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#3494 <3494@debbugs.gnu.org> To: bug#3494 <3494@debbugs.gnu.org> Subject: Status: 23.0.94; line-move-visual: temporary goal column confused by hscrolling Reply-To: bug#3494 <3494@debbugs.gnu.org> Date: Sat, 21 Jun 2025 03:09:10 +0000 retitle 3494 23.0.94; line-move-visual: temporary goal column confused by h= scrolling reassign 3494 emacs submitter 3494 bojohan+mail@dd.chalmers.se (Johan Bockg=C3=A5rd) severity 3494 normal tag 3494 fixed thanks From bojohan+mail@dd.chalmers.se Sun Jun 7 18:17:29 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 8 Jun 2009 01:17:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n581HO2Z007259 for ; Sun, 7 Jun 2009 18:17:26 -0700 Received: from mx10.gnu.org ([199.232.76.166]:54837) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MDTUJ-0004iP-St for emacs-pretest-bug@gnu.org; Sun, 07 Jun 2009 21:17:23 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MDTUI-0001Wg-Aq for emacs-pretest-bug@gnu.org; Sun, 07 Jun 2009 21:17:23 -0400 Received: from atum.ita.chalmers.se ([129.16.4.148]:60801) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDTUI-0001VS-0C for emacs-pretest-bug@gnu.org; Sun, 07 Jun 2009 21:17:22 -0400 Received: from remote2.student.chalmers.se (remote2.student.chalmers.se [129.16.29.80]) by atum.ita.chalmers.se (Postfix) with ESMTP id 980508450 for ; Mon, 8 Jun 2009 03:17:09 +0200 (CEST) Received: by remote2.student.chalmers.se (Postfix, from userid 61540) id 22046AC05C; Mon, 8 Jun 2009 03:17:08 +0200 (CEST) From: bojohan+mail@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) To: emacs-pretest-bug@gnu.org Subject: 23.0.94; line-move-visual: temporary goal column confused by hscrolling Date: Mon, 08 Jun 2009 03:17:07 +0200 Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) ;; Text area is standard 80 columns $ emacs -Q -f toggle-truncate-lines C-u 85 a RET C-u 75 b C-p C-n C-p Point is now at the end of line "a". From cyd@stupidchicken.com Sat Jul 11 08:39:12 2009 Received: (at control) by emacsbugs.donarmstrong.com; 11 Jul 2009 15:39:12 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po35.its.yale.edu (pantheon-po35.its.yale.edu [130.132.50.83]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BFd8JK014555 for ; Sat, 11 Jul 2009 08:39:09 -0700 Received: from furry (COMPTON-FOUR-FORTY-EIGHT.MIT.EDU [18.109.6.193]) (authenticated bits=0) by pantheon-po35.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6BFd27o008024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 11 Jul 2009 11:39:02 -0400 Received: by furry (Postfix, from userid 1000) id 8C0E8C0A4; Sat, 11 Jul 2009 10:49:10 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: merge 3494 3805 Date: Sat, 11 Jul 2009 10:49:10 -0400 Message-ID: <877hyfgtqx.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) merge 3494 3805 thanks From cyd@stupidchicken.com Sat Jul 11 09:03:36 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 16:03:36 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,FVGT_m_MULTI_ODD, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po26.its.yale.edu (pantheon-po26.its.yale.edu [130.132.50.121]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BG3VO3018216 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 09:03:32 -0700 Received: from furry (COMPTON-FOUR-FORTY-EIGHT.MIT.EDU [18.109.6.193]) (authenticated bits=0) by pantheon-po26.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6BG3NeD006966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Jul 2009 12:03:24 -0400 Received: by furry (Postfix, from userid 1000) id 35235C09B; Sat, 11 Jul 2009 12:03:23 -0400 (EDT) From: Chong Yidong To: Johan =?utf-8?Q?Bockg=C3=A5rd?= Cc: kees@altium.nl (Kees Bakker), Teemu Likonen , 3494@debbugs.gnu.org Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling Date: Sat, 11 Jul 2009 12:03:22 -0400 Message-ID: <87y6qvxl4l.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Does the following patch fix the problem? diff -c /home/cyd/emacs/lisp/simple.el.\~1.988.\~ /home/cyd/emacs/lisp/simple.el *** emacs/lisp/simple.el.~1.988.~ 2009-06-21 00:37:46.000000000 -0400 --- emacs/lisp/simple.el 2009-07-11 11:58:55.000000000 -0400 *************** *** 3956,3966 **** (defvar temporary-goal-column 0 "Current goal column for vertical motion. It is the column where point was at the start of the current run ! of vertical motion commands. It is a floating point number when ! moving by visual lines via `line-move-visual'; this is the ! x-position, in pixels, divided by the default column width. When ! the `track-eol' feature is doing its job, the value is ! `most-positive-fixnum'.") (defcustom line-move-ignore-invisible t "Non-nil means \\[next-line] and \\[previous-line] ignore invisible lines. --- 3956,3967 ---- (defvar temporary-goal-column 0 "Current goal column for vertical motion. It is the column where point was at the start of the current run ! of vertical motion commands. When moving by visual lines via ! `line-move-visual', it is a cons cell (COL . HSCROLL), where COL ! is the x-position, in pixels, divided by the default column ! width, and HSCROLL is the number of columns by which window is ! scrolled from left margin. When the `track-eol' feature is doing ! its job, the value is `most-positive-fixnum'.") (defcustom line-move-ignore-invisible t "Non-nil means \\[next-line] and \\[previous-line] ignore invisible lines. *************** *** 4061,4075 **** x) ;; Reset temporary-goal-column, unless the previous command was a ;; line-motion command or we were called from some other command. ! (unless (and (floatp temporary-goal-column) ! (memq last-command `(next-line previous-line ,this-command))) (cond ((eq (nth 1 posn) 'right-fringe) ; overflow-newline-into-fringe ! (setq temporary-goal-column (- (window-width) 1))) ((setq x (car (posn-x-y posn))) ! (setq temporary-goal-column (/ (float x) (frame-char-width)))))) ;; Move using `vertical-motion'. (or (and (= (vertical-motion ! (cons (or goal-column (truncate temporary-goal-column)) arg)) arg) (or (>= arg 0) (/= (point) opoint) --- 4062,4084 ---- x) ;; Reset temporary-goal-column, unless the previous command was a ;; line-motion command or we were called from some other command. ! (if (and (consp temporary-goal-column) ! (memq last-command `(next-line previous-line ,this-command))) ! ;; Check window-hscroll ! (if (/= (window-hscroll) (cdr temporary-goal-column)) ! (set-window-hscroll nil (cdr temporary-goal-column))) (cond ((eq (nth 1 posn) 'right-fringe) ; overflow-newline-into-fringe ! (setq temporary-goal-column ! (cons (- (window-width) 1) (window-hscroll)))) ((setq x (car (posn-x-y posn))) ! (setq temporary-goal-column ! (cons (/ (float x) (frame-char-width)) (window-hscroll)))))) ;; Move using `vertical-motion'. (or (and (= (vertical-motion ! (cons (or goal-column ! (if (consp temporary-goal-column) ! (truncate (car temporary-goal-column)) ! temporary-goal-column)) arg)) arg) (or (>= arg 0) (/= (point) opoint) *************** *** 4091,4098 **** (let ((inhibit-point-motion-hooks t) (opoint (point)) (orig-arg arg)) ! (if (floatp temporary-goal-column) ! (setq temporary-goal-column (truncate temporary-goal-column))) (unwind-protect (progn (if (not (memq last-command '(next-line previous-line))) --- 4100,4108 ---- (let ((inhibit-point-motion-hooks t) (opoint (point)) (orig-arg arg)) ! (if (consp temporary-goal-column) ! (setq temporary-goal-column (+ (car temporary-goal-column) ! (cdr temporary-goal-column)))) (unwind-protect (progn (if (not (memq last-command '(next-line previous-line))) Diff finished. Sat Jul 11 11:58:57 2009 From cyd@stupidchicken.com Sat Jul 11 09:31:52 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 16:31:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=FVGT_m_MULTI_ODD, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po29.its.yale.edu (pantheon-po29.its.yale.edu [130.132.50.124]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BGVlZc023412 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 09:31:48 -0700 Received: from furry (DORRANCE-THREE-SEVENTY-NINE.MIT.EDU [18.55.6.124]) (authenticated bits=0) by pantheon-po29.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6BGVdWc012979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Jul 2009 12:31:40 -0400 Received: by furry (Postfix, from userid 1000) id D7C3CC09B; Sat, 11 Jul 2009 12:31:39 -0400 (EDT) From: Chong Yidong To: Johan =?utf-8?Q?Bockg=C3=A5rd?= Cc: kees@altium.nl (Kees Bakker), Teemu Likonen , 3494@debbugs.gnu.org Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling Date: Sat, 11 Jul 2009 12:31:39 -0400 Message-ID: <87vdlzxjtg.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Please test this patch instead of the one I previously sent (I'll install it on the trunk as well, for additional testing). *** emacs/lisp/simple.el.~1.988.~ 2009-06-21 00:37:46.000000000 -0400 --- emacs/lisp/simple.el 2009-07-11 12:30:05.000000000 -0400 *************** *** 3956,3965 **** (defvar temporary-goal-column 0 "Current goal column for vertical motion. It is the column where point was at the start of the current run ! of vertical motion commands. It is a floating point number when ! moving by visual lines via `line-move-visual'; this is the ! x-position, in pixels, divided by the default column width. When ! the `track-eol' feature is doing its job, the value is `most-positive-fixnum'.") (defcustom line-move-ignore-invisible t --- 3956,3969 ---- (defvar temporary-goal-column 0 "Current goal column for vertical motion. It is the column where point was at the start of the current run ! of vertical motion commands. ! ! When moving by visual lines via `line-move-visual', it is a cons ! cell (COL . HSCROLL), where COL is the x-position, in pixels, ! divided by the default column width, and HSCROLL is the number of ! columns by which window is scrolled from left margin. ! ! When the `track-eol' feature is doing its job, the value is `most-positive-fixnum'.") (defcustom line-move-ignore-invisible t *************** *** 4059,4075 **** (let ((posn (posn-at-point)) (opoint (point)) x) ! ;; Reset temporary-goal-column, unless the previous command was a ! ;; line-motion command or we were called from some other command. ! (unless (and (floatp temporary-goal-column) ! (memq last-command `(next-line previous-line ,this-command))) ! (cond ((eq (nth 1 posn) 'right-fringe) ; overflow-newline-into-fringe ! (setq temporary-goal-column (- (window-width) 1))) ! ((setq x (car (posn-x-y posn))) ! (setq temporary-goal-column (/ (float x) (frame-char-width)))))) ;; Move using `vertical-motion'. (or (and (= (vertical-motion ! (cons (or goal-column (truncate temporary-goal-column)) arg)) arg) (or (>= arg 0) (/= (point) opoint) --- 4063,4095 ---- (let ((posn (posn-at-point)) (opoint (point)) x) ! ;; Check if the previous command was a line-motion command or we ! ;; were called from some other command. ! (cond ((and (consp temporary-goal-column) ! (memq last-command `(next-line previous-line ,this-command))) ! ;; If so, there's no need to reset `temporary-goal-column', ! ;; unless the window hscroll has changed. ! (when (/= (window-hscroll) (cdr temporary-goal-column)) ! (set-window-hscroll nil 0) ! (setq temporary-goal-column ! (cons (+ (car temporary-goal-column) ! (cdr temporary-goal-column)) 0)))) ! ;; Otherwise, we should reset `temporary-goal-column'. ! ;; Handle the `overflow-newline-into-fringe' case: ! ((eq (nth 1 posn) 'right-fringe) ! (setq temporary-goal-column (cons (- (window-width) 1) ! (window-hscroll)))) ! ((setq x (car (posn-x-y posn))) ! (setq temporary-goal-column ! (cons (/ (float x) (frame-char-width)) ! (window-hscroll))))) ;; Move using `vertical-motion'. (or (and (= (vertical-motion ! (cons (or goal-column ! (if (consp temporary-goal-column) ! (truncate (car temporary-goal-column)) ! temporary-goal-column)) ! arg)) arg) (or (>= arg 0) (/= (point) opoint) *************** *** 4091,4098 **** (let ((inhibit-point-motion-hooks t) (opoint (point)) (orig-arg arg)) ! (if (floatp temporary-goal-column) ! (setq temporary-goal-column (truncate temporary-goal-column))) (unwind-protect (progn (if (not (memq last-command '(next-line previous-line))) --- 4111,4119 ---- (let ((inhibit-point-motion-hooks t) (opoint (point)) (orig-arg arg)) ! (if (consp temporary-goal-column) ! (setq temporary-goal-column (+ (car temporary-goal-column) ! (cdr temporary-goal-column)))) (unwind-protect (progn (if (not (memq last-command '(next-line previous-line))) From tlikonen@iki.fi Sat Jul 11 09:44:37 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 16:44:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from jenni2.inet.fi (mta-out.inet.fi [195.156.147.13]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BGiVog025020 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 09:44:33 -0700 Received: from mithlond.arda.local (80.220.180.181) by jenni2.inet.fi (8.5.014) id 4A52D15A00265C67; Sat, 11 Jul 2009 19:44:29 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MPfga-0003bo-Nd; Sat, 11 Jul 2009 19:44:28 +0300 From: Teemu Likonen To: Chong Yidong Cc: 3494@debbugs.gnu.org, Johan =?iso-8859-1?Q?Bockg=E5rd?= , Kees Bakker Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling In-Reply-To: (Chong Yidong's message of "Sat, 11 Jul 2009 12:03:22 -0400") References: Date: Sat, 11 Jul 2009 19:44:28 +0300 Message-ID: <87zlbbnp8z.fsf@iki.fi> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2009-07-11 12:03 (-0400), Chong Yidong wrote: > Does the following patch fix the problem? > > diff -c /home/cyd/emacs/lisp/simple.el.\~1.988.\~ /home/cyd/emacs/lisp/simple.el > *** emacs/lisp/simple.el.~1.988.~ 2009-06-21 00:37:46.000000000 -0400 > --- emacs/lisp/simple.el 2009-07-11 11:58:55.000000000 -0400 Not quite, I'm afraid. Setting goal column still messes it up badly. To reproduce: 1. emacs -Q -f toggle-truncate-lines 2. Don't change the size of the window. Create test buffer with commands: C-u 85 a RET C-u 100 b RET 3. Move the cursor to the end of the first (the line with a's). 4. Enable goal column: C-x C-n 5. Repeat C-n and C-p. The column changes quite wildly. The problem goes away if I set line-move-visual to nil. From tlikonen@iki.fi Sat Jul 11 09:56:23 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 16:56:23 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.1 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from jenni1.inet.fi (mta-out.inet.fi [195.156.147.13]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BGuJNV027129 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 09:56:20 -0700 Received: from mithlond.arda.local (80.220.180.181) by jenni1.inet.fi (8.5.014) id 49F5976602A3B935; Sat, 11 Jul 2009 19:56:15 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MPfry-00065q-Ca; Sat, 11 Jul 2009 19:56:14 +0300 From: Teemu Likonen To: Chong Yidong Cc: Johan =?iso-8859-1?Q?Bockg=E5rd?= , kees@altium.nl (Kees Bakker), 3494@debbugs.gnu.org Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling In-Reply-To: <87vdlzxjtg.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 11 Jul 2009 12:31:39 -0400") References: <87vdlzxjtg.fsf@stupidchicken.com> Date: Sat, 11 Jul 2009 19:56:14 +0300 Message-ID: <87y6qv17m9.fsf@iki.fi> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2009-07-11 12:31 (-0400), Chong Yidong wrote: > Please test this patch instead of the one I previously sent (I'll > install it on the trunk as well, for additional testing). Still no. There are still weird problems: 1. emacs -Q -f toggle-truncate-lines 2. Don't touch the frame layout. Create test content: C-u 85 a RET C-u 100 b RET 3. Move to the _start_ of the "a" line, then to the _end_ of the line (C-e). 4. First C-n once then C-p once. 5. You are at the column 80 of the "b" line. From cyd@stupidchicken.com Sat Jul 11 10:17:44 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 17:17:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.2 required=4.0 tests=AWL,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po30.its.yale.edu (pantheon-po30.its.yale.edu [130.132.50.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BHHfVc030926 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 10:17:42 -0700 Received: from furry (c-71-192-161-14.hsd1.nh.comcast.net [71.192.161.14]) (authenticated bits=0) by pantheon-po30.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6BHHZK3012006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Jul 2009 13:17:35 -0400 Received: by furry (Postfix, from userid 1000) id C5C59C09B; Sat, 11 Jul 2009 13:17:34 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: 3494@debbugs.gnu.org Subject: Review line-move-visual patch Date: Sat, 11 Jul 2009 13:17:34 -0400 Message-ID: <87ws6ff8b5.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Hi Stefan, I just checked in a patch into the trunk, which makes line-move-visual play properly with truncated lines (Bugs 3494 and 3805). I think it should go to the branch as well. Could you review it? 2009-07-11 Chong Yidong * simple.el (temporary-goal-column): Change the value for line-move-visual to a cons cell. (line-move-visual): Record or set the window hscroll, if necessary (Bug#3494). (line-move-1): Handle cons value of temporary-goal-column. From cyd@stupidchicken.com Sat Jul 11 10:24:07 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 17:24:08 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po28.its.yale.edu (pantheon-po28.its.yale.edu [130.132.50.123]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BHO4BX031681 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 10:24:05 -0700 Received: from furry (c-71-192-161-14.hsd1.nh.comcast.net [71.192.161.14]) (authenticated bits=0) by pantheon-po28.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6BHNuK1009204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Jul 2009 13:23:57 -0400 Received: by furry (Postfix, from userid 1000) id 4BE12C09B; Sat, 11 Jul 2009 13:23:56 -0400 (EDT) From: Chong Yidong To: Teemu Likonen Cc: Johan =?utf-8?Q?Bockg=C3=A5rd?= , kees@altium.nl (Kees Bakker), 3494@debbugs.gnu.org Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling References: <87vdlzxjtg.fsf@stupidchicken.com> <87y6qv17m9.fsf@iki.fi> Date: Sat, 11 Jul 2009 13:23:55 -0400 In-Reply-To: <87y6qv17m9.fsf@iki.fi> (Teemu Likonen's message of "Sat, 11 Jul 2009 19:56:14 +0300") Message-ID: <8763dzw2tw.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Teemu Likonen writes: > 1. emacs -Q -f toggle-truncate-lines > > 2. Don't touch the frame layout. Create test content: > > C-u 85 a RET > C-u 100 b RET > > 3. Move to the _start_ of the "a" line, then to the _end_ of the line > (C-e). > > 4. First C-n once then C-p once. > > 5. You are at the column 80 of the "b" line. I can't reproduce this problem. Doing C-n, then C-p, I end up on column 85. From cyd@stupidchicken.com Sat Jul 11 10:25:23 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 17:25:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po28.its.yale.edu (pantheon-po28.its.yale.edu [130.132.50.123]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BHPJuF031979 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 10:25:20 -0700 Received: from furry (c-71-192-161-14.hsd1.nh.comcast.net [71.192.161.14]) (authenticated bits=0) by pantheon-po28.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6BHPDHp009338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Jul 2009 13:25:13 -0400 Received: by furry (Postfix, from userid 1000) id 17303C09B; Sat, 11 Jul 2009 13:25:13 -0400 (EDT) From: Chong Yidong To: Teemu Likonen Cc: 3494@debbugs.gnu.org, Johan =?utf-8?Q?Bockg=C3=A5rd?= , Kees Bakker Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling References: <87zlbbnp8z.fsf@iki.fi> Date: Sat, 11 Jul 2009 13:25:13 -0400 In-Reply-To: <87zlbbnp8z.fsf@iki.fi> (Teemu Likonen's message of "Sat, 11 Jul 2009 19:44:28 +0300") Message-ID: <871vonw2rq.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Teemu Likonen writes: > 1. emacs -Q -f toggle-truncate-lines > > 2. Don't change the size of the window. Create test buffer with > commands: > > C-u 85 a RET > C-u 100 b RET > > 3. Move the cursor to the end of the first (the line with a's). > > 4. Enable goal column: C-x C-n > > 5. Repeat C-n and C-p. The column changes quite wildly. > > The problem goes away if I set line-move-visual to nil. I can't reproduce this. Could you try with the latest patch in the trunk? From tlikonen@iki.fi Sat Jul 11 11:03:01 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 18:03:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, IMPRONONCABLE_2,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from kirsi1.inet.fi (mta-out.inet.fi [195.156.147.13]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BI2u1h005244 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 11:02:58 -0700 Received: from mithlond.arda.local (80.220.180.181) by kirsi1.inet.fi (8.5.014) id 49F6055A02A1AE35; Sat, 11 Jul 2009 21:02:55 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MPguO-0007xW-RG; Sat, 11 Jul 2009 21:02:48 +0300 From: Teemu Likonen To: Chong Yidong Cc: 3494@debbugs.gnu.org, Johan =?iso-8859-1?Q?Bockg=E5rd?= , Kees Bakker Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling In-Reply-To: <871vonw2rq.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 11 Jul 2009 13:25:13 -0400") References: <87zlbbnp8z.fsf@iki.fi> <871vonw2rq.fsf@stupidchicken.com> Date: Sat, 11 Jul 2009 21:02:48 +0300 Message-ID: <87k52f5c8n.fsf@iki.fi> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2009-07-11 13:25 (-0400), Chong Yidong wrote: > Teemu Likonen writes: > >> 1. emacs -Q -f toggle-truncate-lines >> >> 2. Don't change the size of the window. Create test buffer with >> commands: >> >> C-u 85 a RET >> C-u 100 b RET >> >> 3. Move the cursor to the end of the first (the line with a's). >> >> 4. Enable goal column: C-x C-n >> >> 5. Repeat C-n and C-p. The column changes quite wildly. >> >> The problem goes away if I set line-move-visual to nil. > > I can't reproduce this. Could you try with the latest patch in the > trunk? The above is 100% reproducible in my Debian GNU/Linux system. I use the GTK version GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of 2009-07-11 on mithlond This is the revision I compiled (with make bootstrap): commit 9bcb78f2eeba70b10d6d1d74dd98c1b36dfc1ca6 Author: Chong Yidong Date: 2009-07-11 16:36:05 +0000 * simple.el (temporary-goal-column): Change the value for line-move-visual to a cons cell. (line-move-visual): Record or set the window hscroll, if necessary (Bug#3494). (line-move-1): Handle cons value of temporary-goal-column. From cyd@stupidchicken.com Sat Jul 11 15:59:23 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 11 Jul 2009 22:59:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po28.its.yale.edu (pantheon-po28.its.yale.edu [130.132.50.123]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6BMxJZ5020878 for <3494@emacsbugs.donarmstrong.com>; Sat, 11 Jul 2009 15:59:21 -0700 Received: from furry (static-71-161-162-90.spfdma.east.verizon.net [71.161.162.90]) (authenticated bits=0) by pantheon-po28.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6BMxBYI011741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 11 Jul 2009 18:59:11 -0400 Received: by furry (Postfix, from userid 1000) id 41AA3C09B; Sat, 11 Jul 2009 18:59:10 -0400 (EDT) From: Chong Yidong To: Teemu Likonen Cc: 3494@debbugs.gnu.org, Johan =?utf-8?Q?Bockg=C3=A5rd?= , Kees Bakker Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling References: <87zlbbnp8z.fsf@iki.fi> <871vonw2rq.fsf@stupidchicken.com> <87k52f5c8n.fsf@iki.fi> Date: Sat, 11 Jul 2009 18:59:09 -0400 In-Reply-To: <87k52f5c8n.fsf@iki.fi> (Teemu Likonen's message of "Sat, 11 Jul 2009 21:02:48 +0300") Message-ID: <87fxd2su6a.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Teemu Likonen writes: >>> 1. emacs -Q -f toggle-truncate-lines >>> 2. Don't change the size of the window. Create test buffer with >>> commands: >>> C-u 85 a RET >>> C-u 100 b RET >>> 3. Move the cursor to the end of the first (the line with a's). >>> 4. Enable goal column: C-x C-n >>> 5. Repeat C-n and C-p. The column changes quite wildly. >>> >>> The problem goes away if I set line-move-visual to nil. >> >> I can't reproduce this. Could you try with the latest patch in the >> trunk? > > The above is 100% reproducible in my Debian GNU/Linux system. > > GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of > 2009-07-11 on mithlond I can't reproduce it. Your recipe is missing one step: C-x C-n is a disabled command, so you need to type "y" to enable it, as I presume you intended. I don't observe any column change, though. Did you do xrdb -remove beforehand? (I can't reproduce the problem with or without Xresource settings.) What's the size of your Emacs frame? From tlikonen@iki.fi Sun Jul 12 00:05:50 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 12 Jul 2009 07:05:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.1 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from jenni2.inet.fi (mta-out.inet.fi [195.156.147.13]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6C75iob031807 for <3494@emacsbugs.donarmstrong.com>; Sun, 12 Jul 2009 00:05:46 -0700 Received: from mithlond.arda.local (80.220.180.181) by jenni2.inet.fi (8.5.014) id 4A52D15A0029E407; Sun, 12 Jul 2009 10:05:42 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MPt80-00016j-0n; Sun, 12 Jul 2009 10:05:40 +0300 From: Teemu Likonen To: Chong Yidong Cc: 3494@debbugs.gnu.org, Johan =?iso-8859-1?Q?Bockg=E5rd?= , Kees Bakker Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling In-Reply-To: <87fxd2su6a.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 11 Jul 2009 18:59:09 -0400") References: <87zlbbnp8z.fsf@iki.fi> <871vonw2rq.fsf@stupidchicken.com> <87k52f5c8n.fsf@iki.fi> <87fxd2su6a.fsf@stupidchicken.com> Date: Sun, 12 Jul 2009 10:05:40 +0300 Message-ID: <871vombcu3.fsf@iki.fi> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2009-07-11 18:59 (-0400), Chong Yidong wrote: > I can't reproduce it. Your recipe is missing one step: C-x C-n is a > disabled command, so you need to type "y" to enable it, as I presume > you intended. I don't observe any column change, though. > > Did you do xrdb -remove beforehand? (I can't reproduce the problem > with or without Xresource settings.) What's the size of your Emacs > frame? Yes, I enabled the disabled set-goal-column command with "y". The bug appears on terminal too. Here's another, even more accurate recipe what I do. I uploaded screenshots too (see the link below). This time I use Emacs in terminal: 1. xrdb -remove; xterm -geometry 80x25 2. emacs -Q -nw -f toggle-truncate-lines -f column-number-mode 3. Create content exactly like this: C-u 85 a RET C-u 100 b RET 4. Press C-p two times to move the the beginning of "a" line. 5. Press C-e to get to the end of "a" line. (See screenshot 1.) 6. Press C-x C-n and "y" to set goal column. This message is displayed: Goal column 85 (use C-x C-n with an arg to unset it) 7. Press C-n. The screen is scrolled horizontally and the cursor at the column 94. (See screenshot 2.) Let's continue to reproduce the bug which appears without goal column. 8. Disable the goal column: C-u C-x C-n 9. Move to the beginning of the "a" line. 10. Move to the end of the "a" line (C-e). Again the screen looks like in my first screenshot, see the item 5 above. 11. Press C-n to go the next line. The screen is scrolled horizontally and the cursor column is correct: 85. (See screenshot 3.) 12. Press C-p to go the previous line. The cursor stays on the "b" line but the cursor column is now 79. (See screenshot 4.) None of these bugs appear when line-move-visual=nil. Screenshots here: http://dtw.silverentertainment.fi/pics/emacs/emacs-bug-3494.png From cyd@stupidchicken.com Sun Jul 12 09:05:08 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 12 Jul 2009 16:05:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.8 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po28.its.yale.edu (pantheon-po28.its.yale.edu [130.132.50.123]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6CG54FX019036 for <3494@emacsbugs.donarmstrong.com>; Sun, 12 Jul 2009 09:05:05 -0700 Received: from furry (c-71-192-161-14.hsd1.nh.comcast.net [71.192.161.14]) (authenticated bits=0) by pantheon-po28.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6CG4sVO018565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 12 Jul 2009 12:04:54 -0400 Received: by furry (Postfix, from userid 1000) id C0423C09B; Sun, 12 Jul 2009 12:04:53 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: Teemu Likonen , 3494@debbugs.gnu.org, Johan =?utf-8?Q?Bockg=C3=A5rd?= , Kees Bakker Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling References: <87zlbbnp8z.fsf@iki.fi> <871vonw2rq.fsf@stupidchicken.com> <87k52f5c8n.fsf@iki.fi> <87fxd2su6a.fsf@stupidchicken.com> <871vombcu3.fsf@iki.fi> Date: Sun, 12 Jul 2009 12:04:53 -0400 In-Reply-To: <871vombcu3.fsf@iki.fi> (Teemu Likonen's message of "Sun, 12 Jul 2009 10:05:40 +0300") Message-ID: <871volq44a.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) > 1. xrdb -remove; xterm -geometry 80x25 > 2. emacs -Q -nw -f toggle-truncate-lines -f column-number-mode > 3. C-u 85 a RET > C-u 100 b RET > 4. Press C-p two times to move the the beginning of "a" line. > 5. Press C-e to get to the end of "a" line. (See screenshot 1.) > 6. Press C-x C-n and "y" to set goal column. > 7. Press C-n. The screen is scrolled horizontally and the cursor at the > column 94. (See screenshot 2.) I see the problem. It's not trivial to fix; maybe it's preferable for `line-move' to call `line-move-1' instead of `line-move-visual' when the window is hscrolled. Stefan, WDYT? From lennart.borgman@gmail.com Sun Jul 12 09:38:50 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 12 Jul 2009 16:38:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f225.google.com (mail-bw0-f225.google.com [209.85.218.225]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6CGcgJW024815 for <3494@emacsbugs.donarmstrong.com>; Sun, 12 Jul 2009 09:38:43 -0700 Received: by bwz25 with SMTP id 25so78142bwz.1 for <3494@emacsbugs.donarmstrong.com>; Sun, 12 Jul 2009 09:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=rWvLPD8vAtVIqE96Vp8FAk0Lk1MwJcR0srZtxQr8n6U=; b=tegENjl6g2Djo6BH+V0ErOWXsMcVD0OFJ8gLHbiBq9tyk7aVth6Qzxvat5qiWQ/Oac ol76ZyIMxtjNEanzUqOHebKf2urI5X2IYg3BK8ScCvatrh+47S96L3aXXuf4LdOeIjlK S4AJP1WwREgESEwcFFNV+dZAf5cjybzEy8fj4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xGdaUyZY2bKtn6cU2Vzw/MOsI4UWdTFv/fT2ffF5l5WyRW90fIUNB8xDqdzwpDrPlv Z7sRsQTWjgStWd8gDtgQA6Wq66KU6jq6Ojge4SiR3Xt5mX276MsuNYjasE2d9L8nHLsH Ykcz8OyegLuAegUH196nGnE2nmDXskhH42eZY= MIME-Version: 1.0 Received: by 10.223.114.207 with SMTP id f15mr1643907faq.90.1247416716364; Sun, 12 Jul 2009 09:38:36 -0700 (PDT) In-Reply-To: <871volq44a.fsf@stupidchicken.com> References: <87zlbbnp8z.fsf@iki.fi> <871vonw2rq.fsf@stupidchicken.com> <87k52f5c8n.fsf@iki.fi> <87fxd2su6a.fsf@stupidchicken.com> <871vombcu3.fsf@iki.fi> <871volq44a.fsf@stupidchicken.com> Date: Sun, 12 Jul 2009 18:38:36 +0200 Message-ID: Subject: Re: bug#3494: 23.0.94; line-move-visual: temporary goal column confused by hscrolling From: Lennart Borgman To: Chong Yidong , 3494@debbugs.gnu.org Cc: Stefan Monnier , Kees Bakker , Teemu Likonen , =?UTF-8?Q?Johan_Bockg=C3=A5rd?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Jul 12, 2009 at 6:04 PM, Chong Yidong wrote: >> =C2=A01. xrdb -remove; xterm -geometry 80x25 >> =C2=A02. emacs -Q -nw -f toggle-truncate-lines -f column-number-mode >> =C2=A03. C-u 85 a RET >> =C2=A0 =C2=A0 C-u 100 b RET >> =C2=A04. Press C-p two times to move the the beginning of "a" line. >> =C2=A05. Press C-e to get to the end of "a" line. (See screenshot 1.) >> =C2=A06. Press C-x C-n and "y" to set goal column. >> =C2=A07. Press C-n. The screen is scrolled horizontally and the cursor a= t the >> =C2=A0 =C2=A0 column 94. (See screenshot 2.) > > I see the problem. =C2=A0It's not trivial to fix; maybe it's preferable f= or > `line-move' to call `line-move-1' instead of `line-move-visual' when the > window is hscrolled. I don't understand what is wrong here, but is this perhaps related to the problem with posn-at-point that I reported for example here: http://www.opensubscriber.com/message/emacs-devel@gnu.org/10283709.html From monnier@iro.umontreal.ca Tue Jul 14 19:05:55 2009 Received: (at 3494) by emacsbugs.donarmstrong.com; 15 Jul 2009 02:05:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.1 required=4.0 tests=AWL,FOURLA,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6F25otY031655 for <3494@emacsbugs.donarmstrong.com>; Tue, 14 Jul 2009 19:05:51 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYEACvWXErO+KNz/2dsb2JhbACBUdAphAgFhm4 X-IronPort-AV: E=Sophos;i="4.42,401,1243828800"; d="scan'208";a="41627679" Received: from 206-248-163-115.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.115]) by ironport2-out.teksavvy.com with ESMTP; 14 Jul 2009 22:05:44 -0400 Received: by pastel.home (Postfix, from userid 20848) id 5A5277EF7; Tue, 14 Jul 2009 22:05:59 -0400 (EDT) From: Stefan Monnier To: Chong Yidong Cc: 3494@debbugs.gnu.org Subject: Re: Review line-move-visual patch Message-ID: References: <87ws6ff8b5.fsf@stupidchicken.com> Date: Tue, 14 Jul 2009 22:05:59 -0400 In-Reply-To: <87ws6ff8b5.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 11 Jul 2009 13:17:34 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I just checked in a patch into the trunk, which makes line-move-visual > play properly with truncated lines (Bugs 3494 and 3805). I think it > should go to the branch as well. Could you review it? > 2009-07-11 Chong Yidong > * simple.el (temporary-goal-column): Change the value for > line-move-visual to a cons cell. > (line-move-visual): Record or set the window hscroll, if > necessary (Bug#3494). > (line-move-1): Handle cons value of temporary-goal-column. The problem with this code is that vertical-motion is defined as: LINES can optionally take the form (COLS . LINES), in which case the motion will not stop at the start of a screen line but on its column COLS (if such exists on that line, that is). but without specifying what is meant by COLS w.r.t hscroll. Similarly the docstring refers to "start of the screen line" without making it clear what it means in the case of hscroll. So, I'm not sure if doing it like you've done is right or not. Maybe a better solution is to use COLS + HSCROLL as the temporary-goal-column"; it would at least avoid having to change temporary-goal-column to accept a cons cell rather than only a number. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 17 02:09:21 2011 Received: (at control) by debbugs.gnu.org; 17 Sep 2011 06:09:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4o5Y-0003Xh-L7 for submit@debbugs.gnu.org; Sat, 17 Sep 2011 02:09:20 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4o5W-0003XZ-7u for control@debbugs.gnu.org; Sat, 17 Sep 2011 02:09:19 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R4o0m-0002VD-By for control@debbugs.gnu.org; Sat, 17 Sep 2011 08:04:24 +0200 Date: Sat, 17 Sep 2011 08:01:05 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #3494 X-MailScanner-ID: 1R4o0m-0002VD-By X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316844264.43317@GFsoNq8tjiUOFn3haCyzpA X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 3494 fixed close 3494 24.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 17 02:20:14 2011 Received: (at 3494) by debbugs.gnu.org; 17 Sep 2011 06:20:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4oG5-0004eH-Nl for submit@debbugs.gnu.org; Sat, 17 Sep 2011 02:20:14 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4oFb-0004be-KJ for 3494@debbugs.gnu.org; Sat, 17 Sep 2011 02:19:58 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R4oAq-0002kC-Rc; Sat, 17 Sep 2011 08:14:48 +0200 From: Lars Magne Ingebrigtsen To: kees@altium.nl (Kees Bakker) Subject: Re: 23.1.50; Strange cursor movement in truncation mode In-Reply-To: <20090710092328.1D6914033D@koli.tasking.nl> (Kees Bakker's message of "Fri, 10 Jul 2009 11:23:28 +0200 (CEST)") Date: Sat, 17 Sep 2011 08:01:01 +0200 Message-ID: References: <20090710092328.1D6914033D@koli.tasking.nl> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Ikonika's _Contact, Love, Want, Have_: "Video Delays" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1R4oAq-0002kC-Rc X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316844888.94137@5hLTDWeimwwg+5MZWZhEmw X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 3494 Cc: 3494@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) kees@altium.nl (Kees Bakker) writes: > 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 > 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 > 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 > > Resize your screen to 50 characters wide, and do a toggle-truncate-lines. > Emacs23-gtk will show arrows on the right (and left) for the part of the > lines that is not visible. > > Move the cursor to the end of the first line. Then move down, up and > down. And again up, down, up, down. You'll see that the cursor does not > go the same position in the second each time. I believe this was fixed by Eli's recent changes in this department, so I'm closing this report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Fri Jun 20 20:09:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 15 Oct 2011 11:24:03 +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