[PATCH v2 2/3] emacs: Pass the part to text/plain hook functions

David Bremner david at tethera.net
Thu Mar 28 10:58:00 PDT 2019


David Edmondson <dme at 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



More information about the notmuch mailing list