unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 10105@debbugs.gnu.org
Subject: bug#10105: 24.0.91; Possible bug in `scroll-conservatively'
Date: Mon, 28 Nov 2011 08:08:14 -0500	[thread overview]
Message-ID: <E1RV0wQ-00060G-Qx@fencepost.gnu.org> (raw)
In-Reply-To: <CAH8Pv0ggFESUAGJitCJGUC905tY1dXKyhhXrpQ6seouq3vBaEQ@mail.gmail.com> (message from Dani Moncayo on Mon, 28 Nov 2011 13:12:48 +0100)

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





  reply	other threads:[~2011-11-28 13:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1RV0wQ-00060G-Qx@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=10105@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    /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 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).