nmh-workers
[Top] [All Lists]

Re: [nmh-workers] how might I make sequence 'bar' where 'bar' is all but msgs in seq 'foo'?

2019-03-13 20:17:47
Thanking all of you for the help!

On Wed 3/13/19 11:54 +0700 Robert Elz wrote:
 | Given a sequence 'foo', how can I get the complement,
 | i.e. all messages in the folder, not in sequence 'foo'?

in your MH profile set something like

      sequence-negation: ^

(some people use "not" I believe).

Then just use ^foo where you would otherwise use foo.

 | I want to save the results to sequence 'bar'.

mark +folder -seq bar -zero ^foo

Thanks Robert, that worked!

--
Hi Ralph:

On Wed 3/13/19 11:37 -0000 Ralph Corderoy wrote:
kre's correct.  Another way is

   pick -seq bar all
   mark -s bar -d foo

That's an approach that extends to more complex set operations.

Nice! Also easy to understand. Thanks Ralph.

On Wed 3/13/19 13:55 -0000 lambda@dr.com wrote:
Given a sequence 'foo', how can I get the complement, i.e. all messages in 
the
folder, not in sequence 'foo'?  I want to save the results to sequence 'bar'.

I could write a shell script, but can this be done more directly?

You could use "mark -seq bar -zero -delete foo". When used with -delete 
the -zero switch first adds all messages from the selected folder to the 
sequence that is specified with -seq instead of first emptying that sequence.

OK, all in one command, thanks! 

--
Tom

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

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