unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: notmuch@notmuchmail.org
Subject: [PATCH v1 2/3] emacs: Pass the part to text/plain hook functions
Date: Fri, 21 Dec 2018 14:43:21 +0000	[thread overview]
Message-ID: <20181221144322.27942-3-dme@dme.org> (raw)
In-Reply-To: <20181221144322.27942-1-dme@dme.org>

Some text/plain hook functions may wish to access the details of the
part that is being manipulated.
---
 emacs/notmuch-show.el |  2 +-
 emacs/notmuch-wash.el | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 78f1af47..b3cefcd9 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -744,7 +744,7 @@ will return nil if the CID is unknown or cannot be retrieved."
     (save-excursion
       (save-restriction
 	(narrow-to-region start (point-max))
-	(run-hook-with-args 'notmuch-show-insert-text/plain-hook msg depth))))
+	(run-hook-with-args 'notmuch-show-insert-text/plain-hook msg part depth))))
   t)
 
 (defun notmuch-show-insert-part-text/calendar (msg part content-type nth depth button)
diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 54108d93..54275ec7 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -222,7 +222,7 @@ that PREFIX should not include a newline."
 				   :type button-type)))
 	  (overlay-put overlay 'notmuch-wash-button button))))))
 
-(defun notmuch-wash-excerpt-citations (msg depth)
+(defun notmuch-wash-excerpt-citations (msg part depth)
   "Excerpt citations and up to one signature."
   (goto-char (point-min))
   (beginning-of-line)
@@ -267,7 +267,7 @@ that PREFIX should not include a newline."
 
 ;;
 
-(defun notmuch-wash-elide-blank-lines (msg depth)
+(defun notmuch-wash-elide-blank-lines (msg part depth)
   "Elide leading, trailing and successive blank lines."
 
   ;; Algorithm derived from `article-strip-multiple-blank-lines' in
@@ -295,7 +295,7 @@ that PREFIX should not include a newline."
 
 ;;
 
-(defun notmuch-wash-tidy-citations (msg depth)
+(defun notmuch-wash-tidy-citations (msg part depth)
   "Improve the display of cited regions of a message.
 
 Perform several transformations on the message body:
@@ -326,7 +326,7 @@ Perform several transformations on the message body:
 
 ;;
 
-(defun notmuch-wash-wrap-long-lines (msg depth)
+(defun notmuch-wash-wrap-long-lines (msg part depth)
   "Wrap long lines in the message.
 
 If `notmuch-wash-wrap-lines-length' is a number, this will wrap
@@ -392,7 +392,7 @@ original filename the sender had."
 	  (or (notmuch-wash-subject-to-patch-sequence-number subject) 1)
 	  (notmuch-wash-subject-to-filename subject 52)))
 
-(defun notmuch-wash-convert-inline-patch-to-part (msg depth)
+(defun notmuch-wash-convert-inline-patch-to-part (msg part depth)
   "Convert an inline patch into a fake 'text/x-diff' attachment.
 
 Given that this function guesses whether a buffer includes a
-- 
2.11.0

  parent reply	other threads:[~2018-12-21 14:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21 14:43 [PATCH v1 0/3] support for format=flowed display David Edmondson
2018-12-21 14:43 ` [PATCH v1 1/3] notmuch: Include the format parameter of text/plain parts David Edmondson
2018-12-21 22:41   ` David Bremner
2018-12-22 12:08     ` David Edmondson
2018-12-21 14:43 ` David Edmondson [this message]
2018-12-21 14:43 ` [PATCH v1 3/3] emacs: Process format=flowed text David Edmondson

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=20181221144322.27942-3-dme@dme.org \
    --to=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).