From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: recenter-ratio (was: Re: Toolbars on MacOSX) Date: 13 May 2004 10:46:25 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040512.171251.91443934.mituharu@math.s.chiba-u.ac.jp> <87wu3h0wv6.fsf_-_@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084439695 27312 80.91.224.253 (13 May 2004 09:14:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 May 2004 09:14:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 13 11:14:48 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOCIh-0005IE-00 for ; Thu, 13 May 2004 11:14:47 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOCIh-0007mF-00 for ; Thu, 13 May 2004 11:14:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOCEP-0000X5-6N for emacs-devel@quimby.gnus.org; Thu, 13 May 2004 05:10:21 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BOCEJ-0000Vu-KF for emacs-devel@gnu.org; Thu, 13 May 2004 05:10:15 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BOCDh-0000LJ-IT for emacs-devel@gnu.org; Thu, 13 May 2004 05:10:08 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1BOBrJ-0004Qi-6W for emacs-devel@gnu.org; Thu, 13 May 2004 04:46:30 -0400 Original-Received: (qmail 71439 invoked from network); 13 May 2004 08:46:27 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 13 May 2004 08:46:27 -0000 Original-To: Juri Linkov In-Reply-To: <87wu3h0wv6.fsf_-_@mail.jurta.org> Original-Lines: 20 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23309 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23309 Juri Linkov writes: > > The following patch introduces a new variable with the default value 2. > Its value defines a ratio at which the cursor is placed by default > from the top of the window relative to the window height. It even > can be set to the Golden Ratio if one wishes so: > > (setq recenter-ratio (expt (/ (1+ (sqrt 5)) 2) 2)) Very nice idea! But I would rather call it recenter-position and make it a float between 0.0 and 1.0 indicating the relative distance from the top of the window, i.e. the defaul being 0.5. (value <= 0 means top line, value >= 1 means bottom line) -- Kim F. Storm http://www.cua.dk