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: Mon, 28 Jul 2014 19:26:07 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae94ee0197dab3e04ff450e14 X-Trace: ger.gmane.org 1406572035 3335 80.91.229.3 (28 Jul 2014 18:27:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jul 2014 18:27:15 +0000 (UTC) To: 18132@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 28 20:27:10 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 1XBpdc-0002mq-MF for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Jul 2014 20:27:08 +0200 Original-Received: from localhost ([::1]:41811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBpdc-0000mD-9x for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Jul 2014 14:27:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBpdX-0000m3-G0 for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 14:27:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBpdW-0004iZ-6r for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 14:27:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBpdW-0004iT-3t for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 14:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XBpdV-00027u-PA for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 14:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Jul 2014 18:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18132 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.14065719968137 (code B ref -1); Mon, 28 Jul 2014 18:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jul 2014 18:26:36 +0000 Original-Received: from localhost ([127.0.0.1]:41229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBpd2-000272-9l for submit@debbugs.gnu.org; Mon, 28 Jul 2014 14:26:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44233) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBpcv-00026Z-9P for submit@debbugs.gnu.org; Mon, 28 Jul 2014 14:26:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBpcp-0004JA-1E for submit@debbugs.gnu.org; Mon, 28 Jul 2014 14:26:19 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBpco-0004J6-Ue for submit@debbugs.gnu.org; Mon, 28 Jul 2014 14:26:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBpcn-0000kU-Ph for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 14:26:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBpcm-0004Ie-N8 for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 14:26:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBpcm-0004IZ-KX for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 14:26:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41869) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1XBpcm-0005eE-9F for bug-emacs@gnu.org; Mon, 28 Jul 2014 14:26:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBpcj-0004I4-AJ for bug-emacs@gnu.org; Mon, 28 Jul 2014 14:26:16 -0400 Original-Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:53156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBpcj-0004Hd-0B for bug-emacs@gnu.org; Mon, 28 Jul 2014 14:26:13 -0400 Original-Received: by mail-lb0-f169.google.com with SMTP id s7so6201007lbd.28 for ; Mon, 28 Jul 2014 11:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=pFlc8bUlVfys9JrsbsW+wqKOHSqyHagMu83xxwDJ72k=; b=QpG0CVOK9ZUYY/yiMcD4mYmtfaBbSo/LazT0z5GGj0aK4809NHRtcGW+L08QS/f6Bi 3TuYGVUJ9hVS6p6yrB1tBpyb2Svi2eCTHoWSQd2nISc5esUv2CWp1vbVQdQ8mujL8rp4 NPQO7gYWWBEtPnUk+hF/PUm+wbkFFtc4twxhA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=pFlc8bUlVfys9JrsbsW+wqKOHSqyHagMu83xxwDJ72k=; b=OfjoOtkSN3QFLZAXMYk0hYaC2Cj1i6jt6ijQMMvF+H/Sq4WjQEMiJYDGgm61rhKthP NnAf3HdxEFcXW7Q9GjBdv+xU8voG7yVGA62wTA18kwkUBL6VbhxrZO9EbkknV866TDGO p/UjyGAavDAHnrwq8FxLhuuhYfDaAa3iWtI8a1ctmHLDvVUigYajxMtK3tD8mW01GhpM cFepkdivGpHgUeqOn8FZXmbxqrqTqT5CIFIcY55OIee6pR8RRukWkLtfSrGK3KMqyYaN +eLz7zRkY2mn9mS5ZgUAd7CDCHEo19WBkXDRaB4iaynXWhfwFqUUE+6NaPB9HCidlpUk ogjQ== X-Gm-Message-State: ALoCoQlsMtng9Y6+T/FIdkAwjVy8x5qnFhtrLk/HpbjcFj/VTd2/MBM758QZg7xRT4GU1SdSVeLe X-Received: by 10.112.2.167 with SMTP id 7mr4778614lbv.103.1406571967777; Mon, 28 Jul 2014 11:26:07 -0700 (PDT) Original-Received: by 10.152.163.4 with HTTP; Mon, 28 Jul 2014 11:26:07 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:91895 Archived-At: --14dae94ee0197dab3e04ff450e14 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 xdg-open on GNU systems; open on Mac OS X; start on MS Windows). xdg-open already works reasonably well: http://lists.gnu.org/archive/html/help-gnu-emacs/2012-01/msg00143.html (I have a fix for the "multiple files" problem, which I'll be sending to xdg-utils upstream when I can.) Hence it would seem sensible to have a new default for dired-guess-shell-alist-default, which matches any file and returns the appropriate command for the OS, probably doing some testing to see which commands are available on a GNU system ("xdg-open", "gvfs-open", "see"=E2= =80=A6). The user then only needs to understand and configure one command-launching system, and the coverage of different filetypes is much more comprehensive in most such systems than in dired-x.el. An advantage to Emacs is that this system could then be used elsewhere. For example, org-mode already has a similar, separate system, org-file-apps, which might benefit from building on dired-x, and only retaining its own configuration where it's desirable to open a file "internally" to org-mode. --=20 http://rrt.sc3d.org --14dae94ee0197dab3e04ff450e14 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
These days, there are mature programs for launching a= n arbitrary file with an appropriate viewer: run-mailcap (which is mature t= o the point of obsolescence) and xdg-open on GNU systems; open on Mac OS X;= start on MS Windows).

xdg-open already works reasonably well: http://lists.gnu.= org/archive/html/help-gnu-emacs/2012-01/msg00143.html

(I have a fix for the "multipl= e files" problem, which I'll be sending to xdg-utils upstream when= I can.)

Hence it would seem sensible to have a new defau= lt for dired-guess-shell-alist-default, which matches any file and returns = the appropriate command for the OS, probably doing some testing to see whic= h commands are available on a GNU system ("xdg-open", "gvfs-= open", "see"=E2=80=A6).

The user then only needs to understand and configure one com= mand-launching system, and the coverage of different filetypes is much more= comprehensive in most such systems than in dired-x.el.

An advantage to Emacs is that this system could then be used elsewhere. For= example, org-mode already has a similar, separate system, org-file-apps, w= hich might benefit from building on dired-x, and only retaining its own con= figuration where it's desirable to open a file "internally" t= o org-mode.
--14dae94ee0197dab3e04ff450e14--