nmh-workers
[Top] [All Lists]

Re: [nmh-workers] Stupid 'pick' question...

2019-06-09 04:07:13
Hi Valdis,

In a world of Microsoft Office attachments, is having -search go
through the body by default as well still a good idea? Maybe having a
separate -searchbody would be better?

I think -search should be left alone, but there's previous discussion on
this list about a -header and -body that do -search's work but just on
the appropriate `half'.

If you're doing it a lot and many of the emails have large bodies then a
copy of the folder with all bodies deleted would let you search just the
headers and come up with the same message numbers for the original
folder.

Alternatively, use egrep(1) to do the initial filtering on just the
headers, avoiding paging in all those bodies.

    shopt -s extglob
    cd `mhpath`
    egrep -im1 '^$|from.*ralph' [1-9]*([0-9]) |
    sed -n 's/:..*//p' |
    awk 'END {if (!NR) print 0}' |
    xargs -r pick -list -from ralph

-- 
Cheers, Ralph.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>