Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 498696DE179D for ; Tue, 29 Dec 2015 13:56:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.532 X-Spam-Level: X-Spam-Status: No, score=-1.532 tagged_above=-999 required=5 tests=[AWL=1.318, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.55] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wLUx9rrWuFxX for ; Tue, 29 Dec 2015 13:56:09 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by arlo.cworth.org (Postfix) with ESMTP id 8798F6DE1767 for ; Tue, 29 Dec 2015 13:56:09 -0800 (PST) Received: from localhost (unknown [192.168.200.7]) by max.feld.cvut.cz (Postfix) with ESMTP id CE60819F47EB for ; Tue, 29 Dec 2015 22:56:08 +0100 (CET) X-Virus-Scanned: IMAP STYX AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) with ESMTP id ksJjpyAwNyd3 for ; Tue, 29 Dec 2015 22:56:07 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 4B37A19F463E for ; Tue, 29 Dec 2015 22:56:07 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.86) (envelope-from ) id 1aE2FS-0003zX-UJ; Tue, 29 Dec 2015 22:56:06 +0100 From: Michal Sojka To: notmuch@notmuchmail.org Subject: [PATCH] doc/reply: Clarify how reply-to header is handled Date: Tue, 29 Dec 2015 22:55:40 +0100 Message-Id: <1451426140-15303-1-git-send-email-sojkam1@fel.cvut.cz> X-Mailer: git-send-email 2.6.4 In-Reply-To: <8760zgdioq.fsf@steelpick.2x.cz> References: <8760zgdioq.fsf@steelpick.2x.cz> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2015 21:56:11 -0000 Current documentation and comments in the code do not correspond to the actual code and tests in the test suite ("Un-munging Reply-To" in T230-reply-to-sender.sh). Fix it. --- doc/man1/notmuch-reply.rst | 6 ++++-- notmuch-reply.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/man1/notmuch-reply.rst b/doc/man1/notmuch-reply.rst index cfbd4ea..d73f8f1 100644 --- a/doc/man1/notmuch-reply.rst +++ b/doc/man1/notmuch-reply.rst @@ -13,8 +13,10 @@ DESCRIPTION Constructs a reply template for a set of messages. To make replying to email easier, **notmuch reply** takes an existing -set of messages and constructs a suitable mail template. The Reply-to: -header (if any, otherwise From:) is used for the To: address. Unless +set of messages and constructs a suitable mail template. Its To: +address is set according to the original email in this way: if the +Reply-to: header is present and different from any To:/Cc: address it +is used, otherwise From: header is used. Unless ``--reply-to=sender`` is specified, values from the To: and Cc: headers are copied, but not including any of the current user's email addresses (as configured in primary\_mail or other\_email in the .notmuch-config diff --git a/notmuch-reply.c b/notmuch-reply.c index 6df54fc..3c6d685 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -332,7 +332,7 @@ add_recipients_from_message (GMimeMessage *reply, * field and use the From header. This ensures the original sender * will get the reply even if not subscribed to the list. Note * that the address in the Reply-To header will always appear in - * the reply. + * the reply if reply_all is true. */ if (reply_to_header_is_redundant (message)) { reply_to_map[0].header = "from"; -- 2.6.4