meaning of number of lines in the message (%l in index_format)

Vincent Lefevre vincent at vinc17.org
Sun Jun 23 10:31:02 UTC 2019


On 2019-06-22 21:53:11 -0400, Kurt Hackenberg wrote:
> On 2019-06-22 16:47, Vincent Lefevre wrote:
> 
> > The manual says:
> > 
> > %l                                   number of lines in the message
> >                                       (does not work with maildir, mh,
> >                                       and possibly IMAP folders)
> 
> Seems not very useful if it mostly doesn't work. Maybe mbox read counts
> lines anyway, so this was easy? And originally there was nothing but mbox?

Note that I replaced "does not work" by "may not work", because
for maildir, mh (and IMAP), if there is a "Lines:" header, it will
be used. The "Lines:" header can be generated with a procmail rule
for instance, such as

:0 Bfh
* H ?? !^Lines:
* -1^0
* 1^1 ^.*$
| formail -A "Lines: $="

But perhaps it should be

:0 Bfh
* -1^0
* 1^1 ^.*$
| formail -I "Lines: $="

(forcing a regeneration), because the provided "Lines:" header is not
necessarily reliable.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the Mutt-dev mailing list