unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: notmuch@notmuchmail.org
Subject: [PATCH v2 2/3] emacs: Pass the part to text/plain hook functions
Date: Sat, 22 Dec 2018 12:10:57 +0000	[thread overview]
Message-ID: <20181222121058.5892-3-dme@dme.org> (raw)
In-Reply-To: <20181222121058.5892-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-22 12:11 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 ` David Edmondson [this message]
2019-03-28 17:58   ` [PATCH v2 2/3] emacs: Pass the part to text/plain hook functions 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
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=20181222121058.5892-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).