Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default? (dired-x.el)

From: Eli Zaretskii <[email-masked]>
Date: Fri, 08 Dec 2023 10:08:22 +0200

> From: Juri Linkov <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 08 Dec 2023 09:37:20 +0200
> 
> > Thanks.  However, to justify such significant changes in this
> > database, we need much more details: we need to know, for each guess
> > you want to disable or delete, when and on what platform(s) is or was
> > it true, when and why and on what platform(s) it stopped being true,
> > and what replacement(s) are available on modern platforms for those
> > commands that are no longer useful guesses.
> 
> Do you really think it's possible to get a list of all popular commands
> available on all platforms?

Maybe not all commands on all platforms, but at least we should
investigate those you are suggesting to remove.  Here's the list of
them:

  dvips
  xdvi
  play
  xine
  ogg123
  mpg123
  bitmap
  xloadimage
  display
  xpdf
  antiword
  strings

At least some of those I recognize: xdvi and dvips are from TeX Live;
xloadimage is probably from X, antiword is still available (I think),
and strings is part of GNU Binutils, so should be on any system that
can build programs.  So I'd like to understand better why we are
removing those.

> > And if the guesses you are removing are supposed to be guessed better
> > by XDG, then we should do that in a way that still supports systems
> > without XDG.
> 
> This is just a random list of arbitrary commands.
> And the problem is that dired doesn't check with 'executable-find'
> if any of them is really installed.

Well, then maybe Dired should indeed use executable-find?
Or maybe it's okay not to check, since (AFAIU) these are just
candidates to be suggested to the user?

> But OK, if you want 100% backward-compatibility,
> I will refactor out this list of obsolete commands
> into a separate variable used by default.
> Then a new value of existing option will allow omitting it.

See above: perhaps we should first discuss the principles that guide
you when you decide that some of these commands are "obsolete".

> Instead of this I'm addressing multiple complains.
> Here is just a few after a very quick search,
> I remember there were much more:
> 
> https://lists.gnu.org/archive/html/bug-gnu-emacs/2008-06/msg00202.html

This one seems to ask about adding a command not in the list.  And it
doesn't complain about xloadimage and display, it says the OP "didn't
like" them.

> https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-10/msg01952.html

This says two things:

  . some commands in the list are less capable then others
  . XDG can do the job better

To the first point, my response would be: put the better ones first in
the list, but leave the worse ones in the list for those users who
don't have the better alternatives.

To the second point, I repeat what I already wrote in my previous
message: we should also support systems without XDG.