GNU bug report logs - #27847
26.0.50; mode-line-percent-position: line-based instead of char-based (optionally)

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Thu, 27 Jul 2017 13:09:01 UTC

Severity: wishlist

Found in version 26.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alexis <flexibeast <at> gmail.com>
Cc: 27847 <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: bug#27847: 26.0.50; mode-line-percent-position: line-based instead of char-based (optionally)
Date: Fri, 28 Jul 2017 09:46:51 +0300
> From: Alexis <flexibeast <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 27847 <at> debbugs.gnu.org
> Date: Fri, 28 Jul 2017 12:44:12 +1000
> 
> As a data point, i have this as part of my `mode-line-format` 
> setup:
> 
>     '(:eval
>       (let ((buffer-line-count (count-lines (point-min) 
>       (point-max))))
>         (number-to-string
>          (round
>           (* 100 (/
>                   (float (count-lines 1 (point)))
>                   (if (equal 0 buffer-line-count)
>                       1
>                     buffer-line-count)))))))
>     "%%"
> 
> which gives me at least a rough percentage (i.e. 'good enough' for 
> my needs), and i've not noticed any slowdown as a result.

How large are the files you usually edit?




This bug report was last modified 7 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.