Re: [PATCH 1/1] emacs: fix notmuch-mua-reply point placement when signature involved
authorJani Nikula <jani@nikula.org>
Thu, 5 Sep 2013 16:42:11 +0000 (19:42 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:58 +0000 (09:56 -0800)
82/b038a3de67b262952f8bfbb390ec7d55b71ace [new file with mode: 0644]

diff --git a/82/b038a3de67b262952f8bfbb390ec7d55b71ace b/82/b038a3de67b262952f8bfbb390ec7d55b71ace
new file mode 100644 (file)
index 0000000..917b257
--- /dev/null
@@ -0,0 +1,122 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 15FED431E62\r
+       for <notmuch@notmuchmail.org>; Thu,  5 Sep 2013 09:42:25 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id LNIX3gTZSO3R for <notmuch@notmuchmail.org>;\r
+       Thu,  5 Sep 2013 09:42:15 -0700 (PDT)\r
+Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com\r
+ [74.125.83.51])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 43B50431FDB   for <notmuch@notmuchmail.org>; Thu,  5 Sep 2013 09:42:15 -0700\r
+ (PDT)\r
+Received: by mail-ee0-f51.google.com with SMTP id c1so1023601eek.38\r
+       for <notmuch@notmuchmail.org>; Thu, 05 Sep 2013 09:42:12 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:subject:in-reply-to:references\r
+       :user-agent:date:message-id:mime-version:content-type;\r
+       bh=cyt3LS8XB+M2DMBnjJnGxt/eDk5nwI/21aacAO/tS6o=;\r
+       b=Rr+5Z8KGlBsuvdLYom0rx5gllCtDKTwLfAoyC7Hy4YIqoFdCsfgwAz4XjX6hzUSCip\r
+       j7sLvBzvyPJVnbs99yzxE7U4h3mZ1dlXt6JPdY9Jc8Bpk71cWJH84ccsECOhRrrIHsDs\r
+       8EkvXqdrKtsIxIFuk/RyzAPnvXnALmawUmeO9wFARsRLOxi4aZXPxOig8xmZZ5srKL/Y\r
+       AeK+L9Pf0tFQr6JA7Hyiu8P0MgMk2OLjr8tYSeuL456Ik8lmCz2HJalhbLYIOyXr3GIK\r
+       qJtZ7ZuRitaHswKxer0CgVQSZD9RfJZwVH10JnOJTLKyB86VWu8QzxAywYQ+8DnS/V3E\r
+       JmMA==\r
+X-Gm-Message-State:\r
+ ALoCoQkn1jg8P8ihaM6Q9/+huSLPtCvzAWU1NI1usExtP88bNz8fCj0efDFRjIVRSFPGSdHSbJkT\r
+X-Received: by 10.14.224.7 with SMTP id w7mr257232eep.82.1378399332691;\r
+       Thu, 05 Sep 2013 09:42:12 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91])\r
+       by mx.google.com with ESMTPSA id d8sm50090092eeh.8.1969.12.31.16.00.00\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Thu, 05 Sep 2013 09:42:11 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/1] emacs: fix notmuch-mua-reply point placement when\r
+       signature involved\r
+In-Reply-To: <m2txhzfiw2.fsf@guru.guru-group.fi>\r
+References: <1378322458-30159-1-git-send-email-tomi.ollila@iki.fi>\r
+       <87d2one4u0.fsf@nikula.org> <m2txhzfiw2.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.16+39~gf3963b0 (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 05 Sep 2013 19:42:11 +0300\r
+Message-ID: <87d2on9q58.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 05 Sep 2013 16:42:25 -0000\r
+\r
+On Thu, 05 Sep 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> On Thu, Sep 05 2013, Jani Nikula <jani@nikula.org> wrote:\r
+>\r
+>> On Wed, 04 Sep 2013, "Tomi.Ollila" <tomi.ollila@iki.fi> wrote:\r
+>>> From: Tomi Ollila <tomi.ollila@iki.fi>\r
+>>>\r
+>>> When composing a reply, notmuch-mua-reply attempts to  cite the\r
+>>> the original message by inserting it before the user signature, if\r
+>>> one is present. The existing method used to search the signature\r
+>>> separator backward from the end of the buffer and then move one\r
+>>> line up. In case of variable `message-signature-insert-empty-line'\r
+>>> being nil (and `message-signature-setup-hook' not intervening) this\r
+>>> caused point to go to the beginning of '--text follows this line--'\r
+>>> separator line, and citation was inserted there.\r
+>>> This change checks the value of `message-signature-insert-empty-line'\r
+>>> and doesn't move point if that is nil. Additional narrowing to\r
+>>> the body region ensures that point never goes to the separator line\r
+>>> (or beyond).\r
+>>>\r
+>>> Original patch from "Geoffrey H. Ferrari", continued with iterations\r
+>>> from Jani and Mark.\r
+>>\r
+>> Hi Tomi, I don't think you've sufficiently convinced me why we need all\r
+>> this complexity instead of just doing [1]. And if you do get me\r
+>> convinced, I'd like the reason to be in the commit message and in a\r
+>> comment above the piece of code in question.\r
+>\r
+> (add-hook 'message-signature-setup-hook \r
+>    (lambda () (insert "Insert this text before the citation not after.\n")))\r
+>\r
+> From emacs documentation:\r
+>\r
+> message-signature-setup-hook is a variable defined in `message.el'.\r
+> Its value is nil\r
+>\r
+>   This variable may be risky if used as a file-local variable.\r
+>\r
+> Documentation:\r
+> Normal hook, run each time a new outgoing message is initialized.\r
+> It is run after the headers have been inserted and before\r
+> the signature is inserted.\r
+>\r
+> You can customize this variable.\r
+>\r
+>\r
+> Adding the comments is a good idea -- if the above convinces you\r
+> I'll prepare comments along this idea.\r
+\r
+Meh. Fair enough. Thanks for the explanation.\r
+\r
+Cheers,\r
+Jani.\r