From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: playing sounds from Emacs Date: Tue, 15 Aug 2017 12:29:14 +0200 Message-ID: <87pobxnmyt.fsf@jane> References: <86bmnjt34h.fsf@zoho.com> <86shgtrf9d.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1502793020 5449 195.159.176.226 (15 Aug 2017 10:30:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 15 Aug 2017 10:30:20 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50 Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 15 12:30:09 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhZ6n-0000Hi-Cx for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Aug 2017 12:30:01 +0200 Original-Received: from localhost ([::1]:51244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhZ6s-00072x-8q for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Aug 2017 06:30:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhZ6J-00071l-JW for help-gnu-emacs@gnu.org; Tue, 15 Aug 2017 06:29:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhZ6G-0008R7-UK for help-gnu-emacs@gnu.org; Tue, 15 Aug 2017 06:29:31 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:35227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhZ6G-0008PE-NM for help-gnu-emacs@gnu.org; Tue, 15 Aug 2017 06:29:28 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 23875E6330; Tue, 15 Aug 2017 12:29:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xjcHIzsHKugv; Tue, 15 Aug 2017 12:29:20 +0200 (CEST) Original-Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl [109.232.29.157]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 00796E62C2; Tue, 15 Aug 2017 12:29:19 +0200 (CEST) In-reply-to: <86shgtrf9d.fsf@zoho.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114039 Archived-At: On 2017-08-14, at 23:49, Emanuel Berg wrote: >> (shell-command "omx-play-sound ~/bo/up.mp3") > > To use `shell-command' like that means > everything halts until the command has been > executed, which we can't have, but simply > putting an "&" after - to make it > "asynchronous" which is a nice way of saying > the command will be executed in yet another > shell, a subshell - that won't work. I get ugly > output in buffer "*Async Shell Command*". > and an error message: > > exited abnormally with code 1. > > Perhaps some shell color codes are, well, > "async"! (So yes, in principle it should work.) Dunno about the non-zero exit code, but did you see this: http://mbork.pl/2016-04-07_Hiding_those_annoying_Async_Shell_Command_buffers ? Also - for the record - this: http://mbork.pl/2016-04-12_Showing_some_of_those_Async_Shell_Command_buffers and that: http://git.savannah.gnu.org/cgit/emacs.git/commit/etc/NEWS?id=85512e752191091d38cd5e34e7bed80eac1e9013 And also, `call-process-shell-command' and `shell-command-to-string'. Hth, -- Marcin Borkowski