GNU bug report logs - #971
23.0.60; next-line, previous-line and goal-column

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>

Date: Fri, 12 Sep 2008 13:40:04 UTC

Severity: normal

Tags: confirmed

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 971 in the body.
You can then email your comments to 971 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#971; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; next-line, previous-line and goal-column
Date: Fri, 12 Sep 2008 15:34:28 +0200
When goal-column has a value larger than the window width, next line
and previous-line behave oddly. Visit file foo.txt, choose a window
width of, say, 40, and set goal-column to 50. If initially point is
at the beginning of line, next-line and previous-line put point in a
column smaller than goal-column. Executing next-line again puts
point at the end of the line past goal-column.  

Results also behave on the value of truncate-lines. The above refers
to truncate-lines being t. If it is nil, previous-line doesn't do
anything for me. (It does not move point backwards.)

There is no such problem with emacs 22.2.

cat > foo.txt << EOF
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo bar |
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo bar
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo bar |
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo bar |
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo bar
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo bar |
| foo bar | foo bar | foo bar | foo bar | foo bar | foo bar | foo bar
EOF

In GNU Emacs 23.0.60.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.6)
 of 2008-09-07 on lukas




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#971; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 971 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 971 <at> debbugs.gnu.org
Cc: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>
Subject: Re: 23.0.60; next-line, previous-line and goal-column
Date: Thu, 18 Sep 2008 08:06:25 +0200
> When goal-column has a value larger than the window width, next line
> and previous-line behave oddly. Visit file foo.txt, choose a window
> width of, say, 40, and set goal-column to 50. If initially point is
> at the beginning of line, next-line and previous-line put point in a
> column smaller than goal-column. Executing next-line again puts
> point at the end of the line past goal-column.
>
> Results also behave on the value of truncate-lines. The above refers
> to truncate-lines being t. If it is nil, previous-line doesn't do
> anything for me. (It does not move point backwards.)
>
> There is no such problem with emacs 22.2.

I suppose this has been fixed with Chong's recent change to
`vertical-motion'.  Can you confirm?

martin




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#971; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 971 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 971 <at> debbugs.gnu.org
Subject: Re: 23.0.60; next-line, previous-line and goal-column
Date: Thu, 18 Sep 2008 16:34:52 +0200
On Thu Sep 18 2008 martin rudalics wrote:
>  > When goal-column has a value larger than the window width, next line
>  > and previous-line behave oddly. Visit file foo.txt, choose a window
>  > width of, say, 40, and set goal-column to 50. If initially point is
>  > at the beginning of line, next-line and previous-line put point in a
>  > column smaller than goal-column. Executing next-line again puts
>  > point at the end of the line past goal-column.
>  >
>  > Results also behave on the value of truncate-lines. The above refers
>  > to truncate-lines being t. If it is nil, previous-line doesn't do
>  > anything for me. (It does not move point backwards.)
>  >
>  > There is no such problem with emacs 22.2.
> 
> I suppose this has been fixed with Chong's recent change to
> `vertical-motion'.  Can you confirm?

No, the problem still persists. I just built a fresh emacs from CVS.
It still gives me the very same problems described in the original
report.

Roland




Added tag(s) confirmed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 11 Sep 2011 17:57:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#971; Package emacs. (Sun, 11 Sep 2011 17:59:02 GMT) Full text and rfc822 format available.

Message #20 received at 971 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>
Cc: 971 <at> debbugs.gnu.org
Subject: Re: 23.0.60; next-line, previous-line and goal-column
Date: Sun, 11 Sep 2011 19:48:48 +0200
"Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de> writes:

> When goal-column has a value larger than the window width, next line
> and previous-line behave oddly. Visit file foo.txt, choose a window
> width of, say, 40, and set goal-column to 50. If initially point is
> at the beginning of line, next-line and previous-line put point in a
> column smaller than goal-column. Executing next-line again puts
> point at the end of the line past goal-column.  

I can verify that this bug still exists in Emacs 24.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#971; Package emacs. (Fri, 16 Sep 2011 09:44:02 GMT) Full text and rfc822 format available.

Message #23 received at 971 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 971 <at> debbugs.gnu.org, Roland.Winkler <at> physik.uni-erlangen.de
Subject: Re: bug#971: 23.0.60; next-line, previous-line and goal-column
Date: Fri, 16 Sep 2011 12:38:35 +0300
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Date: Sun, 11 Sep 2011 19:48:48 +0200
> Cc: 971 <at> debbugs.gnu.org
> 
> "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de> writes:
> 
> > When goal-column has a value larger than the window width, next line
> > and previous-line behave oddly. Visit file foo.txt, choose a window
> > width of, say, 40, and set goal-column to 50. If initially point is
> > at the beginning of line, next-line and previous-line put point in a
> > column smaller than goal-column. Executing next-line again puts
> > point at the end of the line past goal-column.  
> 
> I can verify that this bug still exists in Emacs 24.

