emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 b0c447e 2/3: * lisp/ibuf-ext.el (ibuffer-do-shell


From: Glenn Morris
Subject: [Emacs-diffs] emacs-25 b0c447e 2/3: * lisp/ibuf-ext.el (ibuffer-do-shell-command-file):
Date: Mon, 17 Oct 2016 06:39:13 +0000 (UTC)

branch: emacs-25
commit b0c447e4668116cecfda91d0203cb7cac2486d92
Author: Tino Calancha <address@hidden>
Commit: Glenn Morris <address@hidden>

    * lisp/ibuf-ext.el (ibuffer-do-shell-command-file):
    Fix non-file-visiting-buffer case.  (Bug#22678)
    
    (cherry picked from commit 738738259ba77fe17e433c64e0758ea59ab5bc75)
---
 lisp/ibuf-ext.el |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index f537561..4443383 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]