From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tyler Newsgroups: gmane.emacs.help Subject: recenter-top-bottom problems Date: Mon, 01 Jun 2009 16:45:48 -0300 Message-ID: <87my8rg2kz.fsf@blackbart.sedgenet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243885607 27204 80.91.229.12 (1 Jun 2009 19:46:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2009 19:46:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 01 21:46:44 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MBDSy-0007CB-PC for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Jun 2009 21:46:41 +0200 Original-Received: from localhost ([127.0.0.1]:37704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBDSy-0003sR-Am for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Jun 2009 15:46:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBDSe-0003sI-5d for help-gnu-emacs@gnu.org; Mon, 01 Jun 2009 15:46:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBDSZ-0003rd-Bg for help-gnu-emacs@gnu.org; Mon, 01 Jun 2009 15:46:19 -0400 Original-Received: from [199.232.76.173] (port=46189 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBDSY-0003rZ-Ux for help-gnu-emacs@gnu.org; Mon, 01 Jun 2009 15:46:14 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:47150 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MBDSY-0001sK-Hm for help-gnu-emacs@gnu.org; Mon, 01 Jun 2009 15:46:14 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MBDSU-00037l-Uj for help-gnu-emacs@gnu.org; Mon, 01 Jun 2009 19:46:10 +0000 Original-Received: from 140.184.131.32 ([140.184.131.32]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jun 2009 19:46:10 +0000 Original-Received: from tyler.smith by 140.184.131.32 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jun 2009 19:46:10 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 140.184.131.32 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:V6VcBa6thz/9CC1Zr1J/31ar0yE= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64868 Archived-At: 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