* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
@ 2011-11-22 9:51 Dani Moncayo
2011-11-25 11:33 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Dani Moncayo @ 2011-11-22 9:51 UTC (permalink / raw)
To: 10105
[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]
Recipe from "emacs -Q":
1. Eval: "(setq scroll-conservatively 101)".
2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
3. Visit the attached file and from its first line type "C-s h e l l o".
--> The Isearch match should be positioned at the bottom line of the
window (see step #1), but it is at the top line instead.
In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600)
of 2011-11-22 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.6) --no-opt --cflags
-ID:/devel/emacs/libs/libXpm-3.5.8/include
-ID:/devel/emacs/libs/libXpm-3.5.8/src
-ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
-ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
-ID:/devel/emacs/libs/giflib-4.1.4-1/include
-ID:/devel/emacs/libs/jpeg-6b-4/include
-ID:/devel/emacs/libs/tiff-3.8.2-1/include
-ID:/devel/emacs/libs/gnutls-2.10.1/include --ldflags
-LD:/devel/emacs/libs/gnutls-2.10.1/lib'
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: ESN
value of $XMODIFIERS: nil
locale-coding-system: cp1252
default enable-multibyte-characters: t
--
Dani Moncayo
[-- Attachment #2: test.txt --]
[-- Type: text/plain, Size: 295 bytes --]
;; first line
hello
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-22 9:51 bug#10105: 24.0.91; Possible bug in `scroll-conservatively' Dani Moncayo
@ 2011-11-25 11:33 ` Eli Zaretskii
2011-11-25 15:43 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-11-25 11:33 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 10105-done
> Date: Tue, 22 Nov 2011 10:51:43 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
>
> Recipe from "emacs -Q":
> 1. Eval: "(setq scroll-conservatively 101)".
> 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
> 3. Visit the attached file and from its first line type "C-s h e l l o".
>
> --> The Isearch match should be positioned at the bottom line of the
> window (see step #1), but it is at the top line instead.
Fixed in revision 106511 on the trunk.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-25 11:33 ` Eli Zaretskii
@ 2011-11-25 15:43 ` Eli Zaretskii
2011-11-25 16:38 ` Dani Moncayo
2011-11-28 10:38 ` Dani Moncayo
0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2011-11-25 15:43 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 10105
> Date: Fri, 25 Nov 2011 13:33:56 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 10105-done@debbugs.gnu.org
>
> > Date: Tue, 22 Nov 2011 10:51:43 +0100
> > From: Dani Moncayo <dmoncayo@gmail.com>
> >
> > Recipe from "emacs -Q":
> > 1. Eval: "(setq scroll-conservatively 101)".
> > 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
> > 3. Visit the attached file and from its first line type "C-s h e l l o".
> >
> > --> The Isearch match should be positioned at the bottom line of the
> > window (see step #1), but it is at the top line instead.
>
> Fixed in revision 106511 on the trunk.
Err.. make that 106515; 106511 had a thinko that I fixed in the
followup.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-25 15:43 ` Eli Zaretskii
@ 2011-11-25 16:38 ` Dani Moncayo
2011-11-28 10:38 ` Dani Moncayo
1 sibling, 0 replies; 12+ messages in thread
From: Dani Moncayo @ 2011-11-25 16:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 10105
>> > Recipe from "emacs -Q":
>> > 1. Eval: "(setq scroll-conservatively 101)".
>> > 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
>> > 3. Visit the attached file and from its first line type "C-s h e l l o".
>> >
>> > --> The Isearch match should be positioned at the bottom line of the
>> > window (see step #1), but it is at the top line instead.
>>
>> Fixed in revision 106511 on the trunk.
>
> Err.. make that 106515; 106511 had a thinko that I fixed in the
> followup.
Tested. Thank you.
--
Dani Moncayo
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-25 15:43 ` Eli Zaretskii
2011-11-25 16:38 ` Dani Moncayo
@ 2011-11-28 10:38 ` Dani Moncayo
2011-11-28 12:01 ` Eli Zaretskii
2011-11-29 7:05 ` Juri Linkov
1 sibling, 2 replies; 12+ messages in thread
From: Dani Moncayo @ 2011-11-28 10:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 10105
[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]
>> > Recipe from "emacs -Q":
>> > 1. Eval: "(setq scroll-conservatively 101)".
>> > 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
>> > 3. Visit the attached file and from its first line type "C-s h e l l o".
>> >
>> > --> The Isearch match should be positioned at the bottom line of the
>> > window (see step #1), but it is at the top line instead.
>>
>> Fixed in revision 106511 on the trunk.
>
> Err.. make that 106515; 106511 had a thinko that I fixed in the
> followup.
I've just seen another behavior that seem to be still wrong. Please
try this from "emacs -Q":
1. Eval: "(setq scroll-conservatively 101)".
2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
3. Visit the attached file.
4. Type "C-s p C-s C-s C-s".
--> At this point, the Isearch has moved point to line "p1", but it's
positioned at the top of the window. It should be at the bottom.
In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600)
of 2011-11-25 on DANI-PC
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.6) --cflags -fno-omit-frame-pointer'
--
Dani Moncayo
[-- Attachment #2: test-2.txt --]
[-- Type: text/plain, Size: 381 bytes --]
;;begining
p1
p2
;;end
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-28 10:38 ` Dani Moncayo
@ 2011-11-28 12:01 ` Eli Zaretskii
2011-11-28 12:12 ` Dani Moncayo
2011-11-29 7:05 ` Juri Linkov
1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-11-28 12:01 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 10105
> Date: Mon, 28 Nov 2011 11:38:05 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: 10105@debbugs.gnu.org
>
> 1. Eval: "(setq scroll-conservatively 101)".
> 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
> 3. Visit the attached file.
> 4. Type "C-s p C-s C-s C-s".
> --> At this point, the Isearch has moved point to line "p1", but it's
> positioned at the top of the window. It should be at the bottom.
I'm quite sure this is by design: the last C-s scrolls _up_, which
under scroll-conservatively means Emacs should put point at the
topmost line. If you'd get to that line by C-p, that would be where
point should be displayed, right?
Why did you expect it to be at the bottom?
And does the custom-set-faces even make a difference (I cannot test
that where I'm typing this)?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-28 12:01 ` Eli Zaretskii
@ 2011-11-28 12:12 ` Dani Moncayo
2011-11-28 13:08 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Dani Moncayo @ 2011-11-28 12:12 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 10105
>> 1. Eval: "(setq scroll-conservatively 101)".
>> 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
>> 3. Visit the attached file.
>> 4. Type "C-s p C-s C-s C-s".
>> --> At this point, the Isearch has moved point to line "p1", but it's
>> positioned at the top of the window. It should be at the bottom.
>
> I'm quite sure this is by design: the last C-s scrolls _up_, which
> under scroll-conservatively means Emacs should put point at the
> topmost line. If you'd get to that line by C-p, that would be where
> point should be displayed, right?
>
> Why did you expect it to be at the bottom?
Because, after the "failing" C-s, the Isearch begins again from the
top of the buffer, so that the search direction is always (at least
conceptually) from top to bottom, i.e. _fordward_. See info node
"(emacs)Repeat Isearch".
> And does the custom-set-faces even make a difference (I cannot test
> that where I'm typing this)?
Oh no, you're right. Thus step #2 in the above recipe is unnecessary (sorry).
--
Dani Moncayo
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-28 12:12 ` Dani Moncayo
@ 2011-11-28 13:08 ` Eli Zaretskii
2011-11-28 17:37 ` Stefan Monnier
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-11-28 13:08 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 10105
> Date: Mon, 28 Nov 2011 13:12:48 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: 10105@debbugs.gnu.org
>
> > Why did you expect it to be at the bottom?
>
> Because, after the "failing" C-s, the Isearch begins again from the
> top of the buffer, so that the search direction is always (at least
> conceptually) from top to bottom, i.e. _fordward_.
The _search_ direction is forward, that's true. But
scroll-conservatively is not about the search direction, it is about
the direction in which point moves in the buffer from its last
displayed location. And that is _backward_, not forward.
> See info node "(emacs)Repeat Isearch".
I will see your manual reference and raise ya. From info node
"(emacs)Auto Scrolling", pay attention to the last sentence:
Emacs performs "automatic scrolling" when point moves out of the
visible portion of the text.
Normally, this centers point vertically within the window.
However, if you set `scroll-conservatively' to a small number N,
then if you move point just a little off the screen (less than N
lines), Emacs scrolls the text just far enough to bring point back
on screen. By default, `scroll-conservatively' is 0. If you set
`scroll-conservatively' to a large number (larger than 100), Emacs
will never center point as result of scrolling, even if point moves
far away from the text previously displayed in the window. With
such a large value, Emacs will always scroll text just enough for
bringing point into view, so point will end up at the top or bottom
of the window, depending on the scroll direction.
It talks about the direction in which point moves wrt the window, not
the direction of search.
Anyway, this is not something the display engine can fix. If we want
point at the window bottom in this case, Isearch should arrange for
that to happen. The display engine does not know anything about
Isearch and wrap-around, all it has is the previous window start point
and the new location of point in the buffer. E.g., try "M-x goto-char"
and you will see that point ends up at the top or bottom line
depending on the direction you move it.
So if you still want to have the behavior changed, please file a
separate bug against Isearch.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-28 13:08 ` Eli Zaretskii
@ 2011-11-28 17:37 ` Stefan Monnier
2011-11-28 18:11 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2011-11-28 17:37 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 10105
>> > Why did you expect it to be at the bottom?
>> Because, after the "failing" C-s, the Isearch begins again from the
>> top of the buffer, so that the search direction is always (at least
>> conceptually) from top to bottom, i.e. _fordward_.
> The _search_ direction is forward, that's true.
> But scroll-conservatively is not about the search direction, it is
> about the direction in which point moves in the buffer from its last
> displayed location. And that is _backward_, not forward.
Indeed: it would make sense to put point at the bottom, but that
requires information to which the redisplay does not have access.
If you really insist, you could make isearch force a redisplay with
point at (point-min) when doing the wrap around and before moving to the
actual destination, but I don't think we want to go that far.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-28 17:37 ` Stefan Monnier
@ 2011-11-28 18:11 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2011-11-28 18:11 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 10105
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Dani Moncayo <dmoncayo@gmail.com>, 10105@debbugs.gnu.org
> Date: Mon, 28 Nov 2011 12:37:47 -0500
>
> If you really insist, you could make isearch force a redisplay with
> point at (point-min) when doing the wrap around and before moving to the
> actual destination, but I don't think we want to go that far.
That would momentarily flash incorrect display, so I don't think it's
wise.
Isearch could notice the scroll-conservatively setting, and position
the hit accordingly in this case. Gross, I know, but...
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-28 10:38 ` Dani Moncayo
2011-11-28 12:01 ` Eli Zaretskii
@ 2011-11-29 7:05 ` Juri Linkov
2011-11-29 16:55 ` Eli Zaretskii
1 sibling, 1 reply; 12+ messages in thread
From: Juri Linkov @ 2011-11-29 7:05 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 10105
> 1. Eval: "(setq scroll-conservatively 101)".
> 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
> 3. Visit the attached file.
> 4. Type "C-s p C-s C-s C-s".
> --> At this point, the Isearch has moved point to line "p1", but it's
> positioned at the top of the window. It should be at the bottom.
I've just noticed that Firefox behaves exactly the same as Emacs.
When typing repeatedly `F3' and wrapping around to the beginning
of the Web page, the search string is highlighted and positioned
at the top of the Firefox window, not at the bottom. Firefox imitates
Emacs-like Isearch. So we should not disappoint users by changing
the traditional behavior in Emacs.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
2011-11-29 7:05 ` Juri Linkov
@ 2011-11-29 16:55 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2011-11-29 16:55 UTC (permalink / raw)
To: Juri Linkov; +Cc: 10105
> From: Juri Linkov <juri@jurta.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 10105@debbugs.gnu.org
> Date: Tue, 29 Nov 2011 09:05:04 +0200
>
> > 1. Eval: "(setq scroll-conservatively 101)".
> > 2. Eval: "(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))".
> > 3. Visit the attached file.
> > 4. Type "C-s p C-s C-s C-s".
> > --> At this point, the Isearch has moved point to line "p1", but it's
> > positioned at the top of the window. It should be at the bottom.
>
> I've just noticed that Firefox behaves exactly the same as Emacs.
> When typing repeatedly `F3' and wrapping around to the beginning
> of the Web page, the search string is highlighted and positioned
> at the top of the Firefox window, not at the bottom. Firefox imitates
> Emacs-like Isearch. So we should not disappoint users by changing
> the traditional behavior in Emacs.
I agree with your conclusion, but for the record I'd like to point out
that what you see in Emacs 24 is not the traditional behavior, not in
this case. All versions of Emacs before 24 would not keep point at
the first or last screen line, they would sooner or later center point
in the window. Emacs 23.3, in particular, centers point already after
the first "C-s p"; Emacs 22.3 centers it after the next C-s.
Only Emacs 24 behaves consistently when scroll-conservatively is set
to a large value. IOW, the default "recentering" is now completely
replaced with code that puts point on the first or last line in the
window (barring bugs, of course) when this variable is set.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-11-29 16:55 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 9:51 bug#10105: 24.0.91; Possible bug in `scroll-conservatively' Dani Moncayo
2011-11-25 11:33 ` Eli Zaretskii
2011-11-25 15:43 ` Eli Zaretskii
2011-11-25 16:38 ` Dani Moncayo
2011-11-28 10:38 ` Dani Moncayo
2011-11-28 12:01 ` Eli Zaretskii
2011-11-28 12:12 ` Dani Moncayo
2011-11-28 13:08 ` Eli Zaretskii
2011-11-28 17:37 ` Stefan Monnier
2011-11-28 18:11 ` Eli Zaretskii
2011-11-29 7:05 ` Juri Linkov
2011-11-29 16:55 ` 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).