unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10076: 24.0.91; Automatic horizontal scrolling
@ 2011-11-19 18:24 Dani Moncayo
  2011-11-19 19:16 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2011-11-19 18:24 UTC (permalink / raw)
  To: 10076

Recipe from "emacs -Q":

1. Type "C-p".
--> Without this, the bug does not show up.

2. Type "C-u 2 C-x < SPC".
--> This scrolls the buffer two position to the left (ok).

3. Type "C-p C-p".
--> The buffer automatically scrolls back to its original position,
which is wrong (see [a]).


---- Footnotes ----

[a] Last paragraph of (info "(emacs)Horizontal Scrolling"):
    If you use those commands to scroll a window horizontally, that sets
 a lower bound for automatic horizontal scrolling.  Automatic scrolling
 will continue to scroll the window, but never farther to the right than
 the amount you previously set by `scroll-left'.


In GNU Emacs 24.0.91.1 (i386-mingw-nt6.1.7601)
 of 2011-11-17 on DANI-PC
Windowing system distributor `Microsoft Corp.', version 6.1.7601
configured using `configure --with-gcc (4.5)'

-- 
Dani Moncayo





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

* bug#10076: 24.0.91; Automatic horizontal scrolling
  2011-11-19 18:24 bug#10076: 24.0.91; Automatic horizontal scrolling Dani Moncayo
@ 2011-11-19 19:16 ` Eli Zaretskii
  2011-11-19 19:54   ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-11-19 19:16 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 10076

> Date: Sat, 19 Nov 2011 19:24:54 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
> 
> Recipe from "emacs -Q":
> 
> 1. Type "C-p".
> --> Without this, the bug does not show up.
> 
> 2. Type "C-u 2 C-x < SPC".
> --> This scrolls the buffer two position to the left (ok).
> 
> 3. Type "C-p C-p".
> --> The buffer automatically scrolls back to its original position,
> which is wrong (see [a]).

This happens in Emacs 23.3 as well, so this isn't a regression.

I will try to take a look at it when I have time and see if it's
something simple to fix.





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

* bug#10076: 24.0.91; Automatic horizontal scrolling
  2011-11-19 19:16 ` Eli Zaretskii
@ 2011-11-19 19:54   ` Eli Zaretskii
  2011-11-19 20:01     ` Eli Zaretskii
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-11-19 19:54 UTC (permalink / raw)
  To: dmoncayo; +Cc: 10076

> Date: Sat, 19 Nov 2011 21:16:00 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 10076@debbugs.gnu.org
> 
> > Date: Sat, 19 Nov 2011 19:24:54 +0100
> > From: Dani Moncayo <dmoncayo@gmail.com>
> > 
> > Recipe from "emacs -Q":
> > 
> > 1. Type "C-p".
> > --> Without this, the bug does not show up.
> > 
> > 2. Type "C-u 2 C-x < SPC".
> > --> This scrolls the buffer two position to the left (ok).
> > 
> > 3. Type "C-p C-p".
> > --> The buffer automatically scrolls back to its original position,
> > which is wrong (see [a]).
> 
> This happens in Emacs 23.3 as well, so this isn't a regression.
> 
> I will try to take a look at it when I have time and see if it's
> something simple to fix.

I found an easy band-aid, and fixed this in revision 106431 on the
trunk.

(The fundamental problem here is that posn-at-point can return nil, if
point is invisible in the window, and line-move-visual doesn't handle
this situation.  Can point be invisible in some case that doesn't
involve hscroll?)





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

* bug#10076: 24.0.91; Automatic horizontal scrolling
  2011-11-19 19:54   ` Eli Zaretskii
@ 2011-11-19 20:01     ` Eli Zaretskii
  2011-11-19 20:35     ` Johan Bockgård
  2011-11-19 21:19     ` Dani Moncayo
  2 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-11-19 20:01 UTC (permalink / raw)
  To: 10076-done

> Date: Sat, 19 Nov 2011 21:54:26 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 10076@debbugs.gnu.org
> 
> I found an easy band-aid, and fixed this in revision 106431 on the
> trunk.

Closing.





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

* bug#10076: 24.0.91; Automatic horizontal scrolling
  2011-11-19 19:54   ` Eli Zaretskii
  2011-11-19 20:01     ` Eli Zaretskii
@ 2011-11-19 20:35     ` Johan Bockgård
  2011-11-19 21:13       ` Eli Zaretskii
  2011-11-19 21:19     ` Dani Moncayo
  2 siblings, 1 reply; 8+ messages in thread
From: Johan Bockgård @ 2011-11-19 20:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 10076

Eli Zaretskii <eliz@gnu.org> writes:

> (The fundamental problem here is that posn-at-point can return nil, if
> point is invisible in the window, and line-move-visual doesn't handle
> this situation.  Can point be invisible in some case that doesn't
> involve hscroll?)

It also happens during ordinary scrolling

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7046#23





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

* bug#10076: 24.0.91; Automatic horizontal scrolling
  2011-11-19 20:35     ` Johan Bockgård
@ 2011-11-19 21:13       ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-11-19 21:13 UTC (permalink / raw)
  To: Johan Bockgård; +Cc: 10076

> From: Johan Bockgård <bojohan@gnu.org>
> Cc: 10076@debbugs.gnu.org
> Date: Sat, 19 Nov 2011 21:35:00 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > (The fundamental problem here is that posn-at-point can return nil, if
> > point is invisible in the window, and line-move-visual doesn't handle
> > this situation.  Can point be invisible in some case that doesn't
> > involve hscroll?)
> 
> It also happens during ordinary scrolling
> 
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7046#23

The problem with posn-at-point returning nil is that you have no way
of knowing the horizontal position of point.

Does it help to call line-move-1 in line-move instead of
line-move-visual, when posn-at-point returns nil?






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

* bug#10076: 24.0.91; Automatic horizontal scrolling
  2011-11-19 19:54   ` Eli Zaretskii
  2011-11-19 20:01     ` Eli Zaretskii
  2011-11-19 20:35     ` Johan Bockgård
@ 2011-11-19 21:19     ` Dani Moncayo
  2011-11-20 18:27       ` bug#7526: " Eli Zaretskii
  2 siblings, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2011-11-19 21:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 10076

> I found an easy band-aid, and fixed this in revision 106431 on the
> trunk.

Thanks Eli.  Your patch also seem to fix bug #7526, which could be closed too.

-- 
Dani Moncayo





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

* bug#7526: bug#10076: 24.0.91; Automatic horizontal scrolling
  2011-11-19 21:19     ` Dani Moncayo
@ 2011-11-20 18:27       ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-11-20 18:27 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 7526-done, 10076

> Date: Sat, 19 Nov 2011 22:19:24 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: 10076@debbugs.gnu.org
> 
> > I found an easy band-aid, and fixed this in revision 106431 on the
> > trunk.
> 
> Thanks Eli.  Your patch also seem to fix bug #7526, which could be closed too.

Done, thanks.





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

end of thread, other threads:[~2011-11-20 18:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-19 18:24 bug#10076: 24.0.91; Automatic horizontal scrolling Dani Moncayo
2011-11-19 19:16 ` Eli Zaretskii
2011-11-19 19:54   ` Eli Zaretskii
2011-11-19 20:01     ` Eli Zaretskii
2011-11-19 20:35     ` Johan Bockgård
2011-11-19 21:13       ` Eli Zaretskii
2011-11-19 21:19     ` Dani Moncayo
2011-11-20 18:27       ` bug#7526: " Eli Zaretskii

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).