Subject: bug#1355: suggestion on the modeline

From: Alan Mackenzie <[email-masked]>
Date: Tue, 18 Nov 2008 10:37:31 +0000

Hi, Juanma!

On Tue, Nov 18, 2008 at 10:42:09AM +0100, Juanma Barranquero wrote:
> On Tue, Nov 18, 2008 at 04:47, Stefan Monnier <[email-masked]> wrote:

> >> A better calculation would be a / (a + b), the degree of "travel" of the
> >> windown through the buffer.  This approaches 100% as the window reaches
> >> the bottom of the buffer.

> > I'd tend to agree, tho I don't have any strong feeling about it.

> I like the effect much more than the original, but it contradicts the
> "above" bit of the documentation:

>   %p -- print percent of buffer above top of window, or Top, Bot or All.

How about:

    %p -- print Top, Bot, All, or how far through the buffer the window
    is (in percent).  This is 100 * A / (A + B), where A is the number
    bytes above the window, B the number below it.

> Also, the same change should be done to %P, shouldn't it?
 
Hmmm.  :-)  If so, than %p + %P = 100% (modulo rounding errors), and %P
is kind of redundant.  So, for backwards compatibility, %p and %P should
remain unchanged, and 100 * A / (A + B) should be attached to a new
%-construct, say %v.  (Why %v?  Why not?  It's reminiscent of C-v, and
%M-v.)

>   Juanma

-- 
Alan Mackenzie (Nuremberg, Germany).