This happens because the (now default) line-move-visual operation of
next-line is fundamentally incompatible with a non-nil setting of
goal-column, when the window with is smaller than goal-column's value.
If you reset line-move-visual to nil, the problem disappears.

line-move-visual (the function) tries to support goal-column, but in a
manner that cannot possibly work when we move by visual lines (as
opposed to logical lines) and the window is too narrow, because visual
lines simply don't have pixel coordinates that correspond to
goal-column in this case.  So it does the best it can: move to the end
of the visual line.

An easy way of solving this is dropping support for goal-column when
line-move-visual is non-nil.  If that's unacceptable, Someoneā„¢ will
have to come up with a specification for what Emacs should do in this
use case, because I cannot think of any reasonable behavior.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#971; Package emacs. (Fri, 16 Sep 2011 13:45:02 GMT) Full text and rfc822 format available.

Message #26 received at 971 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: larsi <at> gnus.org
Cc: 971 <at> debbugs.gnu.org, Roland Winkler <winkler <at> gnu.org>
Subject: Re: bug#971: 23.0.60; next-line, previous-line and goal-column
Date: Fri, 16 Sep 2011 16:38:45 +0300
> Date: Fri, 16 Sep 2011 12:38:35 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 971 <at> debbugs.gnu.org, Roland.Winkler <at> physik.uni-erlangen.de
> 
> An easy way of solving this is dropping support for goal-column when
> line-move-visual is non-nil.  If that's unacceptable, Someoneā„¢ will
> have to come up with a specification for what Emacs should do in this
> use case, because I cannot think of any reasonable behavior.

Actually, I can think of one reasonable behavior: if goal-column is
set to a non-nil value, ignore the value of line-move-visual and
always move by logical lines.  This will do the same as it does today
when lines are not wrapped, and do the only reasonable thing
otherwise.

Technically, this means that line-mode should call line-move-1 if
goal-column is set, even if line-move-visual is non-nil.

Thoughts?





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#971; Package emacs. (Fri, 16 Sep 2011 13:50:02 GMT) Full text and rfc822 format available.

Message #29 received at 971 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>, 971 <at> debbugs.gnu.org,
	Roland.Winkler <at> physik.uni-erlangen.de
Subject: Re: bug#971: 23.0.60; next-line, previous-line and goal-column
Date: Fri, 16 Sep 2011 09:44:15 -0400
> An easy way of solving this is dropping support for goal-column when
> line-move-visual is non-nil.

Except of course when we truncate-lines.
That sounds about right.  Tho at the same time, line-move-visual is
a global setting whereas goal-column is typically buffer-local, so maybe
it would make more sense to ignore line-move-visual when goal-column
is set.


        Stefan




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 16 Sep 2011 17:25:02 GMT) Full text and rfc822 format available.

Notification sent to "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>:
bug acknowledged by developer. (Fri, 16 Sep 2011 17:25:03 GMT) Full text and rfc822 format available.

Message #34 received at 971-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 971-done <at> debbugs.gnu.org, larsi <at> gnus.org, Roland Winkler <winkler <at> gnu.org>
Subject: Re: bug#971: 23.0.60; next-line, previous-line and goal-column
Date: Fri, 16 Sep 2011 20:18:12 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>,  971 <at> debbugs.gnu.org,  Roland.Winkler <at> physik.uni-erlangen.de
> Date: Fri, 16 Sep 2011 09:44:15 -0400
> 
> > An easy way of solving this is dropping support for goal-column when
> > line-move-visual is non-nil.
> 
> Except of course when we truncate-lines.
> That sounds about right.  Tho at the same time, line-move-visual is
> a global setting whereas goal-column is typically buffer-local, so maybe
> it would make more sense to ignore line-move-visual when goal-column
> is set.

I've committed a change (revision 105795 on the trunk) that ignores
line-move-visual's value when goal-column is non-nil.

I'm therefore closing this bug.




Message #35 received at 971-done <at> debbugs.gnu.org (full text, mbox):

From: "Roland Winkler" <winkler <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 971-done <at> debbugs.gnu.org, larsi <at> gnus.org,
	Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#971: 23.0.60; next-line, previous-line and goal-column
Date: Sat, 17 Sep 2011 00:46:01 -0500
On Fri Sep 16 2011 Eli Zaretskii wrote:
> I've committed a change (revision 105795 on the trunk) that ignores
> line-move-visual's value when goal-column is non-nil.
> 
> I'm therefore closing this bug.

Thanks for looking into this. I should have mentioned in my original
report that I ran into this bug in the context of proced which uses
goal-column. If one selected one of proced 's longer formats the
goal-column bug was bothering me for quite a while. But then (I
don't remember when / why) this problem disappeared and I forgot
about it.

Anyway, thanks again for looking into this more thoroughly.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Oct 2011 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.