From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Starting multiple async processes from inside dired using & Date: Mon, 19 Oct 2009 08:52:31 +0900 Message-ID: <8763ac2rb4.fsf@catnip.gol.com> References: <87skdgd6fb.fsf@thinkpad.tsdh.de> <87skdgbfsm.fsf@stupidchicken.com> <873a5g4axm.fsf@mail.jurta.org> <8BB89959CC62432B9937AE58F3AA277A@us.oracle.com> <87oco449dm.fsf@stupidchicken.com> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255910017 27197 80.91.229.12 (18 Oct 2009 23:53:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2009 23:53:37 +0000 (UTC) Cc: 'Juri Linkov' , Drew Adams , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 01:53:27 2009 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 1MzfZ0-00034X-Ri for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2009 01:53:27 +0200 Original-Received: from localhost ([127.0.0.1]:52154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzfZ0-0005Kn-0j for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2009 19:53:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzfYJ-0004ZN-0c for emacs-devel@gnu.org; Sun, 18 Oct 2009 19:52:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzfYE-0004Ul-Cw for emacs-devel@gnu.org; Sun, 18 Oct 2009 19:52:42 -0400 Original-Received: from [199.232.76.173] (port=34438 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzfYE-0004Uc-7x for emacs-devel@gnu.org; Sun, 18 Oct 2009 19:52:38 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:43607) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MzfYB-0002a6-Tn; Sun, 18 Oct 2009 19:52:36 -0400 Original-Received: from 218.231.97.47.eo.eaccess.ne.jp ([218.231.97.47] helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku) id 1MzfY7-0001Gg-Tu; Mon, 19 Oct 2009 08:52:31 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 4F4C9DF2E; Mon, 19 Oct 2009 08:52:31 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: <87oco449dm.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 18 Oct 2009 18:36:53 -0400") Original-Lines: 36 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:116234 Archived-At: Chong Yidong writes: >>> It seems the best option is to search and revive an existing buffer, >>> but there is another problem: the user might want to keep the output >>> of an old *Async Shell Command* buffer and not overwrite it with >>> the output of another process. > > Emacs could retain the old output, concatenating the new output into it. That could be very confusing for someone who just wants "the output" tho... I think many async processes have no output tho, so maybe it's not a big deal... (actually the "no output" thing is one reason why Emacs' behavior WRT async process is so annoying -- Emacs seems to treat them as if output were expected and important) Maybe it could keep a list of previously created async output buffers, and reuse any which are empty (and whose associated process is dead). [E.g.: everytime a new async process is started append its buffer to a list. When looking for a new async buffer, search for the first entry in the list whose process is dead; if the buffer is empty, then reuse it, and delete it from the list (to be added again as a new entry), otherwise just delete it and keep searching.] Perhaps another issue, BTW is whether Emacs should kill asynch processes when exiting. For the most common uses I have, it _shouldn't_, and it's surprising and annoying when it does (I typically say "yes" to the "kill processes?" prompt because I'm thinking of only those synchronous processed I know about, so occasionally I end up inadvertently killing an async process that I didn't want to...] -Miles -- My books focus on timeless truths. -- Donald Knuth