Re: maildirs and Lines:

2000-07-01 Thread Mikko Hänninen

Brian D. Winters <[EMAIL PROTECTED]> wrote on Fri, 30 Jun 2000:
> 1) Extend fcc-hooks to allow piping to a filter program.

I think that would be a good feature.  Not just because of this, but for
other uses too.

> 2) Add an "auto_add_maildir_lines" option.

I would have expected that by default, Mutt always adds a Lines header
when saving a message.  Obviously if you're not getting that with Fcc's,
then it doesn't work that way. :-)  But at least if take a message
without a Lines header and save it to a Maildir, I think the header does
get added, doesn't it?

*tests*

No it doesn't. :-(

I don't think this even needs to be an option, or is there some bad
performance hit or something why the user might not want Mutt always to
add a Lines header when writing a message to a Maildir?

> Does anyone know of a reason other than, "No one has submitted a patch
> yet," why one of these hasn't been added, or is there a better
> solution which I'm missing?

I would guess it's the former...


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
The 5 year plan: In 5 years we'll make up a new plan. Or just re-use this one.



Re: maildirs and Lines:

2000-07-01 Thread Brian D. Winters

On Sat, Jul 01, 2000 at 01:48:26PM +0300, Mikko Hänninen wrote:
> Brian D. Winters <[EMAIL PROTECTED]> wrote on Fri, 30 Jun 2000:
> > 2) Add an "auto_add_maildir_lines" option.
> 
...
> I don't think this even needs to be an option, or is there some bad
> performance hit or something why the user might not want Mutt always to
> add a Lines header when writing a message to a Maildir?

There is a performance hit.  (I don't believe it is bad; see next
paragraph.)  You need to scan the whole message once in order to know
how many lines it has, so you can write Lines:.  In order to insert
the header, you need to make a copy of the message, which means making
two passes over the message or reading the entire message into memory
while you count lines.  (I believe the FAQ's procmail recipe reads the
entire message into memory, but who can tell for sure exactly what it
does. :)  The python script I wrote yesterday to put in list-specific
.qmail-... files also reads the entire message into memory and then
outputs it after counting the lines.)

Now, how do mboxes work again? :)  The cost of rewriting an individual
maildir message is nothing compared to the cost of adding a Status:
header in a big mbox.  I'd be happy to take the hit once per message
in my maildir.  In fact I already do, as it passes through the filter
on delivery.  I think that adding Lines: should be an option (I'm sure
someone won't want it), but the default should be "yes".

Brian