From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Shell-command is no longer a shell Date: Tue, 29 Jan 2008 22:06:00 +0100 Message-ID: <87sl0gl4uf.fsf@gmx.de> References: <20080127040051.GA16241@Clio.twb.ath.cx> <87lk69acye.fsf@gmx.de> <20080129004351.GB10119@Clio.twb.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1201640530 22828 80.91.229.12 (29 Jan 2008 21:02:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2008 21:02:10 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, rfrancoise@debian.org To: "Trent W. Buck" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 29 22:02:27 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JJxb8-0006bM-PQ for ged-emacs-devel@m.gmane.org; Tue, 29 Jan 2008 22:02:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJxah-0006U5-Pb for ged-emacs-devel@m.gmane.org; Tue, 29 Jan 2008 16:01:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJxac-0006Tx-R7 for emacs-devel@gnu.org; Tue, 29 Jan 2008 16:01:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJxaX-0006RL-DJ for emacs-devel@gnu.org; Tue, 29 Jan 2008 16:01:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJxaX-0006RC-AM for emacs-devel@gnu.org; Tue, 29 Jan 2008 16:01:49 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJxaX-0003P8-4J for emacs-devel@gnu.org; Tue, 29 Jan 2008 16:01:49 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JJxaW-0000Ed-LD for emacs-pretest-bug@gnu.org; Tue, 29 Jan 2008 16:01:48 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JJxaT-0003OP-K8 for emacs-pretest-bug@gnu.org; Tue, 29 Jan 2008 16:01:48 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JJxaT-0003O8-33 for emacs-pretest-bug@gnu.org; Tue, 29 Jan 2008 16:01:45 -0500 Original-Received: (qmail invoked by alias); 29 Jan 2008 21:01:43 -0000 Original-Received: from p57A22549.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.37.73] by mail.gmx.net (mp009) with SMTP; 29 Jan 2008 22:01:43 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+LGlF6wlaLWpx1nsuQHeO7PdsXr3hAC2lEhpl4R1 Zca/YUKOJfnb83 In-Reply-To: <20080129004351.GB10119@Clio.twb.ath.cx> (Trent W. Buck's message of "Tue, 29 Jan 2008 11:43:53 +1100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87753 gmane.emacs.pretest.bugs:20806 Archived-At: --=-=-= "Trent W. Buck" writes: > I also tried M-! sh -c 'echo foo' & RET. I notice that unlike normal > shell-command, it creates a new *Async Shell Command* buffer each > time, and that this buffer does not popup (in a new window). You are a pretty good tester! Thanks a lot for this! The appended patch shall fix it. Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment *** /home/albinus/src/tramp/lisp/tramp.el.~2.626.~ 2008-01-28 22:10:50.000000000 +0100 --- /home/albinus/src/tramp/lisp/tramp.el 2008-01-29 21:35:59.000000000 +0100 *************** *** 3789,3795 **** ((bufferp output-buffer) output-buffer) ((stringp output-buffer) (get-buffer-create output-buffer)) (output-buffer (current-buffer)) ! (t (generate-new-buffer (if asynchronous "*Async Shell Command*" "*Shell Command Output*"))))) --- 3789,3795 ---- ((bufferp output-buffer) output-buffer) ((stringp output-buffer) (get-buffer-create output-buffer)) (output-buffer (current-buffer)) ! (t (get-buffer-create (if asynchronous "*Async Shell Command*" "*Shell Command Output*"))))) *************** *** 3801,3822 **** (if (and (not asynchronous) error-buffer) (with-parsed-tramp-file-name default-directory nil (list output-buffer (tramp-make-tramp-temp-file v))) ! output-buffer))) ! (prog1 ! ;; Run the process. ! (if (integerp asynchronous) (apply 'start-file-process "*Async Shell*" buffer args) ! (apply 'process-file (car args) nil buffer nil (cdr args))) ! ;; Insert error messages if they were separated. ! (when (listp buffer) ! (with-current-buffer error-buffer (insert-file-contents (cadr buffer))) ! (delete-file (cadr buffer))) ! ;; There's some output, display it. ! (when (with-current-buffer output-buffer (> (point-max) (point-min))) ! (if (functionp 'display-message-or-buffer) ! (funcall (symbol-function 'display-message-or-buffer) output-buffer) ! (pop-to-buffer output-buffer)))))) ;; File Editing. --- 3801,3842 ---- (if (and (not asynchronous) error-buffer) (with-parsed-tramp-file-name default-directory nil (list output-buffer (tramp-make-tramp-temp-file v))) ! output-buffer)) ! (proc (get-buffer-process output-buffer))) ! ;; Check whether there is another process running. Tramp does not ! ;; support 2 (asynchronous) processes in parallel. ! (when proc ! (if (yes-or-no-p "A command is running. Kill it? ") ! (ignore-errors (kill-process proc)) ! (error "Shell command in progress"))) ! ! (with-current-buffer output-buffer ! (setq buffer-read-only nil ! buffer-undo-list t) ! (erase-buffer)) ! ! (if (integerp asynchronous) ! (prog1 ! ;; Run the process. (apply 'start-file-process "*Async Shell*" buffer args) ! ;; Display output. ! (pop-to-buffer output-buffer)) ! ! (prog1 ! ;; Run the process. ! (apply 'process-file (car args) nil buffer nil (cdr args)) ! ;; Insert error messages if they were separated. ! (when (listp buffer) ! (with-current-buffer error-buffer ! (insert-file-contents (cadr buffer))) ! (delete-file (cadr buffer))) ! ;; There's some output, display it. ! (when (with-current-buffer output-buffer (> (point-max) (point-min))) ! (if (functionp 'display-message-or-buffer) ! (funcall (symbol-function 'display-message-or-buffer) ! output-buffer) ! (pop-to-buffer output-buffer))))))) ;; File Editing. --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--