>> >> > Then its possible options for such hook could include: >> >> > >> >> > - xdg-open-function >> >> > - mailcap-function that adds mailcap candidates >> >> > - dired-x-guess that adds existing dired-guess-shell-alist-default >> >> > - Windows-specific candidates from w32-shell-execute >> >> > - etc. >> >> >> >> Here is the implementation: >> > >> > Thanks, but please don't put this stuff in simple.el. There's no >> > reason to have this preloaded in Emacs. >> >> I can't find other place to put these 50 lines. I added to simple.el >> near read-shell-command because it's used by read-shell-command. > > IMO, read-shell-command should not by default call these helpers. It doesn't call them by default. > If we cannot find a suitable non-preloaded file to put this stuff (is > subr-x.el okay, for example?), it's okay to start a new file. Ok, then let's add this to dired-aux.el since it's used in dired. >> Also shell-command-guess is used by dired-read-shell-command >> ('!' and '&' on a file in dired). > > Likewise here: users should by default be able to invoke these Dired > commands without automatically loading those helpers, which come with > quite tangible ballast. For Dired, this is perhaps less important, > since Dired itself is an optional package, but still: I think it's > wrong to do this by default. Ok, I removed mailcap and xdg from defaults: