From: Miles Bader <miles@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: 23.0.60; Constant recentering with scroll-margin set
Date: Wed, 13 Aug 2008 11:33:24 +0900 [thread overview]
Message-ID: <87wsilr6dn.fsf@catnip.gol.com> (raw)
In-Reply-To: <jwvtzdq9hh8.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 12 Aug 2008 15:15:03 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> What do people think? When there is a scroll-margin, should
>> move-to-window-line automagically move to the scroll-margin instead of
>> recentering?
>
> I never used it, neither interactively nor programmatically, so I don't
> have a strong opinion on that. Reading the docstring I get the
> impression that the intention is to place the cursor at a particular
> location within the window, rather than to place point at a particular
> location within the buffer. So that leads me to think that it should
> never cause recentering. Maybe if the operation cannot be performed,
> the function should return the number of lines "left".
I use this function constantly -- I have simple wrappers bound to M-,
M-/ and M-. to move to the top, middle, and bottom of the window.
I almost never use a non-zero scroll-margin, so I don't have that much
experience with this problem, but I agree that it feels kind of weird if
move-to-window-line causes scrolling.
I kinda wish it would simply "disobey" the scroll-margin and locate the
cursor there without scrolling, but that probably isn't easy to
implement.
The suggested behavior of "stopping short", by having it move to line
(min (max N scroll-margin) (- window-height scroll-margin)) seems
reasonable interactively.
It might surprise some programmatic users, but on the other hand,
scrolling will probably surprise them too, so I guess there's really not
much you can do in that case; such code probably simply isn't prepared
to deal with a non-zero scroll-margin...
-Miles
--
`To alcohol! The cause of, and solution to,
all of life's problems' --Homer J. Simpson
next prev parent reply other threads:[~2008-08-13 2:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 1:54 bug#662: 23.0.60; Constant recentering with scroll-margin set Chong Yidong
2008-08-07 18:21 ` Ralf Angeli
2008-08-07 18:41 ` Ralf Angeli
2008-08-08 18:32 ` Ralf Angeli
2008-08-08 20:56 ` Stefan Monnier
2008-08-12 18:51 ` Ralf Angeli
2008-08-09 1:00 ` OFFICE ZERO
2008-08-09 1:07 ` OFFICE ZERO
2008-08-09 1:30 ` Chong Yidong
2008-08-09 1:40 ` Lennart Borgman (gmail)
2008-08-12 19:15 ` Stefan Monnier
2008-08-13 2:33 ` Miles Bader [this message]
2008-08-09 14:13 ` bug#662: " OFFICE ZERO
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wsilr6dn.fsf@catnip.gol.com \
--to=miles@gnu.org \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.