[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18326: 24.4.50; allow-no-window for async-shell-command in temp buff
From: |
Joe Corneli |
Subject: |
bug#18326: 24.4.50; allow-no-window for async-shell-command in temp buffer |
Date: |
Thu, 28 Aug 2014 07:42:38 +0100 |
Glenn Morris writes:
> The example from http://debbugs.gnu.org/13594#185 works for me.
>
> (add-to-list 'display-buffer-alist '("\\*Async Shell Command\\*"
> display-buffer-no-window (nil)))
Using that snippet, I'm still seeing a window pop up containing the
contents of /etc/shadow when I run:
emacs -Q -l start-up.el
M-x sudo-test RET
<password> RET
where start-up.el contains the following code:
(add-to-list 'display-buffer-alist '("\\*Async Shell Command\\*"
display-buffer-no-window (nil)))
(defun sudo-shell-command (command)
(interactive "MShell command (root): ")
(with-temp-buffer
(cd "/sudo::/")
(async-shell-command command)))
(defun sudo-test ()
(interactive)
(sudo-shell-command "cat /etc/shadow"))