unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* scroll-(down|up) but stay on the same column
@ 2009-11-11  9:11 Deniz Dogan
  2009-11-11 14:18 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Deniz Dogan @ 2009-11-11  9:11 UTC (permalink / raw)
  To: Emacs-Devel devel

Lately, it has been bothering me that when I hit C-v or M-v point is
moved to the first column of the target line. I don't have the C
source code at hand and my C-fu is probably too weak anyways, so is
there any built-in command which does the equivalent of
scroll-(down|up) but tries to keep point at the same column or should
I craft one myself?

And what is the rationale behind having point move to the first column
when scrolling?

Thanks,
Deniz Dogan




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

* Re: scroll-(down|up) but stay on the same column
  2009-11-11  9:11 scroll-(down|up) but stay on the same column Deniz Dogan
@ 2009-11-11 14:18 ` Stefan Monnier
  2009-11-11 15:52   ` Deniz Dogan
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2009-11-11 14:18 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: Emacs-Devel devel

> Lately, it has been bothering me that when I hit C-v or M-v point is
> moved to the first column of the target line. I don't have the C
> source code at hand and my C-fu is probably too weak anyways, so is
> there any built-in command which does the equivalent of
> scroll-(down|up) but tries to keep point at the same column or should
> I craft one myself?

C-h v scroll-preserve-screen-position


        Stefan




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

* Re: scroll-(down|up) but stay on the same column
  2009-11-11 14:18 ` Stefan Monnier
@ 2009-11-11 15:52   ` Deniz Dogan
  2009-11-11 16:37     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Deniz Dogan @ 2009-11-11 15:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs-Devel devel

2009/11/11 Stefan Monnier <monnier@iro.umontreal.ca>:
>> Lately, it has been bothering me that when I hit C-v or M-v point is
>> moved to the first column of the target line. I don't have the C
>> source code at hand and my C-fu is probably too weak anyways, so is
>> there any built-in command which does the equivalent of
>> scroll-(down|up) but tries to keep point at the same column or should
>> I craft one myself?
>
> C-h v scroll-preserve-screen-position
>
>
>        Stefan
>

Thanks!

This leads me to the question: what is the idea behind putting point
at BOL when scrolling?

-- 
Deniz Dogan




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

* Re: scroll-(down|up) but stay on the same column
  2009-11-11 15:52   ` Deniz Dogan
@ 2009-11-11 16:37     ` Stefan Monnier
  2009-11-12 10:05       ` Deniz Dogan
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2009-11-11 16:37 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: Emacs-Devel devel

> This leads me to the question: what is the idea behind putting point
> at BOL when scrolling?

I don't know.  It's probably done this way because it's easier.


        Stefan




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

* Re: scroll-(down|up) but stay on the same column
  2009-11-11 16:37     ` Stefan Monnier
@ 2009-11-12 10:05       ` Deniz Dogan
  2009-11-13  4:56         ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Deniz Dogan @ 2009-11-12 10:05 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs-Devel devel

2009/11/11 Stefan Monnier <monnier@iro.umontreal.ca>:
>> This leads me to the question: what is the idea behind putting point
>> at BOL when scrolling?
>
> I don't know.  It's probably done this way because it's easier.
>
>
>        Stefan
>

Would anyone mind if the default value of
scroll-preserve-screen-position is non-nil?

-- 
Deniz Dogan




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

* Re: scroll-(down|up) but stay on the same column
  2009-11-12 10:05       ` Deniz Dogan
@ 2009-11-13  4:56         ` Richard Stallman
  2009-11-13 12:26           ` Juanma Barranquero
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2009-11-13  4:56 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: monnier, emacs-devel

    Would anyone mind if the default value of
    scroll-preserve-screen-position is non-nil?

Please let's invite people to try it for a few days and report if they
don't like it.  I will start trying it now and report whether I can
get used to it.




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

* Re: scroll-(down|up) but stay on the same column
  2009-11-13  4:56         ` Richard Stallman
@ 2009-11-13 12:26           ` Juanma Barranquero
  2009-11-15 15:01             ` Juri Linkov
  0 siblings, 1 reply; 8+ messages in thread
From: Juanma Barranquero @ 2009-11-13 12:26 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel, monnier, Deniz Dogan

On Fri, Nov 13, 2009 at 05:56, Richard Stallman <rms@gnu.org> wrote:

> Please let's invite people to try it for a few days and report if they
> don't like it.

Count me as +1. Setting s-p-s-p to 'always is the only thing that
makes scroll-(up|down) behavior acceptable to me (before, I used an
external package to get the same effect).

    Juanma




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

* Re: scroll-(down|up) but stay on the same column
  2009-11-13 12:26           ` Juanma Barranquero
@ 2009-11-15 15:01             ` Juri Linkov
  0 siblings, 0 replies; 8+ messages in thread
From: Juri Linkov @ 2009-11-15 15:01 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Deniz Dogan, rms, monnier, emacs-devel

>> Please let's invite people to try it for a few days and report if they
>> don't like it.
>
> Count me as +1. Setting s-p-s-p to 'always

According to cus-start.el, "Always" has the value "1".
However, I think "Always" is too drastic change.
`scroll-preserve-screen-position' = t would be better as
the default since it does what most other programs do.

> is the only thing that makes scroll-(up|down) behavior acceptable to
> me (before, I used an external package to get the same effect).

Please consider also another change that makes default scroll-(up|down)
behavior more acceptable especially for users coming to Emacs from
other editors is such behavior that on reaching the top of the buffer
with the key <prior>, point moves to the first line, and only the
subsequent <prior> signals the error "Beginning of buffer", and
on reaching the bottom of the buffer with <next>, point moves to the
last line before signaling "End of buffer".

-- 
Juri Linkov
http://www.jurta.org/emacs/




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

end of thread, other threads:[~2009-11-15 15:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11  9:11 scroll-(down|up) but stay on the same column Deniz Dogan
2009-11-11 14:18 ` Stefan Monnier
2009-11-11 15:52   ` Deniz Dogan
2009-11-11 16:37     ` Stefan Monnier
2009-11-12 10:05       ` Deniz Dogan
2009-11-13  4:56         ` Richard Stallman
2009-11-13 12:26           ` Juanma Barranquero
2009-11-15 15:01             ` Juri Linkov

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