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