From: Jani Nikula Date: Mon, 26 Aug 2013 17:58:43 +0000 (+0300) Subject: Re: [PATCH] emacs: bugfix notmuch-mua-reply when signature is present X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=79be60eb52467ea4c75de3bb0af10a1f944b491d;p=notmuch-archives.git Re: [PATCH] emacs: bugfix notmuch-mua-reply when signature is present --- diff --git a/03/278b826fd2ae58e4b0b2bf8d7c32295b94922f b/03/278b826fd2ae58e4b0b2bf8d7c32295b94922f new file mode 100644 index 000000000..30f6da53d --- /dev/null +++ b/03/278b826fd2ae58e4b0b2bf8d7c32295b94922f @@ -0,0 +1,155 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 16487431FD7 + for ; Mon, 26 Aug 2013 10:58:51 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 22RC9-WSL7UC for ; + Mon, 26 Aug 2013 10:58:42 -0700 (PDT) +Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com + [74.125.83.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 8225F431FAF for ; Mon, 26 Aug 2013 10:58:42 -0700 + (PDT) +Received: by mail-ee0-f49.google.com with SMTP id d41so1745438eek.22 + for ; Mon, 26 Aug 2013 10:58:41 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=h9Lxl5EUpFNUQd5yIZxwkR5ko/VEEOMcIN7wrI1YYb0=; + b=eMjwUlBwT8up43zT1tDTCyjBDxe4fNHxbxjqd2qrq5mbJeBjRxqulNkssuBb/w+TJG + a4yTTFJbjgO0c67aYq3aUz3hOpXPOo4guxqWw2bP4mL9MsGLx1kPmGofmkbxu9Y2UK60 + hAbCb71NXY6ch41RgV6/u+1TJRE1Kno6XW/J0IMepa8vP1zq63cTX+gy0lQGudJ5XRaX + TqTCOD6tp1Gbh62RrJgH7b6OD83e9p49iG2CDM7L/DHSoIz6W1OwlNkgjwsMGpFor4jD + L/FUFuFoTG5xLxvEgWlbq8nWvBZGez/Ht/foOyk4U0zxOLpNOqgwJugQ3lKSbm1jeZCn + jCow== +X-Gm-Message-State: + ALoCoQlhcp3CvU/e4HTrtAXNd1fBGexChmu87IFRSappf20sv+JpB310iAjxatb38BOjBuxzvgMT +X-Received: by 10.14.107.68 with SMTP id n44mr28056364eeg.26.1377539921273; + Mon, 26 Aug 2013 10:58:41 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) by mx.google.com with ESMTPSA id + n48sm22997399eeg.17.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Mon, 26 Aug 2013 10:58:40 -0700 (PDT) +From: Jani Nikula +To: Tomi Ollila , + Geoffrey Ferrari , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: bugfix notmuch-mua-reply when signature is present +In-Reply-To: +References: + <1375961732-14327-1-git-send-email-geoffrey.ferrari@oriel.oxon.org> + +User-Agent: Notmuch/0.16+32~g01f5508 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Mon, 26 Aug 2013 20:58:43 +0300 +Message-ID: <87bo4k2v1o.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Mon, 26 Aug 2013 17:58:51 -0000 + +On Mon, 19 Aug 2013, Tomi Ollila wrote: +> On Fri, Aug 09 2013, Tomi Ollila wrote: +> +>> On Thu, Aug 08 2013, Geoffrey Ferrari wrote: +>> +>>> From: "Geoffrey H. Ferrari" +>>> +>>> When composing a reply, notmuch-mua-reply tries to be smart and cite +>>> the original message by inserting it before the user signature, if +>>> one is present. However, the existing method of backward searching +>>> from the end of the buffer to find the signature separator and then +>>> moving one line up results in the original message being cited in +>>> the message headers. That's because at this point the message looks +>>> like this (with | representing point after searching for the +>>> signature separator): +>>> +>>> From: xxx +>>> To: xxx +>>> Subject: xxx +>>> --text follows this line-- +>>> |-- +>>> My fancy signature +>>> +>>> With this patch, a newline is opened instead, so that the orignal +>>> message is cited above the signature but still in the message text. +>>> --- +>> +>> This probably fixes #1 in id:8762auwgfl.fsf@steelpick.2x.cz +>> +>> ( http://mid.gmane.org/8762auwgfl.fsf@steelpick.2x.cz ) +>> +>> ... I just noticed I have no clue how to set message signature to test +>> this... ;/ +> +> Now I tried something fancy and executed `echo foobar > ~/.signature` +> +> Now I get the "--\nfoobar" at the end of all emails I'm, composing -- but +> I don't see any problems when replying... so I'd be interested to see +> in what circumstances could I get the problem this patch solves exposed. + +Hi Geoffrey, we can't reproduce the issue this patch claims to fix. Care +to provide more info please? + +BR, +Jani. + + +> +>> +>> Tomi +> +> Tomi +> +> +>> +>> +>> +>>> emacs/notmuch-mua.el | 2 +- +>>> 1 file changed, 1 insertion(+), 1 deletion(-) +>>> +>>> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el +>>> index 2baae5f..86f164d 100644 +>>> --- a/emacs/notmuch-mua.el +>>> +++ b/emacs/notmuch-mua.el +>>> @@ -194,7 +194,7 @@ list." +>>> ;; if one is present +>>> (goto-char (point-max)) +>>> (if (re-search-backward message-signature-separator nil t) +>>> - (forward-line -1) +>>> + (newline) +>>> (goto-char (point-max))) +>>> +>>> (let ((from (plist-get original-headers :From)) +>>> -- +>>> 1.7.10.4 +>>> +>>> _______________________________________________ +>>> notmuch mailing list +>>> notmuch@notmuchmail.org +>>> http://notmuchmail.org/mailman/listinfo/notmuch +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch