* mu4e: use mu4e-view-show-images

This commit is contained in:
djcb 2013-01-26 10:57:14 +02:00
parent 89c555d047
commit 8256a403c5
2 changed files with 15 additions and 5 deletions

View File

@ -139,12 +139,15 @@ and `mu4e-headers-visible-columns'."
(const :tag "Don't split" nil)) (const :tag "Don't split" nil))
:group 'mu4e-headers) :group 'mu4e-headers)
(defcustom mu4e-show-images nil (defcustom mu4e-view-show-images nil
"Whether to automatically display attached images in the message "Whether to automatically display attached images in the message
view buffer." view buffer."
:type 'boolean :type 'boolean
:group 'mu4e-view) :group 'mu4e-view)
(make-obsolete-variable 'mu4e-show-images
'mu4e-view-show-images "0.9.9.x")
(defcustom mu4e-confirm-quit t (defcustom mu4e-confirm-quit t
"Whether to confirm to quit mu4e." "Whether to confirm to quit mu4e."
:type 'boolean :type 'boolean

View File

@ -56,6 +56,7 @@ For the complete list of available headers, see `mu4e-header-info'."
:type (list 'symbol) :type (list 'symbol)
:group 'mu4e-view) :group 'mu4e-view)
(defcustom mu4e-view-show-addresses nil (defcustom mu4e-view-show-addresses nil
"Whether to initially show full e-mail addresses for contacts in "Whether to initially show full e-mail addresses for contacts in
address fields, rather than only their names. Note that you can address fields, rather than only their names. Note that you can
@ -76,7 +77,7 @@ In the format of `format-time-string'."
(defcustom mu4e-view-image-max-width 800 (defcustom mu4e-view-image-max-width 800
"The maximum width for images to display. "The maximum width for images to display.
This is only effective if you're using an emacs with Imagemagick This is only effective if you're using an emacs with Imagemagick
support, and `mu4e-show-image' is non-nil." support, and `mu4e-view-show-images' is non-nil."
:group 'mu4e-view) :group 'mu4e-view)
(defcustom mu4e-view-scroll-to-next t (defcustom mu4e-view-scroll-to-next t
@ -143,7 +144,7 @@ messages - for example, `mu4e-org'."
;; not, when the policy is 'ask'. we simply assume the user said yes... the ;; not, when the policy is 'ask'. we simply assume the user said yes... the
;; alternative would be to ask for each message, encrypted or not. maybe we ;; alternative would be to ask for each message, encrypted or not. maybe we
;; need an extra policy... ;; need an extra policy...
(mu4e~proc-view msgid mu4e-show-images mu4e-decryption-policy)) (mu4e~proc-view msgid mu4e-view-show-images mu4e-decryption-policy))
(defun mu4e-view-message-text (msg) (defun mu4e-view-message-text (msg)
@ -497,6 +498,12 @@ FUNC should be a function taking two arguments:
(define-key map "|" 'mu4e-view-pipe) (define-key map "|" 'mu4e-view-pipe)
(define-key map "a" 'mu4e-view-action) (define-key map "a" 'mu4e-view-action)
;; toggle header settings
(define-key map "O" 'mu4e-headers-change-sorting)
(define-key map "P" 'mu4e-headers-toggle-threading)
(define-key map "Q" 'mu4e-headers-toggle-full-search)
(define-key map "W" 'mu4e-headers-toggle-include-related)
;; change the number of headers ;; change the number of headers
(define-key map (kbd "C-+") 'mu4e-headers-split-view-grow) (define-key map (kbd "C-+") 'mu4e-headers-split-view-grow)
(define-key map (kbd "C--") 'mu4e-headers-split-view-shrink) (define-key map (kbd "C--") 'mu4e-headers-split-view-shrink)
@ -717,7 +724,7 @@ What browser is called is depending on
(defun mu4e~view-show-images-maybe (msg) (defun mu4e~view-show-images-maybe (msg)
"Show attached images, if `mu4e-show-images' is non-nil." "Show attached images, if `mu4e-show-images' is non-nil."
(when (and (display-images-p) mu4e-show-images) (when (and (display-images-p) mu4e-view-show-images)
(mu4e-view-for-each-part msg (mu4e-view-for-each-part msg
(lambda (msg part) (lambda (msg part)
(when (string-match "^image/" (mu4e-message-part-field part :mime-type)) (when (string-match "^image/" (mu4e-message-part-field part :mime-type))
@ -1036,7 +1043,7 @@ attachments) in response to a (mu4e~proc-extract 'temp ... )."
;; remember the mapping path->docid, which maps the path of the embedded ;; remember the mapping path->docid, which maps the path of the embedded
;; message to the docid of its parent ;; message to the docid of its parent
(puthash path docid mu4e~path-parent-docid-map) (puthash path docid mu4e~path-parent-docid-map)
(mu4e~proc-view-path path mu4e-show-images mu4e-decryption-policy)) (mu4e~proc-view-path path mu4e-view-show-images mu4e-decryption-policy))
((string= what "emacs") ((string= what "emacs")
(find-file path) (find-file path)
;; make the buffer read-only since it usually does not make ;; make the buffer read-only since it usually does not make