* mu4e: fix display of images

This commit is contained in:
djcb 2013-10-13 23:24:56 +03:00
parent 92158cfdd4
commit 8be5e92709
2 changed files with 14 additions and 14 deletions

View File

@ -975,15 +975,15 @@ and MAXHEIGHT are ignored."
(create-image imgpath 'imagemagick nil :width maxwidth)
(create-image imgpath 'imagemagick))
(create-image imgpath))))
;;(message "DISPLAY: %S %S" imgpath img)
(when img
(save-excursion
(insert "\n")
(let ((size (image-size img))) ;; inspired by gnus..
(insert-char ?\n
(max 0 (round (- (window-height) (or maxheight (cdr size)) 1) 2)))
(insert-char ?\
(insert-char ?\.
(max 0 (round (- (window-width) (or maxwidth (car size))) 2)))
(insert-image img)))))
(insert-image img))))))
(defun mu4e-hide-other-mu4e-buffers ()

View File

@ -253,7 +253,6 @@ marking if it still had that."
(unless (eq major-mode 'mu4e-view-mode)
(mu4e-view-mode))
(setq ;; buffer local
mu4e~view-msg msg
mu4e~view-headers-buffer headersbuf)
@ -283,7 +282,8 @@ add text-properties to VAL."
(when mu4e-view-fill-headers
;; temporarily set the fill column <margin> positions to the right, so
;; we can indent the following lines correctly
(let*((margin 1) (fill-column (- fill-column margin)))
(let* ((margin 1)
(fill-column (max (- fill-column margin) 0)))
(fill-region (point-min) (point-max))
(goto-char (point-min))
(while (and (zerop (forward-line 1)) (not (looking-at "^$")))