From aa4c73d8b19b63e2a0eb28fdf85ea35082388111 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Thu, 5 Sep 2013 19:42:11 +0300 Subject: [PATCH] Re: [PATCH 1/1] emacs: fix notmuch-mua-reply point placement when signature involved --- 82/b038a3de67b262952f8bfbb390ec7d55b71ace | 122 ++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 82/b038a3de67b262952f8bfbb390ec7d55b71ace diff --git a/82/b038a3de67b262952f8bfbb390ec7d55b71ace b/82/b038a3de67b262952f8bfbb390ec7d55b71ace new file mode 100644 index 000000000..917b257f6 --- /dev/null +++ b/82/b038a3de67b262952f8bfbb390ec7d55b71ace @@ -0,0 +1,122 @@ +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 15FED431E62 + for ; Thu, 5 Sep 2013 09:42:25 -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 LNIX3gTZSO3R for ; + Thu, 5 Sep 2013 09:42:15 -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 + 43B50431FDB for ; Thu, 5 Sep 2013 09:42:15 -0700 + (PDT) +Received: by mail-ee0-f51.google.com with SMTP id c1so1023601eek.38 + for ; Thu, 05 Sep 2013 09:42:12 -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:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=cyt3LS8XB+M2DMBnjJnGxt/eDk5nwI/21aacAO/tS6o=; + b=Rr+5Z8KGlBsuvdLYom0rx5gllCtDKTwLfAoyC7Hy4YIqoFdCsfgwAz4XjX6hzUSCip + j7sLvBzvyPJVnbs99yzxE7U4h3mZ1dlXt6JPdY9Jc8Bpk71cWJH84ccsECOhRrrIHsDs + 8EkvXqdrKtsIxIFuk/RyzAPnvXnALmawUmeO9wFARsRLOxi4aZXPxOig8xmZZ5srKL/Y + AeK+L9Pf0tFQr6JA7Hyiu8P0MgMk2OLjr8tYSeuL456Ik8lmCz2HJalhbLYIOyXr3GIK + qJtZ7ZuRitaHswKxer0CgVQSZD9RfJZwVH10JnOJTLKyB86VWu8QzxAywYQ+8DnS/V3E + JmMA== +X-Gm-Message-State: + ALoCoQkn1jg8P8ihaM6Q9/+huSLPtCvzAWU1NI1usExtP88bNz8fCj0efDFRjIVRSFPGSdHSbJkT +X-Received: by 10.14.224.7 with SMTP id w7mr257232eep.82.1378399332691; + Thu, 05 Sep 2013 09:42:12 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id d8sm50090092eeh.8.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Thu, 05 Sep 2013 09:42:11 -0700 (PDT) +From: Jani Nikula +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [PATCH 1/1] emacs: fix notmuch-mua-reply point placement when + signature involved +In-Reply-To: +References: <1378322458-30159-1-git-send-email-tomi.ollila@iki.fi> + <87d2one4u0.fsf@nikula.org> +User-Agent: Notmuch/0.16+39~gf3963b0 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Thu, 05 Sep 2013 19:42:11 +0300 +Message-ID: <87d2on9q58.fsf@nikula.org> +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: Thu, 05 Sep 2013 16:42:25 -0000 + +On Thu, 05 Sep 2013, Tomi Ollila wrote: +> On Thu, Sep 05 2013, Jani Nikula wrote: +> +>> On Wed, 04 Sep 2013, "Tomi.Ollila" wrote: +>>> From: Tomi Ollila +>>> +>>> When composing a reply, notmuch-mua-reply attempts to cite the +>>> the original message by inserting it before the user signature, if +>>> one is present. The existing method used to search the signature +>>> separator backward from the end of the buffer and then move one +>>> line up. In case of variable `message-signature-insert-empty-line' +>>> being nil (and `message-signature-setup-hook' not intervening) this +>>> caused point to go to the beginning of '--text follows this line--' +>>> separator line, and citation was inserted there. +>>> This change checks the value of `message-signature-insert-empty-line' +>>> and doesn't move point if that is nil. Additional narrowing to +>>> the body region ensures that point never goes to the separator line +>>> (or beyond). +>>> +>>> Original patch from "Geoffrey H. Ferrari", continued with iterations +>>> from Jani and Mark. +>> +>> Hi Tomi, I don't think you've sufficiently convinced me why we need all +>> this complexity instead of just doing [1]. And if you do get me +>> convinced, I'd like the reason to be in the commit message and in a +>> comment above the piece of code in question. +> +> (add-hook 'message-signature-setup-hook +> (lambda () (insert "Insert this text before the citation not after.\n"))) +> +> From emacs documentation: +> +> message-signature-setup-hook is a variable defined in `message.el'. +> Its value is nil +> +> This variable may be risky if used as a file-local variable. +> +> Documentation: +> Normal hook, run each time a new outgoing message is initialized. +> It is run after the headers have been inserted and before +> the signature is inserted. +> +> You can customize this variable. +> +> +> Adding the comments is a good idea -- if the above convinces you +> I'll prepare comments along this idea. + +Meh. Fair enough. Thanks for the explanation. + +Cheers, +Jani. -- 2.26.2