From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: 18096@debbugs.gnu.org
Subject: bug#18096: 24.3.92; async shell command and a busy buffer leads to error
Date: Thu, 24 Jul 2014 14:13:06 +0200 [thread overview]
Message-ID: <87bnsf6jl9.fsf@geodiff-mac3.ulb.ac.be> (raw)
Running the following and answering "yes" to the prompt leads to an error:
(let ((b (get-buffer-create "Some command")))
(shell-command "sleep 1 &" b)
(shell-command ":&" b))
Debugger entered--Lisp error: (wrong-type-argument stringp #<buffer Some command>)
generate-new-buffer-name(#<buffer Some command>)
generate-new-buffer(#<buffer Some command>)
(setq buffer (generate-new-buffer (or output-buffer "*Async Shell Command*")))
[hand-edited]
shell-command(":&" #<buffer Some command>)
I suggest the following in order to have a better error message :
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2904,7 +2904,8 @@ the use of a shell (with its need to quote arguments)."
(error "Shell command in progress")))
((eq async-shell-command-buffer 'confirm-new-buffer)
;; If will create a new buffer, query first.
- (if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ")
+ (if (and (stringp output-buffer)
+ (yes-or-no-p "A command is running in the default buffer. Use a new buffer? "))
(setq buffer (generate-new-buffer
(or output-buffer "*Async Shell Command*")))
(error "Shell command in progress")))
--
Nico.
next reply other threads:[~2014-07-24 12:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 12:13 Nicolas Richard [this message]
2014-07-27 23:53 ` bug#18096: 24.3.92; async shell command and a busy buffer leads to error Juri Linkov
2014-11-09 6:57 ` Nicolas Richard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bnsf6jl9.fsf@geodiff-mac3.ulb.ac.be \
--to=theonewiththeevillook@yahoo.fr \
--cc=18096@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.