1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

* lisp/ibuf-ext.el (ibuffer-do-shell-command-file):

Fix non-file-visiting-buffer case.  (Bug#22678)

(cherry picked from commit 738738259b)
This commit is contained in:
Tino Calancha 2016-06-07 19:24:51 -04:00 committed by Glenn Morris
parent cf3c19b029
commit b0c447e466

View File

@ -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)