From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#18132: Time for a smarter dired-guess-shell-alist-default? (dired-x.el) Date: Wed, 30 Jul 2014 10:12:40 +0100 Message-ID: References: <87d2cn67zo.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c35704e0bead04ff658ef6 X-Trace: ger.gmane.org 1406711603 30149 80.91.229.3 (30 Jul 2014 09:13:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2014 09:13:23 +0000 (UTC) Cc: 18132@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 30 11:13:17 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XCPwj-0008KI-8w for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Jul 2014 11:13:17 +0200 Original-Received: from localhost ([::1]:49827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCPwi-0004ki-Gp for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Jul 2014 05:13:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCPwZ-0004dY-BB for bug-gnu-emacs@gnu.org; Wed, 30 Jul 2014 05:13:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCPwU-0008EH-Th for bug-gnu-emacs@gnu.org; Wed, 30 Jul 2014 05:13:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCPwU-0008ED-P8 for bug-gnu-emacs@gnu.org; Wed, 30 Jul 2014 05:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XCPwU-0007X2-8W for bug-gnu-emacs@gnu.org; Wed, 30 Jul 2014 05:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jul 2014 09:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18132 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18132-submit@debbugs.gnu.org id=B18132.140671157028930 (code B ref 18132); Wed, 30 Jul 2014 09:13:02 +0000 Original-Received: (at 18132) by debbugs.gnu.org; 30 Jul 2014 09:12:50 +0000 Original-Received: from localhost ([127.0.0.1]:42551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCPwH-0007WX-7C for submit@debbugs.gnu.org; Wed, 30 Jul 2014 05:12:49 -0400 Original-Received: from mail-lb0-f171.google.com ([209.85.217.171]:33698) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCPwF-0007WJ-15 for 18132@debbugs.gnu.org; Wed, 30 Jul 2014 05:12:48 -0400 Original-Received: by mail-lb0-f171.google.com with SMTP id l4so659065lbv.30 for <18132@debbugs.gnu.org>; Wed, 30 Jul 2014 02:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OU+VvUr9qT/K6fkF/7DKP9pFXTlcpGxtVsyCK8JuChQ=; b=23lIJoJKN6kqa6o2jGm2vNFbYls0dYksV0mfuZ+5HH8SOvjAvXMUIamKmQJ+xSnCXO kdMKeXhwM7JqpJ6lE495f6qI8POWmBSoagQC/jIF0DEXHz2Ei8yV4SXMpQYjniewmIDG I5CPvzcTNqtQK/gx1/0aJfWZbiAU5ql1bSknY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=OU+VvUr9qT/K6fkF/7DKP9pFXTlcpGxtVsyCK8JuChQ=; b=XmDMkFzuGsfSgkiXeBsQvvUo4/2PblESSytjRzEumeBpJeYHzj7KGqRAr6PlTbCUKH +3ZDbQUEZ0qkKG6cTMAlwhfKskxhAA5vqoh65aqHuYImcRelQ6nu4LhsTs9XoZ7+Zkj9 9AcGtsTKyz4SB3v8azULTkeTUrKKqHq31NPwKjsjES00W2Eu21QjSzliiZgkwW4gYMjn GXmMU9bgI4kqs/YhyKlR51pzHziTUEsrN6bxI0+uwncBiQNG1+HkvHqNiKg2mXLumIO/ v4q6uSIFR1inxPLqej0N/90Ufzz0IZ3U+03CF8q64z9kUs5hCypV1rbmbM56Qd+dtmCQ piig== X-Gm-Message-State: ALoCoQlHSFz4gI5Ff96a4puQaZwHJyEbo8al/RbTpoT0yPwKgKmWVR1T8ugKSBDm+WMq1F+mfNQu X-Received: by 10.152.43.34 with SMTP id t2mr3013626lal.28.1406711560710; Wed, 30 Jul 2014 02:12:40 -0700 (PDT) Original-Received: by 10.152.163.4 with HTTP; Wed, 30 Jul 2014 02:12:40 -0700 (PDT) In-Reply-To: <87d2cn67zo.fsf@mail.jurta.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91965 Archived-At: --001a11c35704e0bead04ff658ef6 Content-Type: text/plain; charset=UTF-8 On 30 July 2014 00:49, Juri Linkov wrote: > > These days, there are mature programs for launching an arbitrary file > with > > an appropriate viewer: run-mailcap (which is mature to the point of > > obsolescence) and > > 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? > > xdg-open on GNU systems; open on Mac OS X; start on MS Windows). > > xdg-open is a single command that is too easy to add to the top of this > list. > Did you mean "easy too"? So, yes, both of these commands can be added. My original point is that they're not currently used; instead there is a custom list that has to be configured separately by the user from either of these. Hence, I suggest using these commands (and similarly "open" on Mac OS, and, as per Eli's suggestion, w32-shell-execute on Windows) instead of the current contents of dired-guess-shell-alist-default. Since each of these commands tackles all file types, it would seem simplest to add a new function shell-execute, modelled on w32-shell-execute, and have dired-read-shell-command use that instead of dired-guess-shell-command, which could then become an option that shell-execute can be configured to use, for those who are used to it. -- http://rrt.sc3d.org --001a11c35704e0bead04ff658ef6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 3= 0 July 2014 00:49, Juri Linkov <juri@jurta.org> wrote:
> These days, there are mature programs for launching an arbitrary file = with
> an appropriate viewer: run-mailcap (which is mature to the point of > obsolescence) and

run-mailcap is fully supported by shell-command and async-shell-command whe= re
the list of available commands can be accessed using M-n in its minibuffer.=

I can't see any mention of run-mai= lcap in the Emacs source; do you mean simply that it's possible to add = it to the list of commands used?
=C2=A0
> xdg-open on GNU systems; open on Mac OS X; start on MS Windows).

xdg-open is a single command that is too easy to add to the top of this lis= t.

Did you mean "= easy too"?

So, yes, both of th= ese commands can be added.

My original point is that they're not= currently used; instead there is a custom list that has to be configured s= eparately by the user from either of these.

Hence, I suggest using these commands (and similarly "open" o= n Mac OS, and, as per Eli's suggestion, w32-shell-execute on Windows) i= nstead of the current contents of dired-guess-shell-alist-default.

Since each of these commands tackles all f= ile types, it would seem simplest to add a new function shell-execute, mode= lled on w32-shell-execute, and have dired-read-shell-command use that inste= ad of dired-guess-shell-command, which could then become an option that she= ll-execute can be configured to use, for those who are used to it.
--001a11c35704e0bead04ff658ef6--