From: Eli Zaretskii <eliz@gnu.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 971@debbugs.gnu.org, Roland.Winkler@physik.uni-erlangen.de
Subject: bug#971: 23.0.60; next-line, previous-line and goal-column
Date: Fri, 16 Sep 2011 12:38:35 +0300 [thread overview]
Message-ID: <83k498vnc4.fsf@gnu.org> (raw)
In-Reply-To: <m3y5xvc6m7.fsf@stories.gnus.org>
> 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.
next prev parent reply other threads:[~2011-09-16 9:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k498vnc4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=971@debbugs.gnu.org \
--cc=Roland.Winkler@physik.uni-erlangen.de \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.