unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22678: 25.0.91; ibuffer-do-shell-command-file no output for non-visiting buffers
@ 2016-02-15 13:20 Tino Calancha
  2016-06-07 23:27 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Tino Calancha @ 2016-02-15 13:20 UTC (permalink / raw)
  To: 22678

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]


This function creates all temporary files empty which doesn't
seem the intended behaviour.

emacs -Q --eval="(mapc (lambda(x) (switch-to-buffer x) (insert x)) '(\"foo\" \"bar\"))" --eval='(ibuffer)'w
% n ^\(foo\|bar\)$ RET
! cat RET
g
C-x b *Shell Command Output*
;; empty buffer


In GNU Emacs 25.0.91.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.29)
Repository revision: 23ca48d3d867cfff9f49ef600e2aad7a26c7a870

[-- Attachment #2: Type: text/plain, Size: 815 bytes --]

diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index f537561..86f57f9 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -347,10 +347,10 @@ shell-command-file
    :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 (point-min) (point-max) file) file))))))
 
 ;;;###autoload (autoload 'ibuffer-do-eval "ibuf-ext")
 (define-ibuffer-op eval (form)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#22678: 25.0.91; ibuffer-do-shell-command-file no output for non-visiting buffers
  2016-02-15 13:20 bug#22678: 25.0.91; ibuffer-do-shell-command-file no output for non-visiting buffers Tino Calancha
@ 2016-06-07 23:27 ` Glenn Morris
  2016-10-17  7:48   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2016-06-07 23:27 UTC (permalink / raw)
  To: 22678-done

Version: 25.2

Thanks; applied.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#22678: 25.0.91; ibuffer-do-shell-command-file no output for non-visiting buffers
  2016-06-07 23:27 ` Glenn Morris
@ 2016-10-17  7:48   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2016-10-17  7:48 UTC (permalink / raw)
  To: 22678

> From: Glenn Morris <rgm@gnu.org>
> Date: Tue, 07 Jun 2016 19:27:57 -0400
>
> Version: 25.2
>
> Thanks; applied.

Any reasons why this was applied to the release branch?

Thanks.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-17  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 13:20 bug#22678: 25.0.91; ibuffer-do-shell-command-file no output for non-visiting buffers Tino Calancha
2016-06-07 23:27 ` Glenn Morris
2016-10-17  7:48   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).