* mu4e-view.el: make the open-in-emacs attachment temp files read-only

This commit is contained in:
djcb 2012-04-18 07:41:37 +03:00
parent 8ee4b4436d
commit 9e58ff96ed
1 changed files with 5 additions and 1 deletions

View File

@ -700,7 +700,11 @@ attachments) in response to a (mu4e-proc-extract 'temp ... )."
(call-process-shell-command param path t t)
(view-mode)))
((string= what "emacs")
(find-file path))
(find-file path)
;; make the buffer read-only since it usually does not make
;; sense to edit the temp buffer; use C-x C-q if you insist...
(setq buffer-read-only t)
)
(t (error "Unsupported action %S" what))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;