From: tyler <tyler.smith@mail.mcgill.ca>
To: help-gnu-emacs@gnu.org
Subject: recenter-top-bottom problems
Date: Mon, 01 Jun 2009 16:45:48 -0300 [thread overview]
Message-ID: <87my8rg2kz.fsf@blackbart.sedgenet> (raw)
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
next reply other threads:[~2009-06-01 19:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 19:45 tyler [this message]
2009-06-01 20:02 ` recenter-top-bottom problems tyler
2009-06-01 20:28 ` Lennart Borgman
2009-06-01 20:33 ` tyler
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87my8rg2kz.fsf@blackbart.sedgenet \
--to=tyler.smith@mail.mcgill.ca \
--cc=help-gnu-emacs@gnu.org \
/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.
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).