From: Tino Calancha Date: Tue, 7 Jun 2016 23:24:51 +0000 (-0400) Subject: * lisp/ibuf-ext.el (ibuffer-do-shell-command-file): X-Git-Tag: emacs-26.0.90~1842^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=738738259ba77fe17e433c64e0758ea59ab5bc75;p=emacs.git * lisp/ibuf-ext.el (ibuffer-do-shell-command-file): Fix non-file-visiting-buffer case. (Bug#22678) --- diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 6052bf32ce3..0baab6b2f25 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)