GNU bug report logs - #63744
28.2; fix dired-guess-default

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sat, 27 May 2023 04:11:01 UTC

Severity: normal

Tags: patch

Found in version 28.2

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 63744 <at> debbugs.gnu.org
Subject: bug#63744: 28.2; fix dired-guess-default
Date: Sat, 27 May 2023 09:49:31 +0300
> From: Leo Liu <sdl.web <at> gmail.com>
> 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.




This bug report was last modified 1 year and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.