GNU bug report logs - #18132
Time for a smarter dired-guess-shell-alist-default? (dired-x.el)

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Mon, 28 Jul 2014 18:27:01 UTC

Severity: wishlist

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 18132 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 18132 <at> debbugs.gnu.org
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
Date: Wed, 30 Jul 2014 17:44:13 +0100
[Message part 1 (text/plain, inline)]
On 30 July 2014 17:32, Juri Linkov <juri <at> jurta.org> wrote:

> >> run-mailcap is fully supported by shell-command and async-shell-command
> where
> >> the list of available commands can be accessed using M-n in its
> minibuffer.
> >
> > I can't see any mention of run-mailcap in the Emacs source; do you mean
> > simply that it's possible to add it to the list of commands used?
>
> grep -nH mailcap *.el
> ./dired-aux.el:558:(declare-function mailcap-file-default-commands
> "mailcap" (files))
> ./dired-aux.el:562:This function is used to add all related commands
> retrieved by `mailcap'
> ./dired-aux.el:565:  (let ((commands (and (boundp 'files) (require
> 'mailcap nil t)
> ./dired-aux.el:566:                    (mailcap-file-default-commands
> files))))
> ./simple.el:2743:(declare-function mailcap-file-default-commands "mailcap"
> (files))
> ./simple.el:2748:This function is used to add all related commands
> retrieved by `mailcap'
> ./simple.el:2754:        (commands (and filename (require 'mailcap nil t)
> ./simple.el:2755:                       (mailcap-file-default-commands
> (list filename)))))
>

I'm sorry if I've missed something, but I don't see what this has to do
with run-mailcap.


> We could leave the original list intact, and add xdg-open/w32-shell-execute
> to the top of the list, so it would be the first suggestion that the user
> will get after the first M-n.
>

It would be good to discourage customization of
dired-guess-shell-alist-{default,user}, and steer users towards the
non-program-specific mechanisms. It would also be good eventually not to
have to maintain the list, or indeed the dired-guess-shell mechanism at all.

As for your mention of "the first M-n", as far as I can discover, the first
time I press M-n, the default command, which was already mentioned in the
prompt, is simply inserted at point, as if I had typed it. So is "the first
suggestion that the user will get after the first M-n" actually the same
thing as "the default suggestion"? (I hope so!)


> There is a good example how to check its availability in
> `browse-url-can-use-xdg-open' that could be moved
> to a more general file like simple.el.
>

Thanks for the pointer.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

This bug report was last modified 363 days ago.

Previous Next


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