nmh-workers
[Top] [All Lists]

[Nmh-workers] Request for new command: addresses

2014-05-24 09:39:14
The forwarded message, below, from Ralph Corderoy shows that there is already
code in the source to repl that does all that I'm asking for. So perhaps,
maybe, perchance, it might, I hope, not be very much trouble to write a
command: addresses.

The command would operate on one or more messages. Its arguments would be like
the arguments of almost all the nmh commands that operate on one more more
messages, with the default being cur. It would output, to its stdout, all the
addressees, including comments, of all the messages. There need be no
guaranteed order. Nor need there be any culling of duplicates. I don't require
but would not object to support of -cc all/to/cc/me -nocc all/to/cc/me.


------- Forwarded Message

Replied: Thu, 22 May 2014 11:46:44 -0700
Replied: Ralph Corderoy <ralph(_at_)inputplus(_dot_)co(_dot_)uk>
Replied: nmh-workers(_at_)nongnu(_dot_)org
Replied: norm(_at_)dad(_dot_)org
Return-Path: <nmh-workers-bounces+norm=dad(_dot_)org(_at_)nongnu(_dot_)org>
X-Original-To: norm@localhost
Delivered-To: norm(_at_)localhost(_dot_)dad(_dot_)org
Received: from lad.dad.org (localhost [IPv6:::1])
        by lad.dad.org (Postfix) with ESMTP id DF71F60CA3
        for <norm@localhost>; Wed, 21 May 2014 17:12:16 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail1.rawbw.com
X-Spam-Level:
X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_HELO_PASS,SPF_SOFTFAIL
        autolearn=disabled version=3.3.1
Received: from imap.rawbw.com [198.144.192.43]
        by lad.dad.org with IMAP (fetchmail-6.3.17)
        for <norm@localhost> (single-drop); Wed, 21 May 2014 17:12:16 -0700 
(PDT)
Received: from ns2.adzone.com (ns2.adzone.com [96.247.50.174])
        by mail1.rawbw.com (8.14.2/8.14.2) with ESMTP id s4M09RLr084341
        for <soft(_at_)rawbw(_dot_)com>; Wed, 21 May 2014 17:09:32 -0700 (PDT)
        (envelope-from 
nmh-workers-bounces+norm=dad(_dot_)org(_at_)nongnu(_dot_)org)
Received: from lists.gnu.org (lists.gnu.org [208.118.235.17])
        by ns2.adzone.com (8.14.4/8.14.5) with ESMTP id s4M08Wkb059594
        for <norm(_at_)dad(_dot_)org>; Wed, 21 May 2014 17:08:33 -0700
Received: from localhost ([::1]:34102 helo=lists.gnu.org)
        by lists.gnu.org with esmtp (Exim 4.71)
        (envelope-from 
<nmh-workers-bounces+norm=dad(_dot_)org(_at_)nongnu(_dot_)org>)
        id 1WnGZW-00046F-19
        for norm(_at_)dad(_dot_)org; Wed, 21 May 2014 20:09:22 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51160)
        by lists.gnu.org with esmtp (Exim 4.71)
        (envelope-from <ralph(_at_)inputplus(_dot_)co(_dot_)uk>) id 
1WnGZG-0003rO-Ac
        for nmh-workers(_at_)nongnu(_dot_)org; Wed, 21 May 2014 20:09:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
        (envelope-from <ralph(_at_)inputplus(_dot_)co(_dot_)uk>) id 
1WnGZ8-0006Qb-R6
        for nmh-workers(_at_)nongnu(_dot_)org; Wed, 21 May 2014 20:09:06 -0400
Received: from relay01.pair.com ([209.68.5.15]:2711)
        by eggs.gnu.org with smtp (Exim 4.71)
        (envelope-from <ralph(_at_)inputplus(_dot_)co(_dot_)uk>) id 
1WnGZ8-0006QQ-Hk
        for nmh-workers(_at_)nongnu(_dot_)org; Wed, 21 May 2014 20:08:58 -0400
Received: (qmail 58043 invoked from network); 22 May 2014 00:08:55 -0000
Received: from 46.208.104.93 (HELO orac.inputplus.co.uk) (46.208.104.93)
        by relay01.pair.com with SMTP; 22 May 2014 00:08:55 -0000
X-pair-Authenticated: 46.208.104.93
Received: by orac.inputplus.co.uk (Postfix, from userid 1000)
        id 137F81FA50; Thu, 22 May 2014 00:31:59 +0100 (BST)
Received: from orac.inputplus.co.uk (localhost [127.0.0.1])
        by orac.inputplus.co.uk (Postfix) with ESMTP id E56241F958
        for <nmh-workers(_at_)nongnu(_dot_)org>; Thu, 22 May 2014 00:31:59 
+0100 (BST)
To: nmh-workers(_at_)nongnu(_dot_)org
MIME-Version: 1.0
In-reply-to: 
<201405141417(_dot_)s4EEHWUx022637(_at_)hedwig(_dot_)cmf(_dot_)nrl(_dot_)navy(_dot_)mil>
References: 
<201405141417(_dot_)s4EEHWUx022637(_at_)hedwig(_dot_)cmf(_dot_)nrl(_dot_)navy(_dot_)mil>
Comments: In-reply-to Ken Hornstein <kenh(_at_)pobox(_dot_)com> message dated 
"Wed,
        14 May 2014 10:18:29 -0400."
Date: Thu, 22 May 2014 00:31:59 +0100
From: Ralph Corderoy <ralph(_at_)inputplus(_dot_)co(_dot_)uk>
Message-Id: 
<20140521233200(_dot_)137F81FA50(_at_)orac(_dot_)inputplus(_dot_)co(_dot_)uk>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
        recognized.
X-Received-From: 209.68.5.15
Subject: Re: [Nmh-workers] Getting the addresses with comments of sent
        messages
X-BeenThere: nmh-workers(_at_)nongnu(_dot_)org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <nmh-workers.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/nmh-workers>,
        <mailto:nmh-workers-request(_at_)nongnu(_dot_)org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/nmh-workers>
List-Post: <mailto:nmh-workers(_at_)nongnu(_dot_)org>
List-Help: <mailto:nmh-workers-request(_at_)nongnu(_dot_)org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/nmh-workers>,
        <mailto:nmh-workers-request(_at_)nongnu(_dot_)org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: nmh-workers-bounces+norm=dad(_dot_)org(_at_)nongnu(_dot_)org
Sender: nmh-workers-bounces+norm=dad(_dot_)org(_at_)nongnu(_dot_)org

Hi Norm,

That puts multiple addresses on the same line, delimited by commas.
But commas can also occur in comments, so I would have to go to some
trouble to parse the output. Is there a variant that would put each
address on on a separate line?  I tried sprinkling '\n's in your
format string, to no avail.

Unfortunately ... mh-format(5) doesn't really have the ability to
parse multiple addresses.

repl(1) does.  Does

    yes n |
    repl -cc all -query -editor false 2>/dev/null |
    sed -r 's/\<Reply to ([^?]+)\? /\1\n/g'

help?  It leaves an abandoned draft behind for later clear-up.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

------- End of Forwarded Message

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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