bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6202: Async shell command, switching mode, and sleep-for


From: Eli Zaretskii
Subject: bug#6202: Async shell command, switching mode, and sleep-for
Date: Thu, 07 Jul 2016 18:37:11 +0300

> 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 <address@hidden> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]