all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#971: 23.0.60; next-line, previous-line and goal-column
@ 2008-09-12 13:34 Roland Winkler
  2011-09-11 17:48 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Roland Winkler @ 2008-09-12 13:34 UTC (permalink / raw
  To: emacs-pretest-bug

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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#971: 23.0.60; next-line, previous-line and goal-column
@ 2008-09-18  6:06 martin rudalics
  2008-09-18 14:34 ` Roland Winkler
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2008-09-18  6:06 UTC (permalink / raw
  To: 971; +Cc: Roland Winkler

 > 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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#971: 23.0.60; next-line, previous-line and goal-column
  2008-09-18  6:06 martin rudalics
@ 2008-09-18 14:34 ` Roland Winkler
  0 siblings, 0 replies; 8+ messages in thread
From: Roland Winkler @ 2008-09-18 14:34 UTC (permalink / raw
  To: martin rudalics; +Cc: 971

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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#971: 23.0.60; next-line, previous-line and goal-column
  2008-09-12 13:34 bug#971: 23.0.60; next-line, previous-line and goal-column Roland Winkler
@ 2011-09-11 17:48 ` Lars Magne Ingebrigtsen
  2011-09-16  9:38   ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11 17:48 UTC (permalink / raw
  To: Roland Winkler; +Cc: 971

"Roland Winkler" <Roland.Winkler@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/





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#971: 23.0.60; next-line, previous-line and goal-column
  2011-09-11 17:48 ` Lars Magne Ingebrigtsen
@ 2011-09-16  9:38   ` Eli Zaretskii
  2011-09-16 13:38     ` Eli Zaretskii
  2011-09-16 13:44     ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-09-16  9:38 UTC (permalink / raw
  To: Lars Magne Ingebrigtsen; +Cc: 971, Roland.Winkler

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 11 Sep 2011 19:48:48 +0200
> Cc: 971@debbugs.gnu.org
> 
> "Roland Winkler" <Roland.Winkler@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.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#971: 23.0.60; next-line, previous-line and goal-column
  2011-09-16  9:38   ` Eli Zaretskii
@ 2011-09-16 13:38     ` Eli Zaretskii
  2011-09-16 13:44     ` Stefan Monnier
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-09-16 13:38 UTC (permalink / raw
  To: larsi; +Cc: 971, Roland Winkler

> Date: Fri, 16 Sep 2011 12:38:35 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 971@debbugs.gnu.org, Roland.Winkler@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?






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#971: 23.0.60; next-line, previous-line and goal-column
  2011-09-16  9:38   ` Eli Zaretskii
  2011-09-16 13:38     ` Eli Zaretskii
@ 2011-09-16 13:44     ` Stefan Monnier
  2011-09-16 17:18       ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-09-16 13:44 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: Lars Magne Ingebrigtsen, 971, Roland.Winkler

> 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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#971: 23.0.60; next-line, previous-line and goal-column
  2011-09-16 13:44     ` Stefan Monnier
@ 2011-09-16 17:18       ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-09-16 17:18 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 971-done, larsi, Roland Winkler

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>,  971@debbugs.gnu.org,  Roland.Winkler@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-16 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 13:34 bug#971: 23.0.60; next-line, previous-line and goal-column Roland Winkler
2011-09-11 17:48 ` Lars Magne Ingebrigtsen
2011-09-16  9:38   ` Eli Zaretskii
2011-09-16 13:38     ` Eli Zaretskii
2011-09-16 13:44     ` Stefan Monnier
2011-09-16 17:18       ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2008-09-18  6:06 martin rudalics
2008-09-18 14:34 ` Roland Winkler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.