* mu4e-view.el: fix open-with for files with spaces in their name

This commit is contained in:
djcb
2012-05-03 07:53:41 +03:00
parent 0eb205b1e6
commit cd281fc696

View File

@ -740,7 +740,7 @@ user for it."
"History list for the pipe argument.") "History list for the pipe argument.")
(defun mu4e-view-pipe-attachment (msg attachnum &optional pipecmd) (defun mu4e-view-pipe-attachment (msg attachnum &optional pipecmd)
"Feed MSG's attachment ATTACHNUM throught pipe PIPECMD; if "Feed MSG's attachment ATTACHNUM through pipe PIPECMD; if
PIPECMD is nil, ask user for it." PIPECMD is nil, ask user for it."
(interactive) (interactive)
(let* ((att (mu4e~view-get-attach msg attachnum)) (let* ((att (mu4e~view-get-attach msg attachnum))
@ -783,11 +783,11 @@ attachments) in response to a (mu4e~proc-extract 'temp ... )."
(cond (cond
((string= what "open-with") ((string= what "open-with")
;; 'param' will be the program to open-with ;; 'param' will be the program to open-with
(start-file-process-shell-command "*mu4e-open-with*" nil (start-process "*mu4e-open-with-proc*" "*mu4e-open-with*" param path))
(concat param " " path)))
((string= what "pipe") ((string= what "pipe")
;; 'param' will be the pipe command, path the infile for this ;; 'param' will be the pipe command, path the infile for this
(mu4e-process-file-through-pipe path param)) (mu4e-process-file-through-pipe path
(shell-quote-argument param)))
((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