GNU bug report logs - #9607
incorrect behavior with "automatic-hscroll-mode nil" in ncurses/vt220 text operation; wrong in 23 but ok in 22.1

Previous Next

Package: emacs;

Reported by: David Lawless <david_lawless <at> flumedata.com>

Date: Mon, 26 Sep 2011 21:24:02 UTC

Severity: normal

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 9607 in the body.
You can then email your comments to 9607 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-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Mon, 26 Sep 2011 21:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Lawless <david_lawless <at> flumedata.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 26 Sep 2011 21:24:02 GMT) Full text and rfc822 format available.

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

From: David Lawless <david_lawless <at> flumedata.com>
To: bug-gnu-emacs <at> gnu.org
Subject: incorrect behavior with "automatic-hscroll-mode nil" in ncurses/vt220
	text operation; wrong in 23 but ok in 22.1
Date: Mon, 26 Sep 2011 17:19:05 -0400
have "(setq automatic-hscroll-mode nil)" in .emacs file

edit wide output of file copied from /proc/interrupts
(machine has 12 cores)

place cursor at around column 12, then scroll out
to left view with "scroll-left" so ends-of-lines
appear in middle of windows, then from mapped
key issue "next-line" twice

first time it behaves correctly, second time
display scrolls horizontally so cursor is visible,
which it should not do

was upgrading from 20.5a to 23.3a when noticed
this; went back to 22.1 and it works ok


In GNU Emacs 22.1.1 (x86_64-unknown-linux-gnu)
 of 2011-09-26 on siobhan
