Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d382f610
Commit
d382f610
authored
Mar 21, 1995
by
Richard M. Stallman
Browse files
(shell-command): Use *Async Shell Command* for
asynchronous commands. Doc fix.
parent
806cba9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lisp/simple.el
lisp/simple.el
+11
-2
No files found.
lisp/simple.el
View file @
d382f610
...
...
@@ -712,8 +712,17 @@ then call `undo-more' one or more times to undo them."
(defun shell-command (command &optional output-buffer)
"
Execute
string
COMMAND
in
inferior
shell
; display output, if any.
If
COMMAND
ends
in
ampersand,
execute
it
asynchronously.
The
output
appears
in
the
buffer
`
*Shell
Command*
'.
The
output
appears
in
the
buffer
`
*Async
Shell
Command*
'.
Otherwise,
COMMAND
is
executed
synchronously.
The
output
appears
in
the
buffer
`
*Shell
Command
Output*
'.
If
the
output
is
one
line,
it
is
displayed
in
the
echo
area
*as
well*,
but
it
is
nonetheless
available
in
buffer
`
*Shell
Command
Output*
',
even
though
that
buffer
is
not
automatically
displayed.
If
there
is
no
output,
or
if
output
is
inserted
in
the
current
buffer,
then
`
*Shell
Command
Output*
'
is
deleted.
The
optional
second
argument
OUTPUT-BUFFER,
if
non-nil,
says
to
put
the
output
in
some
other
buffer.
...
...
@@ -747,7 +756,7 @@ In either case, the output is inserted after point (leaving mark after it)."
(if (string-match "
[
\t]*&[
\t]*$
" command)
;; Command ending with ampersand means asynchronous.
(let ((buffer (get-buffer-create
(or output-buffer "
*Shell
-
Command*
")))
(or output-buffer "
*
Asynch
Shell
Command*
")))
(directory default-directory)
proc)
;; Remove the ampersand.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment