From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6202: Async shell command, switching mode, and sleep-for Date: Thu, 07 Jul 2016 18:37:11 +0300 Message-ID: <834m81las8.fsf@gnu.org> References: <87eg76co55.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467905914 24884 80.91.229.3 (7 Jul 2016 15:38:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 15:38:34 +0000 (UTC) Cc: arnima@hafro.is, 6202@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 07 17:38:23 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLBNe-00082S-38 for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 17:38:22 +0200 Original-Received: from localhost ([::1]:40657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBNY-0001e2-Cy for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 11:38:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBNO-0001ds-Le for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:38:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLBNK-0002AF-IY for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:38:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBNK-0002A6-FH for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLBNK-0007zp-A1 for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 11:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jul 2016 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6202 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 6202-submit@debbugs.gnu.org id=B6202.146790585530703 (code B ref 6202); Thu, 07 Jul 2016 15:38:02 +0000 Original-Received: (at 6202) by debbugs.gnu.org; 7 Jul 2016 15:37:35 +0000 Original-Received: from localhost ([127.0.0.1]:41362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLBMt-0007z9-5M for submit@debbugs.gnu.org; Thu, 07 Jul 2016 11:37:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLBMr-0007yx-Aq for 6202@debbugs.gnu.org; Thu, 07 Jul 2016 11:37:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLBMi-0001yT-TR for 6202@debbugs.gnu.org; Thu, 07 Jul 2016 11:37:28 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBMi-0001yC-Q1; Thu, 07 Jul 2016 11:37:24 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1860 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bLBMg-0002CK-To; Thu, 07 Jul 2016 11:37:23 -0400 In-reply-to: <87eg76co55.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120571 Archived-At: > From: npostavs@users.sourceforge.net > Date: Wed, 06 Jul 2016 20:01:10 -0400 > Cc: 6202@debbugs.gnu.org > > I think this is not a bug, the foo command can be fixed by doing: > > (defun foo () > (interactive) > (shell-command "set &") > (with-current-buffer (get-buffer "*Async Shell Command*") > (comint-mode))) I agree. In general, programs that assume some specific timing immediately after an async subprocess is launched are fragile by definition, and prone to breakage due to changes in Emacs internals. > Arni Magnusson writes: > > > > I also stumbled upon a separate issue, where the above function (after > > uncommenting the `sleep-for' line) makes Emacs dutifully freeze for 3 > > seconds in Linux, but not in Windows. This bug/limitation is not > > mentioned on the help page for `sleep-for'. > > I noticed (sleep-for 3) did not pause in Windows with Emacs 24.5, but > did pause with 25.0.95, so it seems this problem has been fixed. Yes, see bug #20935. Thanks.