Link urls after running mu4e-view-mode
* mu4e/mu4e-view.el (mu4e-view): `mu4e~view-make-urls-clickable` should run after `mu4e-view-mode` otherwise an error popup telling the hash-table storing links is nil.
This commit is contained in:
@ -306,31 +306,32 @@ the the message view affects HDRSBUF, as does marking etc.
|
|||||||
As a side-effect, a message that is being viewed loses its 'unread'
|
As a side-effect, a message that is being viewed loses its 'unread'
|
||||||
marking if it still had that."
|
marking if it still had that."
|
||||||
(let* ((embedded ;; is it as an embedded msg (ie. message/rfc822 att)?
|
(let* ((embedded ;; is it as an embedded msg (ie. message/rfc822 att)?
|
||||||
(when (gethash (mu4e-message-field msg :path)
|
(when (gethash (mu4e-message-field msg :path)
|
||||||
mu4e~path-parent-docid-map) t))
|
mu4e~path-parent-docid-map) t))
|
||||||
(buf
|
(buf
|
||||||
(if embedded
|
(if embedded
|
||||||
(mu4e~view-embedded-winbuf)
|
(mu4e~view-embedded-winbuf)
|
||||||
(get-buffer-create mu4e~view-buffer-name))))
|
(get-buffer-create mu4e~view-buffer-name)))
|
||||||
|
(insert-it (or embedded (not (mu4e~view-mark-as-read-maybe msg)))))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(switch-to-buffer buf)
|
(switch-to-buffer buf)
|
||||||
;; When MSG is unread, mu4e~view-mark-as-read-maybe will trigger
|
;; When MSG is unread, mu4e~view-mark-as-read-maybe will trigger
|
||||||
;; another call to mu4e-view (via mu4e~headers-update-handler as
|
;; another call to mu4e-view (via mu4e~headers-update-handler as
|
||||||
;; the reply handler to mu4e~proc-move)
|
;; the reply handler to mu4e~proc-move)
|
||||||
(let ((inhibit-read-only t))
|
(let ((inhibit-read-only t))
|
||||||
(when (or embedded (not (mu4e~view-mark-as-read-maybe msg)))
|
(when insert-it
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(mu4e~delete-all-overlays)
|
(mu4e~delete-all-overlays)
|
||||||
(insert (mu4e-view-message-text msg))
|
(insert (mu4e-view-message-text msg))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(mu4e~fontify-cited)
|
(mu4e~fontify-cited)
|
||||||
(mu4e~fontify-signature)
|
(mu4e~fontify-signature)
|
||||||
(mu4e~view-make-urls-clickable)
|
|
||||||
(mu4e~view-show-images-maybe msg)
|
(mu4e~view-show-images-maybe msg)
|
||||||
(when embedded (local-set-key "q" 'kill-buffer-and-window)))
|
(when embedded (local-set-key "q" 'kill-buffer-and-window)))
|
||||||
(unless (eq major-mode 'mu4e-view-mode)
|
(unless (eq major-mode 'mu4e-view-mode)
|
||||||
(mu4e-view-mode))
|
(mu4e-view-mode))
|
||||||
(setq mu4e~view-msg msg)))))
|
(setq mu4e~view-msg msg)
|
||||||
|
(and insert-it (mu4e~view-make-urls-clickable))))))
|
||||||
|
|
||||||
(defun mu4e~view-get-property-from-event (prop)
|
(defun mu4e~view-get-property-from-event (prop)
|
||||||
"Get the property PROP at point, or the location of the mouse.
|
"Get the property PROP at point, or the location of the mouse.
|
||||||
|
|||||||
Reference in New Issue
Block a user