help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recenter-top-bottom problems


From: tyler
Subject: recenter-top-bottom problems
Date: Mon, 01 Jun 2009 16:45:48 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]