[Top][All Lists]

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

Re: [Nmh-workers] Slowdown with a Populated Folder.

From: Ralph Corderoy
Subject: Re: [Nmh-workers] Slowdown with a Populated Folder.
Date: Wed, 01 Jan 2014 15:33:57 +0000

Hi Ken,

> > `mark -s foo -d all' gives an error if sequence foo doesn't exist,
> > at least with this old version.  Consequently, another mark is
> > needed first, the one above, to detect if the sequence exists.  A
> > more useful interface would cut the number of userspace commands
> > that need to run, and thus the number of getdents.
> It looks like "mark -s foo -zero -d all" does what you want?

Yes, that's handy, thanks.  ~/bin/mhseqrm altered to use it.
http://git.savannah.gnu.org/cgit/nmh.git/tree/man/mark.man#n95 covers
the case where a sequence exists;  perhaps this could be added there.

Looking at some of the others uses of ~/bin/mhseqexists, I find

    mhseqexists lp && mark -seq lpsave -zero -add lp
    # ...
    if mhseqexists lpsave; then
        mark -seq lp -zero -add lpsave
        mhseqrm lpsave

It would be nice if that could be

    mark -newswitch -seq lpsave -zero -add lp
    # ...
    mark -newswitch -seq lp -zero -add lpsave

where an unknown sequence being added is treated as empty.  We already
have, as you've shown, the ability to "create" an empty sequence that
doesn't get saved.

        for seq in foo bar xyzzy; do
            mhseqexists $seq && echo $seq
    test "$todelete" && mark -seq i -delete $todelete

Again, unknown sequences being empty would give

    mark -newswitch -seq i -delete foo bar xyzzy

Cheers, Ralph.

reply via email to

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