--- /dev/null
+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 69244431FBC\r
+ for <notmuch@notmuchmail.org>; Fri, 28 Mar 2014 11:04:37 -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 gAEQQOUTsVIN for <notmuch@notmuchmail.org>;\r
+ Fri, 28 Mar 2014 11:04:32 -0700 (PDT)\r
+Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com\r
+ [74.125.83.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ A816E431FAF for <notmuch@notmuchmail.org>; Fri, 28 Mar 2014 11:04:31 -0700\r
+ (PDT)\r
+Received: by mail-ee0-f47.google.com with SMTP id b15so4395562eek.34\r
+ for <notmuch@notmuchmail.org>; Fri, 28 Mar 2014 11:04:27 -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:cc:subject:date:message-id;\r
+ bh=wwAE+Iq9kiV4oCK6qIL/PyHRiin03ihVntqW4IhLU4U=;\r
+ b=dvuFJJQFiTXAeynYPgqlfJwIb6VE/ag6/bvQtc4x1se8F4RCJ+tfuY/U7V7RDOe4lk\r
+ AFJpFJPgWUhR+63GtfWFji6XJEMg/I6a8XiLyKmX2tScFfUN7wrvksTfOE5Qgmr0cHOy\r
+ OQ9ywo9jp6qZcAk7m6UeK3P3I0Ytv4io0YND2nlqiUOn0BTJBQ7qDSRyuvHHoJ1HUBm3\r
+ nmM9boAMMyLEt1tD81zPVl6M26Or7R4IeAQVwc9ZU440jCrImtTlzbamPSZfniffW4+2\r
+ cdY8ek3H8EWi+5XUWrvn0na2hGi8wA26/OC+K0wRowkmq+fpXGn9CamGrmrW9XZ134N4\r
+ zv1g==\r
+X-Gm-Message-State:\r
+ ALoCoQkQpyEhzfuA7TnUnPkz8LcwHQ7ITaULD4BCSkgyYbAGFwgq2gI1dya4h9hECl0ruC8sJgxn\r
+X-Received: by 10.14.224.6 with SMTP id w6mr3702047eep.60.1396029867592;\r
+ Fri, 28 Mar 2014 11:04:27 -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 u46sm13162130eel.1.2014.03.28.11.04.26\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Fri, 28 Mar 2014 11:04:26 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: push mark before signature on reply\r
+Date: Fri, 28 Mar 2014 20:04:25 +0200\r
+Message-Id: <1396029865-23133-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 1.9.0\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: Fri, 28 Mar 2014 18:04:37 -0000\r
+\r
+We push mark on reply so user can cut the quote. Push the mark before\r
+signature, if any, instead of end of buffer so the signature is\r
+preserved.\r
+\r
+This is consistent with message-kill-to-signature.\r
+---\r
+ emacs/notmuch-mua.el | 6 +++++-\r
+ 1 file changed, 5 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index b16a10ecd379..ba3ef275ec5e 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -226,8 +226,12 @@ list."\r
+ ;; Quote the original message according to the user's configured style.\r
+ (message-cite-original))))\r
+ \r
+- (goto-char (point-max))\r
++ ;; Push mark right before signature, if any.\r
++ (message-goto-signature)\r
++ (unless (eobp)\r
++ (end-of-line -1))\r
+ (push-mark)\r
++\r
+ (message-goto-body)\r
+ (set-buffer-modified-p nil))\r
+ \r
+-- \r
+1.9.0\r
+\r