unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 2/3] emacs: Pass the part to text/plain hook functions
Date: Thu, 28 Mar 2019 14:58:00 -0300	[thread overview]
Message-ID: <875zs29907.fsf@tethera.net> (raw)
In-Reply-To: <20181222121058.5892-3-dme@dme.org>

David Edmondson <dme@dme.org> writes:

> 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)
>  

I wonder if it would be better to have depth last as an optional
parameter, so that existing user written hooks don't break. I don't know
if
1) that works in practice
2) there are a non-trivial number of user written text/plain hooks

  reply	other threads:[~2019-03-28 17:58 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 [this message]
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=875zs29907.fsf@tethera.net \
    --to=david@tethera.net \
    --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).