From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UAqXJyrI0l6eJQAA0tVLHw (envelope-from ) for ; Sat, 30 May 2020 20:55:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UEJ8IyrI0l72bwAA1q6Kng (envelope-from ) for ; Sat, 30 May 2020 20:55:06 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8A82D94042B for ; Sat, 30 May 2020 20:55:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 8D00C6DE0C7A; Sat, 30 May 2020 13:54:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org 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 LCNz8cVh5t1n; Sat, 30 May 2020 13:54:57 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 71B746DE0B3E; Sat, 30 May 2020 13:54:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 49A216DE0B3E for ; Sat, 30 May 2020 13:54:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org 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 XAx4QUoMCand for ; Sat, 30 May 2020 13:54:54 -0700 (PDT) X-Greylist: delayed 325 seconds by postgrey-1.36 at arlo; Sat, 30 May 2020 13:54:54 PDT Received: from jedbrown.org (jedbrown.org [159.89.180.195]) by arlo.cworth.org (Postfix) with ESMTPS id 08E2F6DE09CD for ; Sat, 30 May 2020 13:54:53 -0700 (PDT) Received: from localhost (c-71-237-71-56.hsd1.co.comcast.net [71.237.71.56]) by jedbrown.org (Postfix) with ESMTPSA id E8DF620193; Sat, 30 May 2020 20:49:24 +0000 (UTC) From: Jed Brown To: David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH v2 3/3] emacs: Process format=flowed text In-Reply-To: <20181222121058.5892-4-dme@dme.org> References: <20181222121058.5892-1-dme@dme.org> <20181222121058.5892-4-dme@dme.org> Date: Sat, 30 May 2020 14:49:35 -0600 Message-ID: <87k10tf8rk.fsf@jedbrown.org> MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -1.01 X-TUID: MVMksxIzemgj Was this proposal dropped or did it just get lost? David Edmondson writes: > If a text/plain part is declared as format=flowed, apply the > appropriate transformation for display using flow-fill.el. > --- > emacs/notmuch-show.el | 3 ++- > emacs/notmuch-wash.el | 14 ++++++++++++++ > 2 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index b3cefcd9..823a2d19 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -90,7 +90,8 @@ visible for any given message." > :group 'notmuch-show > :group 'notmuch-hooks) > > -(defcustom notmuch-show-insert-text/plain-hook '(notmuch-wash-wrap-long-lines > +(defcustom notmuch-show-insert-text/plain-hook '(notmuch-wash-format=flowed > + notmuch-wash-wrap-long-lines > notmuch-wash-tidy-citations > notmuch-wash-elide-blank-lines > notmuch-wash-excerpt-citations) > diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el > index 54275ec7..d4f0e883 100644 > --- a/emacs/notmuch-wash.el > +++ b/emacs/notmuch-wash.el > @@ -426,6 +426,20 @@ for error." > > ;; > > +(require 'flow-fill) > + > +(defun notmuch-wash-format=flowed (msg part depth) > + "If the current part content-type included 'format=flowed', > +apply the appropriate transformation." > + (when (string= (plist-get part :format) "flowed") > + ;; Adjust `fill-flowed-display-column' to allow for the indent > + ;; that we will later apply to this content. > + (let ((fill-flowed-display-column (- (eval fill-flowed-display-column) > + (* depth notmuch-show-indent-messages-width)))) > + (fill-flowed)))) > + > +;; > + > (provide 'notmuch-wash) > > ;;; notmuch-wash.el ends here > -- > 2.11.0 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch