From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Small change] Issue with dired-do-async-shell-command and certain shells Date: Fri, 19 May 2023 18:51:59 +0300 Message-ID: <83fs7stj34.fsf@gnu.org> References: <5571181684433204@mail.yandex.com> <837ct5v5y7.fsf@gnu.org> <524171684444342@mail.yandex.com> <528571684452080@mail.yandex.com> <83ttw8u93s.fsf@gnu.org> <764021684507963@mail.yandex.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13812"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lycomedes 1814 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 19 17:52:30 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q02P6-0003N9-Ih for ged-emacs-devel@m.gmane-mx.org; Fri, 19 May 2023 17:52:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q02OQ-00086j-Uc; Fri, 19 May 2023 11:51:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q02OO-00086M-Rg for emacs-devel@gnu.org; Fri, 19 May 2023 11:51:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q02OO-00029x-CA; Fri, 19 May 2023 11:51:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KZghgDQUUWuqx0xlj9cFSA630MIqzkOl2EOvq+unsj4=; b=W6sAiXUQZof5 i6HQPz4FgO/OEhA9ovQDYuwEF9D34DCFioL9SwOV7YDyWesUxrleKePXnxC9cx6q90/L6MdamKIqP Xv0n31vsNQ35XT2IlV4goO1xlWemfDxfj2+DPp+q2cdVOkxiUJFttsoNHQuh1PMmEYtZD+fi9w1fy L5yoUws1jAVvXOsYOCEmTxpIe/JFlwPcu3OxgFS7REqeE2aST6AEykcVhmWiOKpJm9Epd9vnycpXe MRzIK2T0GO+hxAiV+vSQsY9WheoW1zUi6iGhbg7KxKpSh/d47yCLEyXMC06g+YsFxEbVU0qFmrX2Z pfeYprmx+lew1bFZI/LCpQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q02ON-0004sJ-SJ; Fri, 19 May 2023 11:51:44 -0400 In-Reply-To: <764021684507963@mail.yandex.com> (message from Lycomedes 1814 on Fri, 19 May 2023 16:54:44 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306211 Archived-At: > From: Lycomedes 1814 > Cc: "emacs-devel@gnu.org" > Date: Fri, 19 May 2023 16:54:44 +0200 > > Sure, here's a diff: Thanks. > diff -u /home/jal/Code/emacs-patch/dired-aux.el /home/jal/Code/emacs-patch/dired-aux-new.el > --- /home/jal/Code/emacs-patch/dired-aux.el 2023-05-19 14:45:53.360586128 +0000 > +++ /home/jal/Code/emacs-patch/dired-aux-new.el 2023-05-19 14:46:39.880476896 +0000 > @@ -945,7 +945,7 @@ > ;; "&" instead. > (cmd-sep (if (and (or (not w32-shell) file-remote) > (not parallel-in-background)) > - ";" "&")) > + ";" "& ")) Here "&" is used only on MS-Windows, where I don't expect to see fish as the shell. Are you sure this is relevant to the problem? > @@ -969,7 +969,7 @@ > ;; Add 'wait' to force those POSIX shells to wait until > ;; all commands finish. > (or (and parallel-in-background (not w32-shell) > - "&wait") > + "& wait") This is the one we've been talking about from the beginning. > @@ -977,7 +977,7 @@ > (when (cdr file-list) > (setq files (concat dired-mark-prefix files dired-mark-postfix))) > (funcall stuff-it files)))) > - (or (and in-background "&") "")))) > + (or (and in-background "& ") "")))) This AFAIU is just appended to the end of the command, with nothing after it. Are you sure this one is needed? If so, can you describe a reproduction recipe where "&" here causes a problem and "& " doesn't?