all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* scroll-preserve-screen-position not working
@ 2007-04-05  8:37 Angelo Borsotti
  2007-04-07 17:30 ` Richard Stallman
  0 siblings, 1 reply; 7+ messages in thread
From: Angelo Borsotti @ 2007-04-05  8:37 UTC (permalink / raw)
  To: bug-gnu-emacs

Hello,

the scroll-preserve-screen-position variable had been
introduced some time ago in emacs 20. It allows to
keep the cursor in its position in a buffer when scrolling.
When it is not set, the cursor position is moved when
scrolling so as to make it always visible.
In emacs 21 (and alas in 22) this variable has no effect,
at least when emacs in running in Windows XP and also in
Vista.

Thank you

Angelo Borsotti

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

* Re: scroll-preserve-screen-position not working
@ 2007-04-07 11:49 martin rudalics
  2007-04-08 22:04 ` Kim F. Storm
  2007-04-11 13:43 ` Angelo Borsotti
  0 siblings, 2 replies; 7+ messages in thread
From: martin rudalics @ 2007-04-07 11:49 UTC (permalink / raw)
  To: angelo.borsotti; +Cc: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

 > the scroll-preserve-screen-position variable had been
 > introduced some time ago in emacs 20. It allows to
 > keep the cursor in its position in a buffer when scrolling.
 > When it is not set, the cursor position is moved when
 > scrolling so as to make it always visible.
 > In emacs 21 (and alas in 22) this variable has no effect,
 > at least when emacs in running in Windows XP and also in
 > Vista.

Thank you for your report.

Customization for this variable was broken.  Could you please apply the
attached patch and tell me whether it gives good results.


[-- Attachment #2: cus-start0704.patch --]
[-- Type: text/plain, Size: 899 bytes --]

*** cus-start.el	Tue Jan 23 06:40:00 2007
--- cus-start.el	Sat Apr  7 13:41:38 2007
***************
*** 338,344 ****
  	     (split-height-threshold windows integer)
  	     (window-min-height windows integer)
  	     (window-min-width windows integer)
! 	     (scroll-preserve-screen-position windows boolean)
  	     (display-buffer-reuse-frames windows boolean "21.1")
  	     ;; xdisp.c
  	     (scroll-step windows integer)
--- 338,348 ----
  	     (split-height-threshold windows integer)
  	     (window-min-height windows integer)
  	     (window-min-width windows integer)
! 	     (scroll-preserve-screen-position
! 	      windows (choice
! 		       (const :tag "Off (nil)" :value nil)
! 		       (const :tag "Full screen (t)" :value t)
! 		       (other :tag "Always")))
  	     (display-buffer-reuse-frames windows boolean "21.1")
  	     ;; xdisp.c
  	     (scroll-step windows integer)

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

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

* Re: scroll-preserve-screen-position not working
  2007-04-05  8:37 Angelo Borsotti
@ 2007-04-07 17:30 ` Richard Stallman
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2007-04-07 17:30 UTC (permalink / raw)
  To: Angelo Borsotti; +Cc: bug-gnu-emacs

    the scroll-preserve-screen-position variable had been
    introduced some time ago in emacs 20. It allows to
    keep the cursor in its position in a buffer when scrolling.
    When it is not set, the cursor position is moved when
    scrolling so as to make it always visible.
    In emacs 21 (and alas in 22) this variable has no effect,
    at least when emacs in running in Windows XP and also in
    Vista.

I am very sad for you that you are running Windows Vista.
See badvista.org for why that is so bad.

At least the Emacs bug is fixed.  Thanks for reporting it.

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

* Re: scroll-preserve-screen-position not working
  2007-04-07 11:49 scroll-preserve-screen-position not working martin rudalics
@ 2007-04-08 22:04 ` Kim F. Storm
  2007-04-11 13:43 ` Angelo Borsotti
  1 sibling, 0 replies; 7+ messages in thread
From: Kim F. Storm @ 2007-04-08 22:04 UTC (permalink / raw)
  To: martin rudalics; +Cc: angelo.borsotti, bug-gnu-emacs

martin rudalics <rudalics@gmx.at> writes:

