all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* recenter-top-bottom problems
@ 2009-06-01 19:45 tyler
  2009-06-01 20:02 ` tyler
  0 siblings, 1 reply; 4+ messages in thread
From: tyler @ 2009-06-01 19:45 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm trying to figure out why recenter-top-bottom (C-l) isn't working for
me. I find that sometimes it only centers, sometimes it only centers and
'bottoms', and sometimes it behaves as expected. I've done the following
experiment to try and sort this out:

emacs -Q

;; open up a large text file and C-v into the middle

C-l ; works as expected

(setq scroll-conservatively 100) ;; This is part of my .emacs, for
                                 ;; smooth scrolling

C-l ;; the 'top' part doesn't work anymore, only 'center' and 'bottom'!

;; Modify the code from recenter-top-bottom (from window.el) as follows:

;; ... begining of function here

    (let ((this-scroll-margin
	   (min (max 0 scroll-margin)
		(truncate (/ (window-body-height) 4.0)))))

      (message "%d" this-scroll-margin) ;; inserted new code

      (cond ((eq recenter-last-op 'middle)

;; end of function here

;; I evaluate my modified function

C-l ;; works again!


This is quite a puzzle to me. Can anyone confirm that C-l behaves the
same on their system? Any explanation for this behaviour?

Thanks,

Tyler

GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.10) of
2008-07-11

-- 
What is wanted is not the will to believe, but the will to find out,
which is the exact opposite.           --Bertrand Russell





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

end of thread, other threads:[~2009-06-01 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01 19:45 recenter-top-bottom problems tyler
2009-06-01 20:02 ` tyler
2009-06-01 20:28   ` Lennart Borgman
2009-06-01 20:33     ` tyler

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.