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
5d2ebd96
Commit
5d2ebd96
authored
Aug 13, 2008
by
Andreas Schwab
Browse files
(tramp-handle-shell-command): Correctly handle
output going to current buffer. Don't disable undo.
parent
c1043701
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/net/tramp.el
lisp/net/tramp.el
+9
-6
No files found.
lisp/ChangeLog
View file @
5d2ebd96
2008-08-13 Andreas Schwab <schwab@suse.de>
* net/tramp.el (tramp-handle-shell-command): Correctly handle
output going to current buffer. Don't disable undo.
2008-08-13 Glenn Morris <rgm@gnu.org>
* eshell/esh-cmd.el (eshell/which): Handle the case where no description
...
...
lisp/net/tramp.el
View file @
5d2ebd96
...
...
@@ -3846,11 +3846,14 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
;; We cannot use `shell-file-name' and `shell-command-switch',
;; they are variables of the local host.
(args (list "/bin/sh" "-c" (substring command 0 asynchronous)))
current-buffer-p
(output-buffer
(cond
((bufferp output-buffer) output-buffer)
((stringp output-buffer) (get-buffer-create output-buffer))
(output-buffer (current-buffer))
(output-buffer
(setq current-buffer-p t)
(current-buffer))
(t (get-buffer-create
(if asynchronous
"*Async Shell Command*"
...
...
@@ -3875,12 +3878,12 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
(error nil))
(error "Shell command in progress")))
(
with-
current-buffer
output-buffer
(
setq buffer-read-only nil
buffer-
undo-list t
)
(erase-buffer))
(
unless
current-buffer
-p
(
with-current-buffer output-buffer
(setq
buffer-
read-only nil
)
(erase-buffer))
)
(if (integerp asynchronous)
(if
(and (not current-buffer-p)
(integerp asynchronous)
)
(prog1
;; Run the process.
(apply 'start-file-process "*Async Shell*" buffer args)
...
...
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