diff options
author | Tino Calancha <f92capac@gmail.com> | 2016-06-07 19:24:51 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2016-10-16 23:36:24 -0700 |
commit | b0c447e4668116cecfda91d0203cb7cac2486d92 (patch) | |
tree | 018d8c956ef03c982113d4babbad86bce2e2546b /lisp/ibuf-ext.el | |
parent | cf3c19b0298236293d9c56d5ba425af4f42c1f8e (diff) | |
download | emacs-b0c447e4668116cecfda91d0203cb7cac2486d92.tar.gz emacs-b0c447e4668116cecfda91d0203cb7cac2486d92.tar.bz2 emacs-b0c447e4668116cecfda91d0203cb7cac2486d92.zip |
* lisp/ibuf-ext.el (ibuffer-do-shell-command-file):
Fix non-file-visiting-buffer case. (Bug#22678)
(cherry picked from commit 738738259ba77fe17e433c64e0758ea59ab5bc75)
Diffstat (limited to 'lisp/ibuf-ext.el')
-rw-r--r-- | lisp/ibuf-ext.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index f5375612c34..4443383cdf5 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -347,10 +347,14 @@ the mode if ARG is omitted or nil." :modifier-p nil) (shell-command (concat command " " (shell-quote-argument - (if buffer-file-name - buffer-file-name - (make-temp-file - (substring (buffer-name) 0 (min 10 (length (buffer-name)))))))))) + (or buffer-file-name + (let ((file + (make-temp-file + (substring + (buffer-name) 0 + (min 10 (length (buffer-name))))))) + (write-region nil nil file nil 0) + file)))))) ;;;###autoload (autoload 'ibuffer-do-eval "ibuf-ext") (define-ibuffer-op eval (form) |