From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 127DE6DE0C1B for ; Sun, 27 Aug 2017 06:46:43 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.455 X-Spam-Level: X-Spam-Status: No, score=0.455 tagged_above=-999 required=5 tests=[AWL=-0.178, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d2rqQFUAZciO for ; Sun, 27 Aug 2017 06:46:42 -0700 (PDT) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by arlo.cworth.org (Postfix) with ESMTPS id EC78E6DE0C32 for ; Sun, 27 Aug 2017 06:46:36 -0700 (PDT) Received: by mail-wm0-f66.google.com with SMTP id j72so4434056wmi.3 for ; Sun, 27 Aug 2017 06:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=lK+VE/kK30HlndBT5mlojZVCQ5D1eiTnvbOVD+ZmQxk=; b=TX9lAoFU16qXAXlaPYF7MJbpTT2z1tC7go454n7B4mCnOsAyBKBvjCzLcvwwHUkrI6 h52CVPhB7R1FYkpak1CTYet0M64q8vS0GisKkQUb03vrUWXOVLaWlqyFiokfFavTvYE/ 4PjmjTt8v3vpj/3+uJdFhSQUBKD4SXsDJsqpBHXk14RZ/XTb4XP3krxWP1K/P3bSmfh/ 8/lH8YCIClD12DE7QQ0GQilzX68ennkTiVETuUrl5yTI14jiih03IJfVJKYedoN07KE4 VyoM5jSPvviVfso7SEtBlcoKgr8VcBpX/zsMAzCBaGlpx5zQmns2+4riTyU+sKABOdvA IKdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=lK+VE/kK30HlndBT5mlojZVCQ5D1eiTnvbOVD+ZmQxk=; b=qlwEGPoQTugjUzHk4vQmuNESXk+wIMqC6lI7KcQ0I4/NBEs1GXmRKCSHhDStwXUza1 64zpNh0MjvvZGREJx04rmGsVPStGAqC1GkhQ834G6en4SA9BlAlkQapdpNlwOBBvik04 f09RP9NFWnNWGbCINSVzPGKRofBPfV8kgNBfAlscTSY1oJ9rd/TaSgHW7GkmVewxZNta nB4F7wVOMaO9WW+l18f1+ZzLLc6k+vl0crNDPOWhRUEquFMjAW3HTKHIbqinKJuEdUKl TkND4IMRqtnagAfQYN4UJaWSfske5clEZxewulO2CoDn2BP9oUfoAcO0Fxb4uSTab57y vT6w== X-Gm-Message-State: AHYfb5jv6lAmAtd+rB6h5BOZizk6EVbvR5ZQSxXwjvQfKUpcMpsOvc7M BKsYD2sXYsXT8cG91km0dA== X-Received: by 10.80.144.253 with SMTP id d58mr4226443eda.222.1503841595053; Sun, 27 Aug 2017 06:46:35 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id g44sm7459411eda.4.2017.08.27.06.46.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Aug 2017 06:46:30 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 5c88fd08 for ; Sun, 27 Aug 2017 13:46:24 +0000 (UTC) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH v1 4/4] emacs: reply: Allow washing of inserted text parts during reply Date: Sun, 27 Aug 2017 14:46:23 +0100 Message-Id: <20170827134623.20041-5-dme@dme.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170827134623.20041-1-dme@dme.org> References: <20170827134623.20041-1-dme@dme.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Sun, 27 Aug 2017 13:46:43 -0000 When inserting a text/plain part during reply generation, add a hook that allows the user to improve the display of the part. As an example, the function `notmuch-wash-tidy-citations' might be called. --- emacs/notmuch-mua.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index fd64b362..4d352626 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -115,6 +115,13 @@ mutiple parts get a header." (function :tag "Other")) :group 'notmuch-reply) +(defcustom notmuch-mua-reply-text/plain-hook nil + "Functions used to improve the display of text/plain parts in replies. + +This is analogous to `notmuch-show-insert-text/plain-hook'." + :type 'hook + :group 'notmuch-reply) + ;; (defun notmuch-mua-get-switch-function () @@ -249,7 +256,7 @@ mutiple parts get a header." ;; Don't attempt to clean up messages, excerpt ;; citations, etc. in the original message before ;; quoting. - ((notmuch-show-insert-text/plain-hook nil) + ((notmuch-show-insert-text/plain-hook notmuch-mua-reply-text/plain-hook) ;; Don't omit long parts. (notmuch-show-max-text-part-size 0) ;; Insert headers for parts as appropriate for replying. -- 2.11.0