unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jed Brown <jed@59A2.org>
To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 3/3] emacs: Process format=flowed text
Date: Sat, 30 May 2020 14:49:35 -0600	[thread overview]
Message-ID: <87k10tf8rk.fsf@jedbrown.org> (raw)
In-Reply-To: <20181222121058.5892-4-dme@dme.org>

Was this proposal dropped or did it just get lost?

David Edmondson <dme@dme.org> 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

  reply	other threads:[~2020-05-30 20:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22 12:10 [PATCH v2 0/3] support for format=flowed text display David Edmondson
2018-12-22 12:10 ` [PATCH v2 1/3] notmuch: Include the format parameter of text/plain parts David Edmondson
2018-12-22 12:10 ` [PATCH v2 2/3] emacs: Pass the part to text/plain hook functions David Edmondson
2019-03-28 17:58   ` David Bremner
2018-12-22 12:10 ` [PATCH v2 3/3] emacs: Process format=flowed text David Edmondson
2020-05-30 20:49   ` Jed Brown [this message]
2020-05-31 11:47     ` David Bremner
2020-06-01  0:11       ` Jed Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k10tf8rk.fsf@jedbrown.org \
    --to=jed@59a2.org \
    --cc=dme@dme.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).