X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=1e631d0eb0147a19da00bed2f8af6dbd3dff1dcf;hb=6f749dd24a1c8138a05ac92884e8cb71098c7f6e;hp=6fc71cc737995a5f4a66d205a0be58e458281ab3;hpb=19cf3910a553e5325d8da3a73669c6c452dbd99c;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 6fc71cc7..1e631d0e 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -567,12 +567,20 @@ Take wildcards into account." (string= (downcase t1) (downcase t2)))))) -(defvar notmuch-multipart/alternative-discouraged +(defcustom notmuch-multipart/alternative-discouraged '(;; Avoid HTML parts. "text/html" ;; multipart/related usually contain a text/html part and some ;; associated graphics. - "multipart/related")) + "multipart/related") + "Which mime types to hide by default for multipart messages. + +Can either be a list of mime types (as strings) or a function +mapping a plist representing the current message to such a list. +See Info node `(notmuch-emacs) notmuch-show' for a sample function." + :group 'notmuch-show + :type '(radio (repeat :tag "MIME Types" string) + (function :tag "Function"))) (defun notmuch-multipart/alternative-determine-discouraged (msg) "Return the discouraged alternatives for the specified message." @@ -1037,6 +1045,14 @@ region if the region is active, or both `point' otherwise." 'notmuch-interactive-region "notmuch 0.29") +(defun notmuch--inline-override-types () + "Override mm-inline-override-types to stop application/* +parts from being displayed unless the user has customized +it themselves." + (if (equal mm-inline-override-types + (eval (car (get 'mm-inline-override-types 'standard-value)))) + (cons "application/.*" mm-inline-override-types) + mm-inline-override-types)) ;;; _ (provide 'notmuch-lib)