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

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

bug#45652: so-long mode not triggered despite big file with very long li


From: Lars Ingebrigtsen
Subject: bug#45652: so-long mode not triggered despite big file with very long lines
Date: Mon, 11 Jan 2021 20:30:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Phil Sainty <psainty@orcon.net.nz> writes:

> I don't know what the correct approach to this would be, but there's
> definitely scope for some kind of improvement along these lines (pun
> not intended :)

I can give writing something like that a shot...  It could return, say,
the length of the longest line, and the number of lines?  The median
line length would be nice, but would be slower.

The length of the lines would be in bytes, not characters, for
efficiency.  I guess we could do characters with minuscule penalty
(looking for \n while counting utf-8 characters can be really fast, but
we'd need to special-case for unibyte/multibyte).  I don't know whether
it'd make much difference for so-long.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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