From 256b06c7112e23f9db48afbf5f5e00c602374916 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 28 Aug 2013 22:34:21 +0300 Subject: [PATCH] [PATCH 1/2] emacs: simplify point placement for inserting message body on reply --- 61/07a7f7b9c0c7a41fdbda4e2e102c0a147c39c5 | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 61/07a7f7b9c0c7a41fdbda4e2e102c0a147c39c5 diff --git a/61/07a7f7b9c0c7a41fdbda4e2e102c0a147c39c5 b/61/07a7f7b9c0c7a41fdbda4e2e102c0a147c39c5 new file mode 100644 index 000000000..039bb5a7d --- /dev/null +++ b/61/07a7f7b9c0c7a41fdbda4e2e102c0a147c39c5 @@ -0,0 +1,101 @@ +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 C3EE1431FD8 + for ; Wed, 28 Aug 2013 12:34:30 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +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 dpRqRtMXJOnD for ; + Wed, 28 Aug 2013 12:34:25 -0700 (PDT) +Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com + [74.125.83.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 1E921431FC2 for ; Wed, 28 Aug 2013 12:34:25 -0700 + (PDT) +Received: by mail-ee0-f51.google.com with SMTP id c1so3102632eek.24 + for ; Wed, 28 Aug 2013 12:34:24 -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:cc:subject:date:message-id:in-reply-to + :references:in-reply-to:references; + bh=na7Yt2RJE3d7DB8es1eC/89Fi+5PAmsy9pl7EStE5y8=; + b=Z6YEGF0oKzft8xpkNGGxoidV/1ciT1sC1apvglc1JnVIHpHrT9383XBUB3m80+FpKU + m1uXVLZXy/YMifW3iCfeuYpOhbu1LfSEAThuJBdGrWwt4ahgUGA0+qFUBc6+ucsUeUXO + WJpDyXSh8Hltncr7V9HlLNpR8cqN2BsL7lYEzEB9JbP9Xddl4nQ7/s77pYUjLJWvLmFm + baSKzEv86SEk/Cz/HuposUMdS7rjIBGfei8mUc0N6/2lXIx/UyTCe9X5FOUpYY/JEr/I + evz2llx/Hf4e2wGrhu0dzKW+C47zBP2MnKoZwzmB9UPNmLKCa/LiFTYnH16S10bgrBu9 + Mw/w== +X-Gm-Message-State: + ALoCoQlkarsH9QFmTan4dkEJIeUgiCnLVdn5njXKrwy3kz3htTJUaBQd9t0m/WES2H6jqz7iPBR0 +X-Received: by 10.14.181.132 with SMTP id l4mr3900868eem.77.1377718463853; + Wed, 28 Aug 2013 12:34:23 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id p5sm40019827eeg.5.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Wed, 28 Aug 2013 12:34:23 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] emacs: simplify point placement for inserting message + body on reply +Date: Wed, 28 Aug 2013 22:34:21 +0300 +Message-Id: + <26028b45ca200db29feea43176a5a2275232b878.1377718199.git.jani@nikula.org> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: +References: +In-Reply-To: +References: +Cc: Tomi Ollila , + Geoffrey Ferrari +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: Wed, 28 Aug 2013 19:34:31 -0000 + +The backwards regexp was most likely just old cruft. Simply put the +point at the beginning of message body. It's guaranteed to be before +the signature. +--- + emacs/notmuch-mua.el | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el +index 2baae5f..a4be394 100644 +--- a/emacs/notmuch-mua.el ++++ b/emacs/notmuch-mua.el +@@ -190,12 +190,8 @@ list." + (notmuch-headers-plist-to-alist reply-headers) + nil (notmuch-mua-get-switch-function)))) + +- ;; Insert the message body - but put it in front of the signature +- ;; if one is present +- (goto-char (point-max)) +- (if (re-search-backward message-signature-separator nil t) +- (forward-line -1) +- (goto-char (point-max))) ++ ;; Move point to the beginning of the message body. ++ (message-goto-body) + + (let ((from (plist-get original-headers :From)) + (date (plist-get original-headers :Date)) +-- +1.7.10.4 + -- 2.26.2