bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27847: 26.0.50; mode-line-percent-position: line-based instead of ch


From: Eli Zaretskii
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 <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, address@hidden
> 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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]