emacs-devel
[Top][All Lists]
Advanced

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

Re: [Small change] Issue with dired-do-async-shell-command and certain s


From: Lycomedes 1814
Subject: Re: [Small change] Issue with dired-do-async-shell-command and certain shells
Date: Fri, 19 May 2023 19:15:43 +0200

It's needed for multiple files selected (without the * to pass them all as args to one instance of the command), to avoid the following:
Playing: dired-aux.el.gz&mpv
[file] Cannot open file 'dired-aux.el.gz&mpv': No such file or directory
Failed to open dired-aux.el.gz&mpv.
 
Playing: dired.elc&mpv
[file] Cannot open file 'dired.elc&mpv': No such file or directory
Failed to open dired.elc&mpv.
 
Playing: dired.el.gz&wait
[file] Cannot open file 'dired.el.gz&wait': No such file or directory
Failed to open dired.el.gz&wait.
When only the "&wait" is changed, this happens:
Playing: dired-aux.el.gz&mpv
[file] Cannot open file 'dired-aux.el.gz&mpv': No such file or directory
Failed to open dired-aux.el.gz&mpv.
 
Playing: dired.elc&mpv
[file] Cannot open file 'dired.elc&mpv': No such file or directory
Failed to open dired.elc&mpv.
 
Playing: dired.el.gz
It does seem to be the first "&" that makes the difference.  I'm on Arch Linux using GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03.
 
 
19.05.2023, 17:51, "Eli Zaretskii" <eliz@gnu.org>:
 From: Lycomedes 1814 <lycomedes1814@yandex.com>
 Cc: "emacs-devel@gnu.org" <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?


reply via email to

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