From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: & and M-& to run programs asynchronously Date: Mon, 25 Aug 2008 22:52:17 +0300 Organization: JURTA Message-ID: <878wulaxb2.fsf@jurta.org> References: <87hcbkpo0e.fsf@gmail.com> <86y74wzeq1.fsf@lola.quinscape.zz> <874p7ifonh.fsf@jurta.org> <873amryzdu.fsf_-_@gmail.com> <87sku9hdkr.fsf@gmail.com> <87mykh1hpi.fsf@jurta.org> <87prpba6qj.fsf@gmail.com> <87abgfun32.fsf@jurta.org> <7dbe73ed0807221250v510e83b7u75dd271846704abb@mail.gmail.com> <87tzehd0ll.fsf@jurta.org> <87hca868s8.fsf@gmail.com> <874p68iqgz.fsf@jurta.org> <87vdymywnm.fsf@stupidchicken.com> <87myjy5afw.fsf@jurta.org> <87wsif187e.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219694168 4828 80.91.229.12 (25 Aug 2008 19:56:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Aug 2008 19:56:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Clemente Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 25 21:57:00 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 1KXiAd-0000Is-Lv for ged-emacs-devel@m.gmane.org; Mon, 25 Aug 2008 21:56:12 +0200 Original-Received: from localhost ([127.0.0.1]:55000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXi9f-0007To-0b for ged-emacs-devel@m.gmane.org; Mon, 25 Aug 2008 15:55:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXi9G-0007JU-J1 for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXi9F-0007Is-Dr for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:46 -0400 Original-Received: from [199.232.76.173] (port=58968 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXi9F-0007In-8u for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:45 -0400 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]:53280) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KXi9E-0007VG-Fr for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:44 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1KXi99-0009Da-6r; Mon, 25 Aug 2008 22:54:39 +0300 In-Reply-To: <87wsif187e.fsf@gmail.com> (Daniel Clemente's message of "Mon, 18 Aug 2008 02:24:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: f7f1c38b0b2d7aeba17750d70212ab70 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 4900 [Aug 24 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) 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:102962 Archived-At: > I see that the new behaviour for & in dired was added. Could the documentation for ! (dired-do-shell-command) mention the way of executing a command in background? I think this is important because it is not obvious. > > I attach the proposed change; please improve the wording as needed.. > Thanks > > --- dired-aux.el 14 ago 2008 20:56:23 +0200 1.179 > +++ dired-aux.el 18 ago 2008 02:13:41 +0200 > @@ -551,6 +551,10 @@ > there's no telling what files COMMAND may have changed. > Type \\[dired-do-redisplay] to redisplay the marked files. > > +Emacs will block until the command ends. To execute the command > +in background, add `&' to the end of COMMAND, or use > +\\[dired-do-async-shell-command] instead. > + > When COMMAND runs, its working directory is the top-level directory of > the Dired buffer, so output files usually are created there instead of > in a subdir. There is no term "background" in the existing Emacs documentation, so it is better to use the term "asynchronously" like in the docstring of `shell-command': Index: lisp/dired-aux.el =================================================================== RCS file: /sources/emacs/emacs/lisp/dired-aux.el,v retrieving revision 1.179 diff -c -r1.179 dired-aux.el *** lisp/dired-aux.el 31 Jul 2008 17:17:35 -0000 1.179 --- lisp/dired-aux.el 25 Aug 2008 19:48:40 -0000 *************** *** 545,551 **** normally to the shell, but you must confirm first. To pass `*' by itself to the shell as a wildcard, type `*\"\"'. ! If COMMAND produces output, it goes to a separate buffer. This feature does not try to redisplay Dired buffers afterward, as there's no telling what files COMMAND may have changed. --- 548,558 ---- normally to the shell, but you must confirm first. To pass `*' by itself to the shell as a wildcard, type `*\"\"'. ! If COMMAND ends in ampersand, it is executed asynchronously ! and the output appears in the buffer `*Async Shell Command*' ! \(you can also use \\[dired-do-async-shell-command]). ! Otherwise, COMMAND is executed synchronously and the output ! appears in the buffer `*Shell Command Output*'. This feature does not try to redisplay Dired buffers afterward, as there's no telling what files COMMAND may have changed. -- Juri Linkov http://www.jurta.org/emacs/