From: Tomi Ollila Date: Mon, 19 Aug 2013 14:29:20 +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=a9e5060fb190bda865b564a5cc788ea623a07a39;p=notmuch-archives.git Re: [PATCH] emacs: bugfix notmuch-mua-reply when signature is present --- diff --git a/80/822fde4a95b8f7aa5b4cd13914e9a4b78778fb b/80/822fde4a95b8f7aa5b4cd13914e9a4b78778fb new file mode 100644 index 000000000..10fd67f77 --- /dev/null +++ b/80/822fde4a95b8f7aa5b4cd13914e9a4b78778fb @@ -0,0 +1,124 @@ +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 544A0429E59 + for ; Mon, 19 Aug 2013 07:29:34 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 9b-20F85wvk1 for ; + Mon, 19 Aug 2013 07:29:28 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id A262C431E62 + for ; Mon, 19 Aug 2013 07:29:28 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 9C102100086; + Mon, 19 Aug 2013 17:29:20 +0300 (EEST) +From: Tomi Ollila +To: 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+3~g340c058 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +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, 19 Aug 2013 14:29:34 -0000 + +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. + +> +> 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