On Fri, Sep 04, 2009 at 12:08:45PM -0500, Kyle Wheeler wrote:
> On Friday, September  4 at 05:32 PM, quoth Chris G:
> >> The advantages are:
> >>
> >> - reading/writing/moving/deleting messages is faster than opening an 
> >>   mbox, looking for the right message, editing it, then 
> >>   rewriting the whole mbox.
> >>
> > Possibly faster for a *program* to do but not so easy for a 
> > person to do directly.
> 
> <sarcasm>
> This is exactly the same reason that we still use punchcards for data 
> storage. Sure these fancy magnetic storage media are faster for 
> *computers* to read and write, but they're a pain in the butt to edit 
> by hand. If I see an error in a punchcard, I can just use scotch tape 
> or a hole-puncher to fix it. But with magnetic storage? Forget it!
> </sarcasm>
> 
> What's your point?
> 
> Perhaps you edit mbox files without using these newfangled things 
> called "programs". You prefer to simply load kernel modules to edit 
> them? Or perhaps you break out the oscilloscope? Otherwise there's a 
> *program* involved. And if you're complaining that your program 
> doesn't make it easy to find/edit/save email messages stored in a 
> Maildir, perhaps the real truth is that you're using the wrong KIND of 
> program. For example, we abandoned the idea of using text editors to 
> edit the content of SQL databases; that doesn't mean SQL databases are 
> a bad idea.
> 
I was referring to re-arrangement of mailboxes in particular, not
editing of message, anyway when does one want to edit messages, it's
not something I've ever wanted to do.  So see below, one *does* (well
I do) sometimes want to re-arrange mailboxes and hierarchies thereof. 
It's easier to do this with mbox if doing it from the command line. 
Mutt for example isn't terribly clever at *moving* mailboxes around,
nor can it create new directories to put mailboxes into so you do
sometimes have to do things 'by hand'.

> >> - grep returns individual messages, not an mbox to search through
> >
> > But on the other hand you have to do a recursive grep through a 
> > hierarchy of directories.  With mbox there is a simple text file whose 
> > name is the name of the mailbox so you can easily 'grep <name of 
> > mailbox>' to search for something.
> 
> I don't understand your complaint. Is 'grep -r nameofmailbox' 
> difficult to type? Is this an argument about the number of keystrokes?
> 
I guess it doesn't make *much* difference, I'm probably harking back
to my long use of older Solaris systems where there isn't a recursive
grep available.  :-)


> Plus, your "simple" alternative doesn't provide the same features. Yes 
> you can 'grep nameofmailbox' with mbox, but that only tells you 
> whether the text you want is in that mbox, not which message within 
> the mbox it's in. It doesn't even tell you which LINE it's on. Sure, 
> you could use the -n flag to print the line number, but that's just as 
> difficult as using the -r flag, right?
> 
> >    Depending on what/who created the maildir hierarchy you may find 
> >    it virtually impossible to move directories (which aren't real 
> >    directories) and mailboxes around.
> 
> Why not?
> 
Because *lots* of them create maildirs which aren't real directories
but use '.' as a delimiter.  For example I have:-

    Mail
    Mail/holidays
    Mail/holidays/2004
    Mail/holidays/2005
    Mail/holidays/2006
    Mail/holidays/2007
    Mail/holidays/2008
    Mail/holidays/2009
    Mail/holidays/2009/bikeRide
    Mail/holidays/2009/sarthe

Where bikeRide and sarthe are the actual mailboxes (with others on the
other branches of course).

Many maildir creators (most of the maildir+ ones I believe) in reality
create the above as:-

    Mail
    Mail.holidays
    Mail.holidays.2004
    Mail.holidays.2005
    Mail.holidays.2006
    Mail.holidays.2007
    Mail.holidays.2008
    Mail.holidays.2009
    Mail.holidays.2009.bikeRide
    Mail.holidays.2009.sarthe

So all the mailboxes are at the same level with names with embedded
dots, if you want to move mailboxes up and down the hierachy it is
rather difficult.

I note you haven't questioned my comment that maildirs are difficult
to delete safely! :-)

.... and I use maildir.

-- 
Chris Green

Reply via email to