unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3396: next-line and previous-line do not work correctly near long lines
@ 2009-05-27  1:13 Shannon Jones
  2009-05-27  4:58 ` Jason Rumney
  0 siblings, 1 reply; 2+ messages in thread
From: Shannon Jones @ 2009-05-27  1:13 UTC (permalink / raw)
  To: emacs-pretest-bug

This is similar to bug#3386 posted by Heinrich Rommerskirchen.  It's somewhat different, so I decided to post a new bug report.

* Emacs version: GNU Emacs 23.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.10.4) of 2009-05-26

Also reproduced on 23.0.94.1 on Windows.

* Compiled on CentOS 5.3.

* No options given to configure

* To reproduce:

Run: emacs -Q (happens with or without -nw)
C-x b *scratch*
C-u 1000 X
<RET>

This will put 1000 X's on the screen and the cursor will be on the line below them.  The line of X's should wrap over several lines of the screen with continuation marks at the end of each line.

Hit C-p. This *should* put the cursor at the beginning of the line of X's.  Instead, it puts the cursor at the left column on the screen, but somewhere in the middle of the line of X's.  Hitting C-p again a few times moves the cursor somewhere else on the line, but still at the left-most column. Hitting C-n now should move you to the beginning of the next physical line (the blank one after the X's), but instead moves you somewhere else on the line of X's (but still in the first column).

In other words, next-line and previous-line should move relative to physical lines in the file, but are instead moving relative to lines on the screen.  Changing the screen width changes the behavior of C-n and C-p when the lines are long enough to wrap.

This is different from Emacs 22.  I noticed this when writing macros that do something to one line, then move to the next line at the end macro to prepare for the next run.  The macro failed on lines that were longer than my screen width.






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

* bug#3396: next-line and previous-line do not work correctly near long lines
  2009-05-27  1:13 bug#3396: next-line and previous-line do not work correctly near long lines Shannon Jones
@ 2009-05-27  4:58 ` Jason Rumney
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Rumney @ 2009-05-27  4:58 UTC (permalink / raw)
  To: Shannon Jones, 3396

Shannon Jones wrote:
> Hit C-p. This *should* put the cursor at the beginning of the line of X's.  Instead, it puts the cursor at the left column on the screen, but somewhere in the middle of the line of X's.

This is intentional, see etc/NEWS under the heading "Editing Changes in 
Emacs 23.1".


> This is different from Emacs 22.  I noticed this when writing macros that do something to one line, then move to the next line at the end macro to prepare for the next run.  The macro failed on lines that were longer than my screen width.
>   

The effect of this change on keyboard macros is currently being 
discussed on emacs-devel.






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

end of thread, other threads:[~2009-05-27  4:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27  1:13 bug#3396: next-line and previous-line do not work correctly near long lines Shannon Jones
2009-05-27  4:58 ` Jason Rumney

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).