Subject: Re: bug#63744: 28.2; fix dired-guess-default

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 May 2023 09:49:31 +0300

> From: Leo Liu <[email-masked]>
> Date: Sat, 27 May 2023 12:10:15 +0800
> 
> I have this customisation
> 
> (setq dired-guess-shell-alist-user '(("." EXP)))
> 
> where EXP evaluates to a list of strings. It has been working for ~10
> years until Emacs 28.

What is the semantics of a list of strings in this case?
shell-command takes a single string as its argument COMMAND, it
doesn't take a list of strings.

> After some digging it turns out there is a rewrite of
> `dired-guess-default' which is not compatible. Previously returning a
> list of strings from EXP accidentally worked.
> 
>   (eval (car cmds) `((file . ,file)))  ; single command
> 
> but if it evaluates to a list of strings it is perfectly fine as per the
> documentation of dired-guess-default. I propose the following patch for
> remedy.

I'd rather not proliferate an undocumented "feature" that is merely a
side effect of the particular implementation we had at some point,
without understanding what it gives us.  The alternative is for you to
change your customization so that EXP returns the car of the list it
returned before, and that should be both easy and backward-compatible,
AFAIU.