configured using `configure  '--without-x''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  file-name-shadow-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
ESC x TAB C-g ESC x r e p TAB o TAB DEL o t TAB DEL 
r TAB C-j

Recent messages:
("emacs")
Loading hi-lock...done
Loading cc-mode...done
Loading make-mode...done
Making completion list...
Loading help-mode...done
Quit [2 times]
Making completion list... [2 times]
Loading emacsbug...done




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Mon, 26 Sep 2011 21:38:02 GMT) Full text and rfc822 format available.

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

From: David Lawless <david_lawless <at> flumedata.com>
To: 9607 <at> debbugs.gnu.org
Date: Mon, 26 Sep 2011 17:36:14 -0400
see that in 22.1 the .emacs file setting is

   (setq automatic-hscrolling nil)

instead of 

   (setq automatic-hscroll-mode nil)

This does not change that the behavior is broken
in version 23 and works ok in 21.1.

Would venture to guess that it stopped
working correctly at the time the code was
modified to effect the above variable name
change.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Tue, 27 Sep 2011 00:35:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: David Lawless <david_lawless <at> flumedata.com>
Cc: 9607 <at> debbugs.gnu.org
Subject: Re: bug#9607: incorrect behavior with "automatic-hscroll-mode nil" in
	ncurses/vt220 text operation; wrong in 23 but ok in 22.1
Date: Mon, 26 Sep 2011 20:33:47 -0400
David Lawless wrote:

> have "(setq automatic-hscroll-mode nil)" in .emacs file

Did you mean `auto-hscroll-mode'?
There is no `automatic-hscroll-mode' in Emacs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Tue, 27 Sep 2011 00:49:03 GMT) Full text and rfc822 format available.

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

From: David Lawless <david_lawless <at> flumedata.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 9607 <at> debbugs.gnu.org
Subject: Re: bug#9607: incorrect behavior with
	"automatic-hscroll-mode nil" in ncurses/vt220 text operation;
	wrong in 23 but ok in 22.1
Date: Mon, 26 Sep 2011 20:47:44 -0400
Yes, miskeyed it.  Emacs didn't spit at it when
it was in .emacs so I did have it right at the
time.  23 is gone so typed that from inaccurate
recollection.


At 08:33 PM 9/26/2011 -0400, Glenn Morris wrote:
>David Lawless wrote:
>
>> have "(setq automatic-hscroll-mode nil)" in .emacs file
>
>Did you mean `auto-hscroll-mode'?
>There is no `automatic-hscroll-mode' in Emacs.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Tue, 27 Sep 2011 02:31:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: David Lawless <david_lawless <at> flumedata.com>
Cc: Glenn Morris <rgm <at> gnu.org>, 9607 <at> debbugs.gnu.org
Subject: Re: bug#9607: incorrect behavior with "automatic-hscroll-mode nil" in
	ncurses/vt220 text operation; wrong in 23 but ok in 22.1
Date: Mon, 26 Sep 2011 22:29:51 -0400
> Yes, miskeyed it.  Emacs didn't spit at it when
> it was in .emacs so I did have it right at the
> time.

Emacs wouldn't spit at (setq foo-bar-baz nil) either.  It only complains
if the variable does exist and is read-only.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Tue, 27 Sep 2011 02:46:02 GMT) Full text and rfc822 format available.

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

From: David Lawless <david_lawless <at> flumedata.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Glenn Morris <rgm <at> gnu.org>, 9607 <at> debbugs.gnu.org
Subject: Re: bug#9607: incorrect behavior with
	"auto-hscroll-mode nil" in ncurses/vt220 text operation; wrong
	in 23 but ok in 22.1
Date: Mon, 26 Sep 2011 22:43:50 -0400
Well in any case I've got it right.

Just bisected the bug and it first appears
in 23.2.  23.1 is ok.  Left the old name
in place during bisection and let emacs
apply the alias.

Definitely broken starting in 23.2.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Tue, 27 Sep 2011 03:12:01 GMT) Full text and rfc822 format available.

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

From: David Lawless <david_lawless <at> flumedata.com>
To: 9607 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
	Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#9607: incorrect behavior with
	"auto-hscroll-mode nil" in ncurses/vt220 text operation; wrong
	in 23.2 but ok in 23.1
Date: Mon, 26 Sep 2011 23:10:34 -0400
Also just reproduced the bug by running
emacs in vanilla mode with 'emacs -q' to
inhibit loading .emacs.  Typed commands
and mode settings manually.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Tue, 27 Sep 2011 04:03:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 9607 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,
	David Lawless <david_lawless <at> flumedata.com>
Subject: Re: bug#9607: incorrect behavior with "auto-hscroll-mode nil" in
	ncurses/vt220 text operation; wrong in 23 but ok in 22.1
Date: Tue, 27 Sep 2011 00:01:50 -0400
Present in 23.2 to 24.0.90 inclusive. Recipe:

emacs -Q --eval '(setq auto-hscroll-mode nil)'

Evaluate:
(dotimes (j 5)
  (insert "\n")
  (dotimes (i 10)
    (insert "0123456890 ")))

Put point at start of first line of digits.
M-x scroll-left RET y
;; Window now scrolled to right-hand end of lines
Down arrow  ; first time is ok
Down arrow
  -> second time window scrolls back to left-hand end of line


(setq line-move-visual nil)

avoids the problem.

I guess it's related to the 2009-07 changes to line-move-visual for hscroll.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9607; Package emacs. (Tue, 27 Sep 2011 06:09:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 9607 <at> debbugs.gnu.org, david_lawless <at> flumedata.com
Subject: Re: bug#9607: incorrect behavior with "auto-hscroll-mode nil" in
	ncurses/vt220 text operation; wrong in 23 but ok in 22.1
Date: Tue, 27 Sep 2011 02:07:20 -0400
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Tue, 27 Sep 2011 00:01:50 -0400
> Cc: David Lawless <david_lawless <at> flumedata.com>
> 
> emacs -Q --eval '(setq auto-hscroll-mode nil)'
> 
> Evaluate:
> (dotimes (j 5)
>   (insert "\n")
>   (dotimes (i 10)
>     (insert "0123456890 ")))
> 
> Put point at start of first line of digits.
> M-x scroll-left RET y
> ;; Window now scrolled to right-hand end of lines
> Down arrow  ; first time is ok
> Down arrow
>   -> second time window scrolls back to left-hand end of line
> 
> 
> (setq line-move-visual nil)
> 
> avoids the problem.
> 
> I guess it's related to the 2009-07 changes to line-move-visual for hscroll.

The problem is that line-move-visual assumes that the move begins with
cursor positioned at point, which is false when auto-hscroll-mode is
turned off and point is scrolled out of view.

Before I dive into this mess (again), do we even want to support
auto-hscroll-mode nil _and_ visual line movement?  What if we tell
line-move to invoke logical line movement instead when
auto-hscroll-mode is off?  Would someone object?




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 29 Sep 2011 13:08:01 GMT) Full text and rfc822 format available.

Notification sent to David Lawless <david_lawless <at> flumedata.com>:
bug acknowledged by developer. (Thu, 29 Sep 2011 13:08:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: rgm <at> gnu.org, 9607-done <at> debbugs.gnu.org, david_lawless <at> flumedata.com
Subject: Re: bug#9607: incorrect behavior with "auto-hscroll-mode nil"
	in	ncurses/vt220 text operation; wrong in 23 but ok in 22.1
Date: Thu, 29 Sep 2011 16:06:13 +0300
> Date: Tue, 27 Sep 2011 02:07:20 -0400
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 9607 <at> debbugs.gnu.org, david_lawless <at> flumedata.com
> 
> The problem is that line-move-visual assumes that the move begins with
> cursor positioned at point, which is false when auto-hscroll-mode is
> turned off and point is scrolled out of view.
> 
> Before I dive into this mess (again), do we even want to support
> auto-hscroll-mode nil _and_ visual line movement?  What if we tell
> line-move to invoke logical line movement instead when
> auto-hscroll-mode is off?  Would someone object?

No one objected, so I fixed this in revision 105959 on the trunk by
disabling visual line movement when auto-hscroll-mode is disable and
the window is hscrolled.




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

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

Previous Next


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