Re: [PATCH] emacs: show: stop display of appliaction/* parts

Subject: Re: [PATCH] emacs: show: stop display of appliaction/* parts

Date: Sun, 08 Jan 2017 00:12:02 +0100

To: Mark Walters, notmuch@notmuchmail.org

Cc:

From: Tomas Nordin


Good evening

> emacs/notmuch-show.el | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 364004b..42734ac 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1227,7 +1227,15 @@ matched."
>    (interactive "sNotmuch show: \nP")
>    (let ((buffer-name (generate-new-buffer-name
>  		      (or buffer-name
> -			  (concat "*notmuch-" thread-id "*")))))
> +			  (concat "*notmuch-" thread-id "*"))))
> +	;; We override mm-inline-override-types to stop appliacation/*
> +	;; parts from being displayed unless the user has customized
> +	;; it themselves.
> +	(mm-inline-override-types
> +	 (if (equal (list mm-inline-override-types)
> +		    (get 'mm-inline-override-types 'standard-value))
> +	     (cons "application/*" mm-inline-override-types)
> +	   mm-inline-override-types)))
>      (switch-to-buffer (get-buffer-create buffer-name))
>      ;; No need to track undo information for this buffer.
>      (setq buffer-undo-list t)
> -- 
> 2.1.4

I applied this to a local copy of notmuch-show.el (notmuch is installed
on debian via apt here) and then eval-defun:ed the function. After that
no inline default display. Seems to work nicely. notmuch version 0.23.1.

By chance it can be easily answered, if I want to use the latest notmuch
installed from source, does it seem like a suitable procedure to do
this;

sudo apt-get remove notmuch
... do the source install and re-run notmuch new. It will probably work
smoothly with the setup I have?

Thread: