[PATCH v3 3/3] emacs: Don't insert a part header if it's the first part and text/*.
Mark Walters
markwalters1009 at gmail.com
Sun Feb 12 01:24:09 PST 2012
On Mon, 6 Feb 2012 15:39:08 +0000, David Edmondson <dme at dme.org> wrote:
> Previously this logic applied only to text/plain. Allow it for other
> text/* parts as well.
What is the reason for treating the first part differently?
Personally, I would prefer to keep it as now since pressing v on the
[text/html] `views' the message in my mailcap preferred html viewer
which can be convenient.
Thanks
Mark
> ---
> emacs/notmuch-show.el | 9 ++++-----
> 1 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index ce79762..c60e613 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -412,7 +412,9 @@ CONTENT-TYPE parts."
> (defun notmuch-show-insert-part-header (nth content-type declared-type
> &optional name comment
> &rest button-parameters)
> - (unless (notmuch-show-hidden-part-header content-type)
> + (unless (or (notmuch-show-hidden-part-header content-type)
> + (and (= nth 1)
> + (string-match "text/*" content-type)))
> (apply #'insert-button
> (concat "[ "
> (if name (concat name ": ") "")
> @@ -703,10 +705,7 @@ current buffer, if possible."
>
> (defun notmuch-show-insert-part-text/plain (msg part content-type nth depth declared-type)
> (let ((start (point)))
> - ;; If this text/plain part is not the first part in the message,
> - ;; insert a header to make this clear.
> - (if (> nth 1)
> - (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename)))
> + (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename))
> (insert (notmuch-show-get-bodypart-content msg part nth))
> (save-excursion
> (save-restriction
> --
> 1.7.8.3
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list