>> the scroll-preserve-screen-position variable had been
>> introduced some time ago in emacs 20. It allows to ...

> Customization for this variable was broken.  Could you please apply the
> attached patch and tell me whether it gives good results.

I don't know if your patch fixes the reported problem, but it is still
a good change, so I have installed your patch (with a small tweak).

Thanks.

-- 
Kim F. Storm  http://www.cua.dk

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

* Re: scroll-preserve-screen-position not working
  2007-04-07 11:49 scroll-preserve-screen-position not working martin rudalics
  2007-04-08 22:04 ` Kim F. Storm
@ 2007-04-11 13:43 ` Angelo Borsotti
  2007-04-11 21:24   ` martin rudalics
  2007-04-11 23:44   ` Johan Bockgård
  1 sibling, 2 replies; 7+ messages in thread
From: Angelo Borsotti @ 2007-04-11 13:43 UTC (permalink / raw)
  To: martin rudalics; +Cc: bug-gnu-emacs

Hi Martin,

I replaced in cus-start.el the line:

	    (scroll-preserve-screen-position windows boolean)

with:

            (scroll-preserve-screen-position
             windows (choice
                      (const :tag "Off (nil)" :value nil)
                      (const :tag "Full screen (t)" :value t)
                      (other :tag "Always")))

(As a matter of fact, I commented out the original line by
putting ;; in front of it).

However, this does not fix the problem. When I scroll, the
cursor changes position in the text.

-Angelo

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

* Re: scroll-preserve-screen-position not working
  2007-04-11 13:43 ` Angelo Borsotti
@ 2007-04-11 21:24   ` martin rudalics
  2007-04-11 23:44   ` Johan Bockgård
  1 sibling, 0 replies; 7+ messages in thread
From: martin rudalics @ 2007-04-11 21:24 UTC (permalink / raw)
  To: Angelo Borsotti; +Cc: bug-gnu-emacs

 > I replaced in cus-start.el the line:
 >
 > 	    (scroll-preserve-screen-position windows boolean)
 >
 > with:
 >
 >             (scroll-preserve-screen-position
 >              windows (choice
 >                       (const :tag "Off (nil)" :value nil)
 >                       (const :tag "Full screen (t)" :value t)
 >                       (other :tag "Always")))
 >
 > (As a matter of fact, I commented out the original line by
 > putting ;; in front of it).
 >
 > However, this does not fix the problem. When I scroll, the
 > cursor changes position in the text.

But did you customize `scroll-preserve-screen-position' to `Always'?

The choices now should be:

Off (nil) ......... don't preserve the screen position (default)
Full screen (t) ... preserve screen position for full screen scroll
                     commands only
Always (1) ........ preserve screen position for any scroll command
                     (that's what you want AFAICT).

In any case

(setq scroll-preserve-screen-position 'foo)

in your .emacs shoud get you the desired behavior even without this
change.  If it doesn't please tell me.  If customizing doesn't work tell
me as well.

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

* Re: scroll-preserve-screen-position not working
  2007-04-11 13:43 ` Angelo Borsotti
  2007-04-11 21:24   ` martin rudalics
@ 2007-04-11 23:44   ` Johan Bockgård
  1 sibling, 0 replies; 7+ messages in thread
From: Johan Bockgård @ 2007-04-11 23:44 UTC (permalink / raw)
  To: bug-gnu-emacs

Angelo Borsotti <angelo.borsotti@alcatel-lucent.it> writes:

> However, this does not fix the problem. When I scroll, the
> cursor changes position in the text.

The cursor is always inside the window, and it has always worked like
this.

-- 
Johan Bockgård

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

end of thread, other threads:[~2007-04-11 23:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-07 11:49 scroll-preserve-screen-position not working martin rudalics
2007-04-08 22:04 ` Kim F. Storm
2007-04-11 13:43 ` Angelo Borsotti
2007-04-11 21:24   ` martin rudalics
2007-04-11 23:44   ` Johan Bockgård
  -- strict thread matches above, loose matches on Subject: below --
2007-04-05  8:37 Angelo Borsotti
2007-04-07 17:30 ` Richard Stallman

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.