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

From: Juri Linkov <[email-masked]>
Date: Fri, 24 May 2024 20:56:05 +0300

close 18132 30.0.50
thanks

>> >> >> > What about optionally letting the system facilities present the menu
>> >> >> > of appropriate commands and let the user select from that menu?
>> >> >>
>> >> >> This is already implemented by the context menu in Dired.
>> >> >> I've checked that the contents of this context menu is exactly
>> >> >> the same as on the default OS file manager since both use XDG.
>> >> >
>> >> > Can you tell me how to try that starting from "emacs -Q"?
>> >>
>> >> You can move to e.g. a PDF file in a Dired buffer and click the right button.
>> >
>> > Thanks, I added a w32-shell-execute item to that menu.
>>
>> But w32-shell-execute is supposed to be in 'dired-do-open'
>> that corresponds to "Open" in the context menu.
>
> "Open" corresponds to w32-shell-execute call with 1st argument "open",
> not "openas" (which is what I added).  And AFAICT, dired-do-open does
> exactly that, so we are okay, I think.
>
>> BTW, it would be nice to have a keybinding for 'dired-do-open'.
>> For example, the big "E" (mnemonics "External") is free
>> in 'dired-mode-map'.
>
> Fine by me.

So now pushed 'dired-guess-shell-alist-optional',
the 'E' keybinding and the item in the Dired menu,
and closed.