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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Reuben Thomas <rrt@HIDDEN>; dated Mon, 28 Jul 2014 18:27:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 20:53:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 16:53:39 2021
Received: from localhost ([127.0.0.1]:37461 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meO1L-0007wn-7l
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 16:53:39 -0400
Received: from mail-pf1-f170.google.com ([209.85.210.170]:38786)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rrt@HIDDEN>) id 1meO1H-0007wY-7b
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 16:53:37 -0400
Received: by mail-pf1-f170.google.com with SMTP id k26so6818253pfi.5
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 13:53:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=mChTIT2+0PYhPUZEBBHJ3PRd+J4CN2XqpqUDnrPVog4=;
 b=pLcyV+w6v7GGLK62pkMTU6wknZzrrn3KyVlSOmsoa4mhNlZBltInTg//422m/7AMPb
 ojul332lDMYcJqpahlcNOgWAPr5rBRRuZPg8afV6yrbD4yQk6IpX9yoRSnh67iwAe9Qp
 xdqCm/0Z0rBqZUbzQuhSBXxyuW8akVzgRRAbE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=mChTIT2+0PYhPUZEBBHJ3PRd+J4CN2XqpqUDnrPVog4=;
 b=s8PsOzgcCP1fM0lGf8IPPAmKKanmmZUcLDeaaD18Pj7p49/f41ArXGYka+Z0P9aU2o
 xM9ZnDiUjxuSy5BKIqbr+o4662S7pASh4naRbhtwui8TuPS1eYJ2pdZ+ExW04ZteAlo3
 shAOzaRKbPE2AgvXu7q7YxVBAw/nyErNFk06eLOz9EZ8gthaZxOAY+1x8QuVDRICwSzJ
 pzO7Psb7F0Q0SOQnvnmQPazX/Iyg/ERqfQjpUbZzSmX75QcST+VT0QRy5m4mXxzns2Fb
 IXqAAipVM3/rrF4Ar81+ryAwUWSaGbsX/vn42M2HhW7UFGbvd33U6RwZIGurblljeDjj
 plrg==
X-Gm-Message-State: AOAM533JctNPRO6MelpuJU5Fu9o4P0E93m1p8mofnj3yFS7AS3yBJtjy
 RK0twroC0+8RHaOmo77lxtszP12XuyA+ZLkInKtqcw==
X-Google-Smtp-Source: ABdhPJxZgwybv8M1I8Lm/xIEPu+Z9aOps4WA5qtihrr/PfmjvjUpEdOEe166zd7GbCXHyrNfRCP3H23GGxvSHXyiDLc=
X-Received: by 2002:a63:2b85:: with SMTP id r127mr6199315pgr.215.1635022409025; 
 Sat, 23 Oct 2021 13:53:29 -0700 (PDT)
MIME-Version: 1.0
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
 <CAOnWdohzNADVbQrk-ZQvwWpcr4ewDtr-Hpvs-K5H+-TJfP-LGQ@HIDDEN>
 <CADwFkmkZMXdF5bdCBvgPKXz0WAEcMzdrWODF6hZCYEQYetp0GA@HIDDEN>
In-Reply-To: <CADwFkmkZMXdF5bdCBvgPKXz0WAEcMzdrWODF6hZCYEQYetp0GA@HIDDEN>
From: Reuben Thomas <rrt@HIDDEN>
Date: Sat, 23 Oct 2021 21:53:17 +0100
Message-ID: <CAOnWdog3bTNSVBEprKoFX8yGEWVxrdh+Vu5kCx6Ew=mgHsWrtQ@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000e3e39d05cf0b51a7"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 18132
Cc: Eli Zaretskii <eliz@HIDDEN>, 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000e3e39d05cf0b51a7
Content-Type: text/plain; charset="UTF-8"

On Sat, 23 Oct 2021 at 16:45, Stefan Kangas <stefan@HIDDEN> wrote:

>
> What I want is more or less the exact behavior of xdg-open, but I want
> to be able to check the actual command (e.g. "evince", not just
> "xdg-open") before pressing RET.
>

I don't understand why this is useful. If you want a particular command for
every file of a type, configure it; if you want a particular command this
time, specify it.

I also want to be able to override xdg-open with customizations inside
> Emacs.
>

This just adds complexity to the system.

Please bare with me as I'm trying to understand.
>

"bear" ;)

Is your preference still to just run "xdg-open", as you explained in
> your original bug report?


Yes.

Do you agree that if we could get my idea to work, you could have your
> cake and eat it too?


No, because I was hoping we could make the cake smaller.

  IOW, do you disagree with the approach because you
> think it is infeasible to make it work well, or because you don't think
> that the feature sounds useful?  Or do you merely disagree with using
> mailcap to implement it?
>

I agree with Eli that mailcap is not a good match; also it's widely
considered deprecated (for example, GNOME's mechanism doesn't use it), so
its configuration is likely to be out of date.

Mostly, I am afraid that a suggestion which satisfies everyone in terms of
functionality will simply pile on more features to Emacs, in an area which
is already too complicated. I don't see why launching external applications
can't be left to the operating environment, as all environments now have
mature systems for doing this. If someone such as you wants more complex
functionality, that can be served by a third-party package; it doesn't need
to be built in to Emacs.

-- 
https://rrt.sc3d.org

--000000000000e3e39d05cf0b51a7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Sat, 23 Oct 2021 at 16:45, Stefan Kangas &lt;<a href=3D"mailto:st=
efan@HIDDEN">stefan@HIDDEN</a>&gt; wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex"><br>
What I want is more or less the exact behavior of xdg-open, but I want<br>
to be able to check the actual command (e.g. &quot;evince&quot;, not just<b=
r>
&quot;xdg-open&quot;) before pressing RET.<br></blockquote><div><br></div><=
div><div style=3D"font-family:arial,helvetica,sans-serif;font-size:small" c=
lass=3D"gmail_default">I don&#39;t understand why this is useful. If you wa=
nt a particular command for every file of a type, configure it; if you want=
 a particular command this time, specify it.</div><br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex">

I also want to be able to override xdg-open with customizations inside<br>
Emacs.<br></blockquote><div><br></div><div><div style=3D"font-family:arial,=
helvetica,sans-serif;font-size:small" class=3D"gmail_default">This just add=
s complexity to the system.</div><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Please bare with me as I&#39;m trying to understand.<br></blockquote><div><=
br></div><div><div style=3D"font-family:arial,helvetica,sans-serif;font-siz=
e:small" class=3D"gmail_default">&quot;bear&quot; ;)</div><br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex">

Is your preference still to just run &quot;xdg-open&quot;, as you explained=
 in<br>
your original bug report?</blockquote><div><br></div><div><div style=3D"fon=
t-family:arial,helvetica,sans-serif;font-size:small" class=3D"gmail_default=
">Yes.</div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Do you agree that if we could get my idea to work, you could have your<br>
cake and eat it too?</blockquote><div><br></div><div><div style=3D"font-fam=
ily:arial,helvetica,sans-serif;font-size:small" class=3D"gmail_default">No,=
 because I was hoping we could make the cake smaller.</div><br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">=C2=A0 IOW, do you disagree with the approach beca=
use you<br>
think it is infeasible to make it work well, or because you don&#39;t think=
<br>
that the feature sounds useful?=C2=A0 Or do you merely disagree with using<=
br>
mailcap to implement it?<br></blockquote><div><br></div><div><div style=3D"=
font-family:arial,helvetica,sans-serif;font-size:small" class=3D"gmail_defa=
ult">I agree with Eli that mailcap is not a good match; also it&#39;s widel=
y considered deprecated (for example, GNOME&#39;s mechanism doesn&#39;t use=
 it), so its configuration is likely to be out of date.</div><div style=3D"=
font-family:arial,helvetica,sans-serif;font-size:small" class=3D"gmail_defa=
ult"><br></div><div style=3D"font-family:arial,helvetica,sans-serif;font-si=
ze:small" class=3D"gmail_default">Mostly, I am afraid that a suggestion whi=
ch satisfies everyone in terms of functionality will simply pile on more fe=
atures to Emacs, in an area which is already too complicated. I don&#39;t s=
ee why launching external applications can&#39;t be left to the operating e=
nvironment, as all environments now have mature systems for doing this. If =
someone such as you wants more complex functionality, that can be served by=
 a third-party package; it doesn&#39;t need to be built in to Emacs.<br></d=
iv></div><br clear=3D"all"></div>-- <br><div dir=3D"ltr" class=3D"gmail_sig=
nature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=
=3D"ltr"><a href=3D"https://rrt.sc3d.org" target=3D"_blank">https://rrt.sc3=
d.org</a></div></div></div></div></div>

--000000000000e3e39d05cf0b51a7--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 19:22:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 15:22:41 2021
Received: from localhost ([127.0.0.1]:37329 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meMbJ-0003Pd-BL
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 15:22:41 -0400
Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:11374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1meMbG-0003PT-6T
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 15:22:39 -0400
Received: from pps.filterd (m0246627.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19NJ7kD8018739; 
 Sat, 23 Oct 2021 19:22:37 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2021-07-09;
 bh=cthFcXpppPKCBuIPuk531b5EqFtdilxpTDFT8i+tIlk=;
 b=sRPgDvt/SO1Ms/MJkKK381tFtHb6+5t9NzVq7jNnxjgY89hhxYkU8FdYt+PRrdKo3eR/
 vxLnM8OvSWpd3IxuypNUq7rTACxB7aNmFy2lcyPmldF2UV9GSORxILPImA2bLYaQZQlS
 m49A3swWb4M+YgfpoJsYsrP4R2plQ9lUJiaV/WzPpyuoS0LAR/DrPMh22Jjmg5yDl5lo
 cy57n9W7bXh0JD41YMk99R8JFtOICTpIR4L5tqbA+hF3gBG3O2asn489qYBcgREE6Eui
 bKsDYWTm8rxhBKJczYS4waR3iwnYHPgJFc3ZR87XpQEpBDIHNIcjh6fljGjZWgpHc5fK 5w== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by mx0b-00069f02.pphosted.com with ESMTP id 3bv9019xr4-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sat, 23 Oct 2021 19:22:36 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19NJH5KV130760;
 Sat, 23 Oct 2021 19:22:35 GMT
Received: from nam11-co1-obe.outbound.protection.outlook.com
 (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168])
 by aserp3030.oracle.com with ESMTP id 3bv8ebdsyy-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sat, 23 Oct 2021 19:22:35 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=gBKl7Lv9q+8NGRdltqrcYD5erDk9pDNdduizwwdV1VLHbbgJO/mLlwpDUZKwMYK76r//XRtE/oZVYP/4oU6YM5cUj6w/KQ6oQcKR5O+BqWmUS4jG7ylVPOxGKbr8q75VuK1mC0MeYG1+xMQscq9tuqOrKr782MOreQzgtbUApnHmrY0kUnyFohu9pRQ8CM2jUFgAJxPQmo5PggYW1kXZX0hEUEaxEgYKJIVtpYLUbpa9UcTk88f4h4NkNab8KogiqJ56LYBItFH2AP8dWL3qatHCU2NwvuAqMRaw0fbFSVooL9pFE4jWum7NHZzuwPZOsujcvAr04rKf1/68fu/Z1g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=cthFcXpppPKCBuIPuk531b5EqFtdilxpTDFT8i+tIlk=;
 b=BJalUkrTiGZFMcMpfXeAZ2Ud0xEsuub+sXlIBZJJZJ1f0mxb3xY2CLdVIjs2Cly7ZmiE3nr002VJ0hoB/+8trv4BCuUgTw2aDRr6u3wNi5cLZ0GLVrS4fWKEILeBZYXbUILZTzqJ9MTxjcP++Cgsm/AdaCMtpvt74mD+KuETVxdmgdm3ZQ43Izff7QLkhIpt+zVipucdYVo8ITE/ruOySo9JX19bj8xeCioQCHvfySB1Zlm7fxNi1g/BkO34cJis6dS6pcyseYolAn9bOR590p8tmJ2p/f99cFEpVkon/xGdYYHZcaoj9M9qBanDszPuJSXMndwglsiwgK//1IPA7A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=cthFcXpppPKCBuIPuk531b5EqFtdilxpTDFT8i+tIlk=;
 b=FhuCSMyR32IuZX4t/mNnYg/pipd/jHdvomWKtGmmw/rYtivIY2s+gm2D5VTR3CGH3tz7fpl56itlu5e8yGahZSkkxTVcfA2vyS+RCvg+mWHBnQz3bMQSzD8rzmdALWIA4kM1cqNo7GMqeW195BAVWY+DF0BQrO5GSUWrexnu4gM=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by BYAPR10MB3032.namprd10.prod.outlook.com (2603:10b6:a03:82::15)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Sat, 23 Oct
 2021 19:22:33 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82%8]) with mapi id 15.20.4628.020; Sat, 23 Oct 2021
 19:22:33 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Howard Melman <hmelman@HIDDEN>
Subject: RE: [External] : bug#18132: Time for a smarter
 dired-guess-shell-alist-default? (dired-x.el)
Thread-Topic: [External] : bug#18132: Time for a smarter
 dired-guess-shell-alist-default? (dired-x.el)
Thread-Index: AQHXyD4lOIpRMSpRPEmShgChgQwEK6vg8wUw
Date: Sat, 23 Oct 2021 19:22:33 +0000
Message-ID: <SJ0PR10MB5488E976659A2B15E4F920A1F3819@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
 <lyv91neia0.fsf@HIDDEN> <87sfwr8utt.fsf@HIDDEN>
In-Reply-To: <87sfwr8utt.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: linkov.net; dkim=none (message not signed)
 header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: eafde9a7-019d-4be7-55e9-08d9965a76eb
x-ms-traffictypediagnostic: BYAPR10MB3032:
x-microsoft-antispam-prvs: <BYAPR10MB3032895999B3A3496C76EE82F3819@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:6430;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: xn7cs+RYzxzxnACUxAWa2PaDwuyX0DVfdqcIhg6xVMZUCp8GCnXMgkA6mj7FejxoPe+z7+22DzQUBbpfRM9xdr27sRi4RnQUmnW9wrFgu1rjYyd5gxHnjWz12xxC8gHGxYJQnF53Bp5Y1qPm1Gz8kMxDKveEK03cbCFPrCZQo32TGSIimM/bSpjtGvmra9A0+WgrJlH7tvVq5IgRqRI8xPgktGJDwnEVcJ+AmkVy5ON0fomunT8ftHzGE5126/sferEPWUUPYur/lFAe+AvpQwSGtq47Xb+VUDVDERK+r0uaayGhfsXFMMxLAvhDIFnyzkL5JEGfxru832f6OjR+dGsQwmGp0L4eWihijhc0AMd+Ufk2zEWdWp8Z20gcT/ceFQf63QdZKnc5SSyKa4qqhj+g4IwQ0TyAqb8gtM3stOOHwdJD0BlyVbbkx7wKwikRqKI+gUfdtI3uEPKGgUcc3p36TmM1DKU6qnTJAWSoM+16EAUeTykzuJpnPEGJIUFRFowrdqf8DYsBZX33P01w+lrmCFVczCZ/ZqnMaLnk3QNTj0fkb2qeu+75c85fD7KbmnG+O66HShYxOERltLvVPoIZvlIfvgrFkSwuuB670EdmshaIFZ+xpPZ4fOPg3Ssy3QCCS5atcG0X/3yp3Oz9QYWK3MW0NF6thR093XfqaPOJpNGmHhH3ntn2xGn/r8lTXJ7qGRUKCpI8uKo4rDPraUNc9U9jwVUlf/uEoU4K1r4=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(366004)(5660300002)(4326008)(66446008)(38100700002)(8936002)(316002)(44832011)(33656002)(26005)(186003)(6506007)(52536014)(66574015)(8676002)(7696005)(64756008)(508600001)(122000001)(76116006)(66946007)(66476007)(9686003)(38070700005)(110136005)(2906002)(66556008)(86362001)(71200400001)(55016002)(460985005);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?utf-8?B?bks2QUM2UFU2YnRCZzdmcTY4dElWcWphQVlreTV0TjZyKy9qbm1FWkQ5Z1E0?=
 =?utf-8?B?WmlVOXRFeHJsSUVNNHJ4RXRXR2pxMDNCLzZ4L2FLL09nam54VEhBUkpreVd1?=
 =?utf-8?B?RmlhbXFPckNRbG1OQ2VhR3pLcHdLc3JmVDIrUzlXYm1CRFBiaGl6M2ZjYkxo?=
 =?utf-8?B?YlVLeDhwclM5N3g2MzNBNldrU3dBT1VzUmprUjRMRlVIUVhxb0x0RU1peEhG?=
 =?utf-8?B?bVdhQjIyb1N4V1FvMmZIL1g5ek5zQjltMWlCdXR5MXp0WVdzcVNFMnpZOTFK?=
 =?utf-8?B?TGswaURxYUdscEpkcGt4SGJIM3NYU3dJZzNiMzhub3N6Z1lkQVc5TlpRRVc0?=
 =?utf-8?B?SUlFenc5d0swSkxKd2FSYy9qWDVRS1NOUzdOZ1lRblhSOHhXZm4xaHNxWVdR?=
 =?utf-8?B?cWZTUTh2Z3loQXQzNFN2bDZEQ092cDBwTUtma1NQaHZndFM4c0xpU3B2TmIw?=
 =?utf-8?B?R2Z2Mkxuamx4aFduT2ZmMm0ySXU5TW5HZ3E1WVgxd1ZIZGxOYWhHYi9UdEw4?=
 =?utf-8?B?eEg0T0pENUNjY2xncVJja05QOHdIOW5oaXdqcUwxNGFsbUIrN3g1eEk4cU9p?=
 =?utf-8?B?eGtreDFFMHBpWTdFbWZuSXNyTlZEdWMvWUV6UGhFS3lPVExVY3hYcW9mQzJh?=
 =?utf-8?B?Rkp3RzNrdnFQa2k4TXBQcW1KeWVuZUxzZC9ZdjNxRVM3cWxld21WNlh4UmNG?=
 =?utf-8?B?bk9SOWVtRmIyS3hqUDJhMDEyS1c3QW85aFBiUEhPby9jSjFFQWxDakxWeUJO?=
 =?utf-8?B?RG9NdHFIMnlkZnQ2alY0OFg5RnNIWGRkMHcrQ2ZaWXNhOWNVRkFpaTZ1bXli?=
 =?utf-8?B?cnRzQTNCSFdNQnJRTkhxbk5pajJoSnJGVXVwY2NweUxzVkpPYWVaYUppSlRB?=
 =?utf-8?B?S0UzdE95aWZOL0F3WlpHVno3dVVOREd1RHdndG41ZEpURUdTN2htbmF5dFpw?=
 =?utf-8?B?Q0lCdkVQd2FkYTU3QWJQSmlvRm9sVmltYnBLM1ZBcmpMbnZZSk5YcU9PSG1F?=
 =?utf-8?B?NVFaSzhyWTBld0ppTmRpQ21Sb2ZJczhJemJSL1Fjeks2c0k2WVExMU9FV1Rt?=
 =?utf-8?B?SHpHZGxwc3oxVEJhSDZ5dXpUNzZ1cy8xUkY5V2tnRkw0aHF0d1FZa0pqb3ND?=
 =?utf-8?B?cExpdmRVS0lyZE4yVi9BN2JjVFJhUEZlVmpOL0FPTjBSaUp6ZzVCUDNvY3BT?=
 =?utf-8?B?cUg3M21PZGtETjQwNnI0dWJ2ZXpwNi9xYmN6cEdIS204SXkwcW44dVF2QXdt?=
 =?utf-8?B?c29SOVRVcStDdWRxM0o3UStNY3ltQm53TlBSbVgraGYwOHVrWTM0MUtmVDNm?=
 =?utf-8?B?YWlBeVViNWwvVmtualIzeVc4Uy95cTN6b3Z3Z3VxVzNzc0F4RXVxN0FWTWM4?=
 =?utf-8?B?MkY2TDU3L1lUZVRsd1dVaVhXakNJY3kzbXpuS1RDNVptaytPZHRIaHJsTnZw?=
 =?utf-8?B?YXRPNWJwSHZha3RncEs5c0xXVmdWeEhCa01SRnBoanlWZkNIdi9uZ3oyTmpK?=
 =?utf-8?B?b3BZc3pEdk5Pc0lwcGdsM1VCcnVHUGhxOWNralMxNkNac2xSNHphV1pUTVRY?=
 =?utf-8?B?UTJWMVpkcGxQUitVd2p1dG1RZUMzK2NmRC9ITUN4Qy8zbHZ0d09rMEhOODNZ?=
 =?utf-8?B?Wnl2TTFSS2U4U2dXWDI0cDJ1SnJCUVpkblY2cUJKQkk1Y0FCcXVuQUpzdW5O?=
 =?utf-8?B?ZkhaOGplbkZlTTEzMFZHRlBmL0U2S0E0Zy92bGRmK29VQ2U1bkNVL1A2MWRR?=
 =?utf-8?B?U3hOSG1UM2NFbURYYmI1cWlUcUE5TUFHRTJKdjE2ZVppeDlQaGdpMEl5cmJV?=
 =?utf-8?B?QStDSEN0Z0pWcFFBcExLQ1dKajJ5RlIwVFZPQ1FNSHdwWUlJamdOR1RQMWND?=
 =?utf-8?B?YjllQUdaWXdxZGFZUTF6ZWI3WkRLNjBHUEg5VmNlNFIwY1lqckJta2xnbVhT?=
 =?utf-8?B?K0gwS1MzcGFRc1FrTFlyRnVlbTI2WEFjRkxNMFVXZHhBemxjZVZKQ1NmandW?=
 =?utf-8?B?M1JJYTNNeit0SzJRcTNnTm44cjVIOHZYdzEyZ3h3WSt5eXNMNjgrTE1OTDRQ?=
 =?utf-8?B?dU5pOVVJdC9hd1Vpb1hUaStJK0JUa3dhdHpGWUR5NTBteHUwMmVnUUtZU0Rs?=
 =?utf-8?B?MG8zTGMveWhlOURMSmNUcU5FL3lnZFVweW90d0lOOTFNWTFDUmNQeXh4TmIw?=
 =?utf-8?B?dlE9PQ==?=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: eafde9a7-019d-4be7-55e9-08d9965a76eb
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2021 19:22:33.4997 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: WWL+2nFC3axOVGcWtNSWxyGf6krqsDtdt6VxoPk3kTM1Zxm8LW6vfKpbuKtrqZ75MJHjynVFfvTBk8h383hktQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3032
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10146
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 bulkscore=0 mlxscore=0
 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001
 definitions=main-2110230124
X-Proofpoint-GUID: vRZ1zq8itkHPfnG9S3E30Na6NovbNPq6
X-Proofpoint-ORIG-GUID: vRZ1zq8itkHPfnG9S3E30Na6NovbNPq6
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 18132
Cc: "18132 <at> debbugs.gnu.org" <18132 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

PiBTdWNoIGEgY29tbWFuZCBpcyBsb25nIG92ZXJkdWUuICBJIHVzZWQgdGhlIGZvbGxvd2luZyBj
b21tYW5kDQo+IGZvciBhIGxvbmcgdGltZSwgYW5kIGZvcmdvdCBpdCdzIG5vdCBpbiBkaXJlZC14
LiAgSSBkb24ndCBzdWdnZXN0DQo+IHRvIHVzZSB0aGlzIGltcGxlbWVudGF0aW9uLCBidXQgc29t
ZXRoaW5nIGxpa2UgdGhpcy4NCg0KTGlrZXdpc2UuICBUaGVyZSBhcmUgbG90cyBvZiBzaW1pbGFy
IHBvc3NpYmlsaXRpZXMuDQpUaGVzZSBhcmUgd2hhdCBJIHVzZSwgZm9yIE1TIFdpbmRvd3MuICBJ
biBEaXJlZCwgDQpJIGhhdmUgdGhlc2UgYmluZGluZ3MgKHBsdXMgbW91c2UgdmVyc2lvbnMpOg0K
DQogIEMtUkVUICAgIGRpcmVkLXczMmV4cGxvcmUNCiAgTS1SRVQgICAgZGlyZWQtdzMyLWJyb3dz
ZXINCiAgQy1NLVJFVCAgZGlyZWQtbXVsdGlwbGUtdzMyLWJyb3dzZXINCg0KKGRlZnVuIGRpcmVk
LXczMi1icm93c2VyICgpDQogICJSdW4gZGVmYXVsdCBXaW5kb3dzIGFwcGxpY2F0aW9uIGFzc29j
aWF0ZWQgd2l0aCBjdXJyZW50IGxpbmUncyBmaWxlLg0KSWYgZmlsZSBpcyBhIGRpcmVjdG9yeSwg
dGhlbiBgZGlyZWQtZmluZC1maWxlJyBpbnN0ZWFkLg0KSWYgbm8gYXBwbGljYXRpb24gaXMgYXNz
b2NpYXRlZCB3aXRoIGZpbGUsIHRoZW4gYGZpbmQtZmlsZScuIg0KICAoaW50ZXJhY3RpdmUpDQog
IChsZXQgKChmaWxlICAoZGlyZWQtZ2V0LWZpbGVuYW1lIG5pbCB0KSkpDQogICAgKGlmIChmaWxl
LWRpcmVjdG9yeS1wIGZpbGUpDQogICAgICAgIChkaXJlZC1maW5kLWZpbGUpDQogICAgICAodzMy
LWJyb3dzZXIgKHN1YnN0LWNoYXItaW4tc3RyaW5nID8vID9cXCBmaWxlKSkpKSkNCg0KKGRlZnVu
IHczMi1icm93c2VyIChmaWxlKQ0KICAiUnVuIGRlZmF1bHQgV2luZG93cyBhcHBsaWNhdGlvbiBh
c3NvY2lhdGVkIHdpdGggRklMRS4NCklmIG5vIGFzc29jaWF0ZWQgYXBwbGljYXRpb24sIHRoZW4g
YGZpbmQtZmlsZScgRklMRS4iDQogIChpbnRlcmFjdGl2ZSAiZkZpbGU6ICIpDQogIChvciAoY29u
ZGl0aW9uLWNhc2UgbmlsDQogICAgICAgICAgKHczMi1zaGVsbC1leGVjdXRlIG5pbCBmaWxlKSAg
OyBVc2UgV2luZG93cyBmaWxlIGFzc29jaWF0aW9uDQogICAgICAgIChlcnJvciBuaWwpKQ0KICAg
ICAgKGZpbmQtZmlsZSBmaWxlKSkpDQoNCihkZWZ1biBkaXJlZC13MzJleHBsb3JlICgpDQogICJP
cGVuIFdpbmRvd3MgRXhwbG9yZXIgdG8gY3VycmVudCBmaWxlIG9yIGZvbGRlci4iDQogIChpbnRl
cmFjdGl2ZSkNCiAgKHczMmV4cGxvcmUgKGRpcmVkLWdldC1maWxlbmFtZSBuaWwgdCkpKQ0KDQoo
ZGVmdW4gdzMyZXhwbG9yZSAoZmlsZSkNCiAgIk9wZW4gV2luZG93cyBFeHBsb3JlciB0byBGSUxF
IChhIGZpbGUgb3IgYSBmb2xkZXIpLiINCiAgKGludGVyYWN0aXZlICJmRmlsZTogIikNCiAgKGxl
dCAoKHczMmZpbGUgKHN1YnN0LWNoYXItaW4tc3RyaW5nID8vID9cXCAoZXhwYW5kLWZpbGUtbmFt
ZSBmaWxlKSkpKQ0KICAgIChpZiAoZmlsZS1kaXJlY3RvcnktcCB3MzJmaWxlKQ0KICAgICAgICAo
dzMyLXNoZWxsLWV4ZWN1dGUgImV4cGxvcmUiIHczMmZpbGUgIi9lLC9zZWxlY3QsIikNCiAgICAg
ICh3MzItc2hlbGwtZXhlY3V0ZSAib3BlbiIgImV4cGxvcmVyIiAoY29uY2F0ICIvZSwvc2VsZWN0
LCIgdzMyZmlsZSkpKSkpDQoNCihkZWZ1biBkaXJlZC1tdWx0aXBsZS13MzItYnJvd3NlciAoKQ0K
ICAiUnVuIGRlZmF1bHQgV2luZG93cyBhcHBsaWNhdGlvbnMgYXNzb2NpYXRlZCB3aXRoIG1hcmtl
ZCBmaWxlcy4iDQogIChpbnRlcmFjdGl2ZSkNCiAgKGxldCAoKGZpbGVzIChkaXJlZC1nZXQtbWFy
a2VkLWZpbGVzKSkpDQogICAgKHdoaWxlIGZpbGVzDQogICAgICAodzMyLWJyb3dzZXIgKGNhciBm
aWxlcykpDQogICAgICAoc2xlZXAtZm9yIHczMi1icm93c2VyLXdhaXQtdGltZSkNCiAgICAgIChz
ZXRxIGZpbGVzIChjZHIgZmlsZXMpKSkpKQ0KDQooZGVmdW4gZGxnb3Blbi1vcGVuLWZpbGVzICgm
b3B0aW9uYWwgZmxpcCkNCiAgIk9wZW4gZmlsZXMgdXNpbmcgdGhlIFdpbmRvd3Mgc3RhbmRhcmQg
T3BlbiBkaWFsb2cgYm94Lg0KVmFyIGBkbGdvcGVuLWV4ZWN1dGFibGUtcGF0aCcgaXMgcGF0aCBv
ZiBleGVjdXRhYmxlIGBnZXRmaWxlLmV4ZScuDQoNCklmIGB3MzItYnJvd3NlcicgaXMgZGVmaW5l
ZCwgdGhlbiBpdCBpcyB1c2VkIHRvIG9wZW4gdGhlIHNlbGVjdGVkDQpmaWxlcy4gIE90aGVyd2lz
ZSwgc3RhbmRhcmQgRW1hY3MgYGZpbmQtZmlsZScgZnVuY3Rpb25zIGFyZSB1c2VkLg0KDQpJZiBg
dzMyLWJyb3dzZXInIGlzIG5vdCBkZWZpbmVkLCB0aGVuIGBkbGdvcGVuLW90aGVyLXdpbmRvdycN
CmNvbnRyb2xzIGhvdyBzZWxlY3RlZCBmaWxlcyBhcmUgb3BlbmVkOg0KICBub24tbmlsID0+IERp
c3BsYXkgY2hvc2VuIGZpbGUocykgaW4gc2VwYXJhdGUgd2luZG93cy4NCiAgbmlsICAgICA9PiBE
aXNwbGF5IGEgc2luZ2xlIGNob3NlbiBmaWxlIGluIHRoZSBjdXJyZW50IHdpbmRvdzsNCiAgICAg
ICAgICAgICBkb24ndCBkaXNwbGF5IG11bHRpcGxlIGNob3NlbiBmaWxlcy4NCg0KT3B0aW9uYWwg
cHJlZml4IGFyZyBGTElQIG5vbi1uaWwgcmV2ZXJzZXMgdGhlIGVmZmVjdCBvZiB2YXJpYWJsZQ0K
YGRsZ29wZW4tb3RoZXItd2luZG93JywgZm9yIHRoaXMgY2FsbC4iDQogIChpbnRlcmFjdGl2ZSAi
UCIpDQogICh1bmxlc3MgKGVxIHN5c3RlbS10eXBlICd3aW5kb3dzLW50KQ0KICAgIChlcnJvciAi
Q29tbWFuZCBgZGxnb3Blbi1vcGVuLWZpbGVzJyBpcyBmb3IgV2luZG93cyBvbmx5IikpDQogIChs
ZXQgKChidWZmZXIgIiIpDQogICAgICAgIChmaWxlLWZxbiAiIikNCiAgICAgICAgKGxpbmVzLWlu
LXBhZ2UgMCkNCiAgICAgICAgKGRpci1wYXRoICIiKQ0KICAgICAgICAob3RoZXItd2luIChpZiBm
bGlwDQogICAgICAgICAgICAgICAgICAgICAgIChub3QgZGxnb3Blbi1vdGhlci13aW5kb3cpDQog
ICAgICAgICAgICAgICAgICAgICBkbGdvcGVuLW90aGVyLXdpbmRvdykpKQ0KICAgIChzZXRxIGJ1
ZmZlciAoZ2VuZXJhdGUtbmV3LWJ1ZmZlciAiZmlsZXMtdG8tb3BlbiIpKQ0KICAgICh3aGVuIChj
YWxsLXByb2Nlc3MgZGxnb3Blbi1leGVjdXRhYmxlLXBhdGggbmlsIGJ1ZmZlcikNCiAgICAgICh3
aXRoLWN1cnJlbnQtYnVmZmVyIGJ1ZmZlcg0KICAgICAgICAoc2F2ZS1leGN1cnNpb24NCiAgICAg
ICAgICAoZ290by1saW5lIDEpDQogICAgICAgICAgKHNldHEgZGlyLXBhdGggKGdldC1jdXJyZW50
LWxpbmUpKQ0KICAgICAgICAgIDs7IElmIGJ1ZmZlciBlbXB0eSwgdGhlbiB1c2VyIGhhcyBjYW5j
ZWxsZWQgb3IgdGhlIG9wZW4gZmFpbGVkLg0KICAgICAgICAgIDs7IElmIG9ubHkgb25lIGxpbmUg
aW4gYnVmZmVyLCB0aGVuIG9ubHkgb25lIGZpbGUgc2VsZWN0ZWQsIHNvIHVzZSBpdC4NCiAgICAg
ICAgICAod2hlbiAoPiAoYnVmZmVyLXNpemUpIDApDQogICAgICAgICAgICAoaWYgKD0gMSAoc2V0
cSBsaW5lcy1pbi1wYWdlIChjb3VudC1saW5lcyAxIChidWZmZXItc2l6ZSkpKSkNCiAgICAgICAg
ICAgICAgICAoaWYgKGZib3VuZHAgJ3czMi1icm93c2VyKQ0KICAgICAgICAgICAgICAgICAgICAo
dzMyLWJyb3dzZXIgZGlyLXBhdGgpDQogICAgICAgICAgICAgICAgICAoaWYgb3RoZXItd2luDQog
ICAgICAgICAgICAgICAgICAgICAgKGZpbmQtZmlsZS1vdGhlci13aW5kb3cgZGlyLXBhdGgpDQog
ICAgICAgICAgICAgICAgICAgIChmaW5kLWZpbGUgZGlyLXBhdGgpKSkNCiAgICAgICAgICAgICAg
KHdoaWxlICg+IGxpbmVzLWluLXBhZ2UgMSkNCiAgICAgICAgICAgICAgICAoZGVjZiBsaW5lcy1p
bi1wYWdlKQ0KICAgICAgICAgICAgICAgIChmb3J3YXJkLWxpbmUpDQogICAgICAgICAgICAgICAg
KHNldHEgZmlsZS1mcW4gKGNvbmNhdCBkaXItcGF0aCAiLyIgKGdldC1jdXJyZW50LWxpbmUpKSkN
CiAgICAgICAgICAgICAgICAoc2F2ZS1leGN1cnNpb24NCiAgICAgICAgICAgICAgICAgIChpZiAo
ZmJvdW5kcCAndzMyLWJyb3dzZXIpDQogICAgICAgICAgICAgICAgICAgICAgKHczMi1icm93c2Vy
IGZpbGUtZnFuKQ0KICAgICAgICAgICAgICAgICAgICAoaWYgb3RoZXItd2luDQogICAgICAgICAg
ICAgICAgICAgICAgICAoZmluZC1maWxlLW90aGVyLXdpbmRvdyBmaWxlLWZxbikNCiAgICAgICAg
ICAgICAgICAgICAgICAoZmluZC1maWxlLW5vc2VsZWN0IGZpbGUtZnFuKSkpKSkpKSkpKSA7IG5v
IGRpc3BsYXkNCiAgICAoa2lsbC1idWZmZXIgYnVmZmVyKSkpDQoNCg==




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 18:37:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 14:37:04 2021
Received: from localhost ([127.0.0.1]:37273 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meLtA-0008UU-9J
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 14:37:04 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:46147)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1meLt3-0008Sv-SV
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 14:36:58 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id C143FFF804;
 Sat, 23 Oct 2021 18:36:50 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Howard Melman <hmelman@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
Organization: LINKOV.NET
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
 <lyv91neia0.fsf@HIDDEN>
Date: Sat, 23 Oct 2021 21:29:38 +0300
In-Reply-To: <lyv91neia0.fsf@HIDDEN> (Howard Melman's message of
 "Sat, 23 Oct 2021 13:57:11 -0400")
Message-ID: <87sfwr8utt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Such a command emulates what double clicking on an icon does
> which most of the time is what a user wants (because it's
> configured it do what their most common app need is).

Such a command is long overdue.  I used the following command
for a long time, and forgot it's not in dired-x.  I don't suggest
to use this implementation, but something like this.  Then like
clicking the right mouse button on a file shows a list of
available apps to open the file in, and M-& does practically the same
with the keyboard.  Then like double clicking on an icon,
some key should use the default command to open the file.

#+begin_src emacs-lisp
(define-key dired-mode-map [(control return)] 'my-dired-run-find-file)
(defun my-dired-run-find-file ()
  "View file for dired."
  (interactive)
  (let* ((file (dired-get-filename)))
    (cond
     ((let* ((command
              (and (functionp 'mm-mime-info)
                   (mm-mime-info
                    (mm-extension-to-mime (file-name-extension file))))))
        (if (and command (stringp command))
            ;; always return ‘t’ for ‘cond’
            (or (ignore (async-shell-command (concat (format command file) "&")))
                t))))
     ((string-match "\\.html?$" file)
      (cond
       ((fboundp 'browse-url)
        (browse-url file))))
     ((string-match "\\.elc?$" file)
      (load-file file))
     ((string-match "\\.info?$" file)
      (info file))
     ((let* ((file-list (list (dired-get-filename)))
             (command (dired-guess-default file-list))
             (async-shell-command-display-buffer nil))
        (if (listp command)
            (setq command (car command)))
        (if command
            (async-shell-command
             (dired-shell-stuff-it command file-list nil 0)))))
     (t
      (message "%s" file)))))
#+end_src




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Oct 2021 17:57:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 13:57:28 2021
Received: from localhost ([127.0.0.1]:37141 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meLGp-0005AP-V3
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 13:57:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:56606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1meLGn-0005AF-EU
 for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 13:57:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53322)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1meLGn-00007g-5r
 for bug-gnu-emacs@HIDDEN; Sat, 23 Oct 2021 13:57:25 -0400
Received: from ciao.gmane.io ([116.202.254.214]:54460)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1meLGk-00021d-Cw
 for bug-gnu-emacs@HIDDEN; Sat, 23 Oct 2021 13:57:24 -0400
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1meLGh-000533-MO
 for bug-gnu-emacs@HIDDEN; Sat, 23 Oct 2021 19:57:19 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Howard Melman <hmelman@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
Date: Sat, 23 Oct 2021 13:57:11 -0400
Message-ID: <lyv91neia0.fsf@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin)
Cancel-Lock: sha1:9v+mUvFv6qY8pzFxwo0z948/isM=
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-Spam_score_int: 5
X-Spam_score: 0.5
X-Spam_bar: /
X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001,
 FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)


>> xdg-open uses the underlying desktop system's MIME infrastructure. For a
>> GNU system, that would most typically be GNOME, and its "gio open" (or on
>> older systems, gvfs-open) command.
>
> I don't see that shooting away blindly to xdg-open is satisfactory; the
> user should be able to a) know which command is being run before running
> it and b) modify it on the fly.  Maybe I want to open PDF:s first with
> one and then another PDF reader to see if it looks the same, just as I
> would be able to from a graphical file manager.

In the spirit of "we need to add stuff here, without taking
anything away" can I suggest just adding a new dired-do-open
command that calls out to xdg-open on gnu/linux or open on
darwin or windows.  Such a command has been written many
times and people add it to their local configs.  I have it
bound on X in dired and use it far more often than I do M-!.

Such a command emulates what double clicking on an icon does
which most of the time is what a user wants (because it's
configured it do what their most common app need is).

Having emacs provide the command means it could be correct
reguarding shell quoting and other small issues that people
might get wrong on their own.

For those that want more control either in picking the
command that is run or seeing it beforehand, they can use
and configure dired-guess-shell-alist-default.

-- 

Howard





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 17:17:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 13:17:07 2021
Received: from localhost ([127.0.0.1]:37071 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meKdn-0001uy-0A
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 13:17:07 -0400
Received: from heytings.org ([95.142.160.155]:60038)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1meKdk-0001uo-9M
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 13:17:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1635009422;
 bh=kxv2amKwyu2/uZ4Fppv1VdSBNo/RXlIHIGKYfca8qz4=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=Se/VbpjJdzYMFNYoVNJGrBiUbU6ScHHotaXZhCfu3s0mDDDuU4kK6lMkiUc1lNvzB
 K/BBZ0F1hV5LqZF9NBIf1rOClqU5lYv2i2VuFqTr4N5AK5VTn6yv3wts2skCz8fBfN
 GEkiinLPUoXLmZLIfWk/IOL4spgL8QYdKHErKal1OJvMo/52W5CdHAVLlmP1wSGuUA
 7S2WS6kPu+jYGF0BUMQk/YrAQH5ky2n/v3M6uHZESSeVpPUeWyGZ0k0h/AXPhRtIuV
 0vbiL3lyMtpx3j+rskL8AqubJXcHMahBqJv3vpnrIBYkJwVZzrbCo/JBGZ5gl6bD3I
 5x2bMWGoheLqw==
Date: Sat, 23 Oct 2021 17:17:02 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
In-Reply-To: <CADwFkmkZMXdF5bdCBvgPKXz0WAEcMzdrWODF6hZCYEQYetp0GA@HIDDEN>
Message-ID: <2d6e9fbc478a853dcc7f@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
 <CAOnWdohzNADVbQrk-ZQvwWpcr4ewDtr-Hpvs-K5H+-TJfP-LGQ@HIDDEN>
 <CADwFkmkZMXdF5bdCBvgPKXz0WAEcMzdrWODF6hZCYEQYetp0GA@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 18132
Cc: bug-gnu-emacs@HIDDEN, 18132 <at> debbugs.gnu.org, Reuben Thomas <rrt@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> What I want is more or less the exact behavior of xdg-open, but I want 
> to be able to check the actual command (e.g. "evince", not just 
> "xdg-open") before pressing RET.
>

xdg-mime query default $(xdg-mime query filetype FILE)

should return the name of one of the files /usr/share/applications, and 
you can check for the line starting with Exec in that file to see what 
command it launches.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Oct 2021 17:17:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 13:17:11 2021
Received: from localhost ([127.0.0.1]:37074 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meKdr-0001vE-6x
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 13:17:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:47844)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1meKdo-0001v6-E2
 for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 13:17:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48876)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gregory@HIDDEN>)
 id 1meKdo-0000Hb-8Q
 for bug-gnu-emacs@HIDDEN; Sat, 23 Oct 2021 13:17:08 -0400
Received: from heytings.org ([95.142.160.155]:35612)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gregory@HIDDEN>)
 id 1meKdm-0000Ii-6W
 for bug-gnu-emacs@HIDDEN; Sat, 23 Oct 2021 13:17:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1635009422;
 bh=kxv2amKwyu2/uZ4Fppv1VdSBNo/RXlIHIGKYfca8qz4=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=Se/VbpjJdzYMFNYoVNJGrBiUbU6ScHHotaXZhCfu3s0mDDDuU4kK6lMkiUc1lNvzB
 K/BBZ0F1hV5LqZF9NBIf1rOClqU5lYv2i2VuFqTr4N5AK5VTn6yv3wts2skCz8fBfN
 GEkiinLPUoXLmZLIfWk/IOL4spgL8QYdKHErKal1OJvMo/52W5CdHAVLlmP1wSGuUA
 7S2WS6kPu+jYGF0BUMQk/YrAQH5ky2n/v3M6uHZESSeVpPUeWyGZ0k0h/AXPhRtIuV
 0vbiL3lyMtpx3j+rskL8AqubJXcHMahBqJv3vpnrIBYkJwVZzrbCo/JBGZ5gl6bD3I
 5x2bMWGoheLqw==
Date: Sat, 23 Oct 2021 17:17:02 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
In-Reply-To: <CADwFkmkZMXdF5bdCBvgPKXz0WAEcMzdrWODF6hZCYEQYetp0GA@HIDDEN>
Message-ID: <2d6e9fbc478a853dcc7f@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
 <CAOnWdohzNADVbQrk-ZQvwWpcr4ewDtr-Hpvs-K5H+-TJfP-LGQ@HIDDEN>
 <CADwFkmkZMXdF5bdCBvgPKXz0WAEcMzdrWODF6hZCYEQYetp0GA@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@HIDDEN;
 helo=heytings.org
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: bug-gnu-emacs@HIDDEN, 18132 <at> debbugs.gnu.org, Reuben Thomas <rrt@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


>
> What I want is more or less the exact behavior of xdg-open, but I want 
> to be able to check the actual command (e.g. "evince", not just 
> "xdg-open") before pressing RET.
>

xdg-mime query default $(xdg-mime query filetype FILE)

should return the name of one of the files /usr/share/applications, and 
you can check for the line starting with Exec in that file to see what 
command it launches.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 15:45:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 11:45:11 2021
Received: from localhost ([127.0.0.1]:36977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meJCp-0007pO-0d
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 11:45:11 -0400
Received: from mail-pf1-f180.google.com ([209.85.210.180]:43530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1meJCm-0007p1-TZ
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 11:45:09 -0400
Received: by mail-pf1-f180.google.com with SMTP id 187so6362136pfc.10
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 08:45:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=mLqvl/Eo/7+rM8vjmeByhkUF6Yp7w6uZdZ34LAHbhjo=;
 b=GSRPYQ0A95NkksSaagoZKs5b7AMAnIJezDYPj6qm31QH+4OFHRjZudERMhcitzfLg3
 cuTCM7kHr5/AoG5QCu5l+JIXQS0cY9D5Jo4gi7Mf/Bja00khznSry7lVEkEaojxHTVIT
 20s+lHXqT3ew7ngZerP6VsDkRiQmsOkBVT35i21mbiDH5QSOm2wLuxD0kUNllkzIYgzT
 T/9iH9dLI0OWNqX6Ah5B+RRHVaAjg6XroEbYoWpaYGKLorPb4JiaE2s2bHfApCRBojat
 TtLCMRf1NAaRbfaVZvBPH+JAzcAuzKGijUk5cZXImBgfiVUuvn9DBoOx+b3PXaBahNmR
 RUag==
X-Gm-Message-State: AOAM532XQPAFC/LLa002/zcHI65L3BqKrHNjwSK+YsElpVN7gkvrARCr
 sBCLBglBiHxIZruIvFsYlxNoMgFYLnCQZWWuzBg=
X-Google-Smtp-Source: ABdhPJwq/Ziz8+mUERNo5TYX7DgtZOo/tGZhJCI9nS72UsVQzVZ2AUEFjyGIQdFXLDsMTcPoxLByRf3ElYzbbbHPLxQ=
X-Received: by 2002:a63:81c2:: with SMTP id t185mr5143344pgd.114.1635003902965; 
 Sat, 23 Oct 2021 08:45:02 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 23 Oct 2021 08:45:02 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CAOnWdohzNADVbQrk-ZQvwWpcr4ewDtr-Hpvs-K5H+-TJfP-LGQ@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
 <CAOnWdohzNADVbQrk-ZQvwWpcr4ewDtr-Hpvs-K5H+-TJfP-LGQ@HIDDEN>
MIME-Version: 1.0
Date: Sat, 23 Oct 2021 08:45:02 -0700
Message-ID: <CADwFkmkZMXdF5bdCBvgPKXz0WAEcMzdrWODF6hZCYEQYetp0GA@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Reuben Thomas <rrt@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 18132
Cc: Eli Zaretskii <eliz@HIDDEN>, 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Reuben Thomas <rrt@HIDDEN> writes:

> On Sat, 23 Oct 2021 at 14:57, Stefan Kangas <stefan@HIDDEN> wrote:
>
>> Maybe I want to open PDF:s first with
>> one and then another PDF reader to see if it looks the same, just as I
>> would be able to from a graphical file manager.
>>
>
> Then you won't be using the default command anyway.

What I want is more or less the exact behavior of xdg-open, but I want
to be able to check the actual command (e.g. "evince", not just
"xdg-open") before pressing RET.

I also want to be able to override xdg-open with customizations inside
Emacs.

> I agree with Eli's reasoning.

Please bare with me as I'm trying to understand.

Is your preference still to just run "xdg-open", as you explained in
your original bug report?  (It was quite some time ago, which is why I'm
asking, in case your position has changed.)

Do you agree that if we could get my idea to work, you could have your
cake and eat it too?  IOW, do you disagree with the approach because you
think it is infeasible to make it work well, or because you don't think
that the feature sounds useful?  Or do you merely disagree with using
mailcap to implement it?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 14:04:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 10:04:14 2021
Received: from localhost ([127.0.0.1]:36833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meHd8-000346-3Q
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 10:04:14 -0400
Received: from mail-pj1-f47.google.com ([209.85.216.47]:50709)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rrt@HIDDEN>) id 1meHd3-00033p-Fm
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 10:04:12 -0400
Received: by mail-pj1-f47.google.com with SMTP id gn3so4923931pjb.0
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 07:04:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=qomim8nb2L61S6mo5n+YiU04n4GDihB41m138vMGLkU=;
 b=t17MM4qo5+m7+LjOMIGXu/DVioQtgYVKb1JFabnyzODYzWlF6eKOu7jTGc+0S27HMu
 yrdajRAFH/pq2OXPVhHbwZ0L4fpcz533h/4YJTVaxwfe6k9w7HV9hOOx8R4mXZD0ZxNt
 BIhqQz0cAJK/76vGBxx5cPYwA9K2VTtJ5580Q=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=qomim8nb2L61S6mo5n+YiU04n4GDihB41m138vMGLkU=;
 b=od7TljOwzKFuD6hh0QGY9vLfGePsgiYtbL58cZq6zY9StJWOA8Mr0zzXp8gvqb/ZiM
 /3NT8/dphgHBhsrZAhtjyzHGfBDbXcgLZLxOAZ/PhlhzFwZv6bIyLWCmt64wFncUbQc4
 P7IigJrYetCxgnFr+HXFS1IRyx4/8xagkGhYl/wQYY0VmZxQtIWZuxj9XxZLNDZkikyi
 6U3VHXVS4ihy583Eq9nKXdTkLUZ2dpsKOasayU5exPYGG2paViUZMUI18Cjx9hv3Ix4o
 1hpnRVSHiyoakdNajqWkjEKyyLR/Fp+JPQGcb/IdYcJwqrpdcyMPo0opL2vQvuvpKhQZ
 o1fw==
X-Gm-Message-State: AOAM531SIaGJIUacGphaMQJGnRAjl1wUwyCcDFLL33cFDFK4YZgCbUVe
 jQAYfIMRN66dWZTfm6GCYdm6RLigdMdRuhh2SBTe0A==
X-Google-Smtp-Source: ABdhPJxNTrF5NW1eFQ7VzmRZetZEXULVln/W0CjujWbTqmJIW07paHgzAP4DvDNdrcdX3Y4PETnp2t4lX5LKeyUT1pw=
X-Received: by 2002:a17:90a:2b8f:: with SMTP id
 u15mr3092358pjd.44.1634997843491; 
 Sat, 23 Oct 2021 07:04:03 -0700 (PDT)
MIME-Version: 1.0
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
 <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
In-Reply-To: <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
From: Reuben Thomas <rrt@HIDDEN>
Date: Sat, 23 Oct 2021 15:03:52 +0100
Message-ID: <CAOnWdohzNADVbQrk-ZQvwWpcr4ewDtr-Hpvs-K5H+-TJfP-LGQ@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000ab936d05cf059983"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 18132
Cc: Eli Zaretskii <eliz@HIDDEN>, 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000ab936d05cf059983
Content-Type: text/plain; charset="UTF-8"

On Sat, 23 Oct 2021 at 14:57, Stefan Kangas <stefan@HIDDEN> wrote:

> Maybe I want to open PDF:s first with
> one and then another PDF reader to see if it looks the same, just as I
> would be able to from a graphical file manager.
>

Then you won't be using the default command anyway.

You say that mailcap is the wrong tool for the job.  (Why?)
>

I agree with Eli's reasoning.

-- 
https://rrt.sc3d.org

--000000000000ab936d05cf059983
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Sat, 23 Oct 2021 at 14:57, Stefan Kangas &lt;<a href=3D"mailto:st=
efan@HIDDEN">stefan@HIDDEN</a>&gt; wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">Maybe I want to open PDF:s first with<br>
one and then another PDF reader to see if it looks the same, just as I<br>
would be able to from a graphical file manager.<br></blockquote><div><br></=
div><div><div style=3D"font-family:arial,helvetica,sans-serif;font-size:sma=
ll" class=3D"gmail_default">Then you won&#39;t be using the default command=
 anyway.</div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0=
px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

You say that mailcap is the wrong tool for the job.=C2=A0 (Why?)<br></block=
quote><div><br></div><div><div style=3D"font-family:arial,helvetica,sans-se=
rif;font-size:small" class=3D"gmail_default">I agree with Eli&#39;s reasoni=
ng.</div></div></div><br>-- <br><div dir=3D"ltr" class=3D"gmail_signature">=
<div dir=3D"ltr"><div><div dir=3D"ltr"><a href=3D"https://rrt.sc3d.org" tar=
get=3D"_blank">https://rrt.sc3d.org</a></div></div></div></div></div>

--000000000000ab936d05cf059983--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 13:57:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 09:57:07 2021
Received: from localhost ([127.0.0.1]:36829 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meHWF-0002pH-9R
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:57:07 -0400
Received: from mail-pj1-f52.google.com ([209.85.216.52]:50945)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1meHWD-0002oo-Je
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:57:06 -0400
Received: by mail-pj1-f52.google.com with SMTP id gn3so4916178pjb.0
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 06:57:05 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=HD39IURI3dM+/WeLZo9UCdLo6Xsw5ham8TJpH2Sf5xo=;
 b=OcCl7RQbgDEAVPCWEgpsoM23vXm9BXrtkjJkMzMrEmbLyNpqRa32OjNjfymisXMlic
 IQkdRJQztzqfLRAPY2SjrTtqFaLt8ypCMFSwHXTRZjt1tG6P5WTX4v8acfo1xl9o0mLP
 PMKrxsNMoYG6MdNG6OpDqALLK+AjapN1VefLOqaS+lJYD6myaaxCdPB7vq+lH+U3vLM5
 H0H/KqexIsH48qTKL80jjPavsZAP9ScVkEvvv0Ei0umd4zfcATuoL5/0/Tmu/5Q36i+T
 lglS/0HKB/KmFzcpl0u3JUCc1YfHcsjfmJg3g9JpJdVADFtf+EpQ9UfbGeSWghwzR/mN
 7gUg==
X-Gm-Message-State: AOAM533RCuYo/XjfNtk8Lr4A9gKTcw9p2X2rXFFOTsbgxCnN7fxiGobL
 Bkuyj8jjnUI3lw0SCS8eAp0c5dBOBUq9zzXO2pc=
X-Google-Smtp-Source: ABdhPJz2I6fqTQrgnHlk3e3IfDna0m+jqQbr8A+LnONkm+h86Uyarq28Q3UcrZUx8p7DlOo2YoKjpxdI+LEdKfDC8tw=
X-Received: by 2002:a17:902:e750:b0:140:2693:b2e8 with SMTP id
 p16-20020a170902e75000b001402693b2e8mr5813838plf.22.1634997419731; Sat, 23
 Oct 2021 06:56:59 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 23 Oct 2021 06:56:59 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
MIME-Version: 1.0
Date: Sat, 23 Oct 2021 06:56:59 -0700
Message-ID: <CADwFkm=Z+MWgbMnvrGiWo76cMeQ=q1xJHcZ-Uyc9QjThVULhQQ@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Reuben Thomas <rrt@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 18132
Cc: Eli Zaretskii <eliz@HIDDEN>, 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Reuben Thomas <rrt@HIDDEN> writes:

> xdg-open uses the underlying desktop system's MIME infrastructure. For a
> GNU system, that would most typically be GNOME, and its "gio open" (or on
> older systems, gvfs-open) command.

I don't see that shooting away blindly to xdg-open is satisfactory; the
user should be able to a) know which command is being run before running
it and b) modify it on the fly.  Maybe I want to open PDF:s first with
one and then another PDF reader to see if it looks the same, just as I
would be able to from a graphical file manager.

Thus, the most important question to my mind is "how can we get the
default command for a file in the best way".

I think ideally we should get this from the system, optionally with
overrides and/or fallbacks from Emacs or the user.  I don't particularly
care if it comes from mailcap, from /usr/share/applications, but we
should preferably pick the "best" one.

Eli says that portability is a concern with mailcap, which is true but
also not something we can't work around.

You say that mailcap is the wrong tool for the job.  (Why?)

I claim that the `xdg-open' script does not seem to solve the problem.

Then I ask: what is the correct tool for the job of finding the command
to run?

Maybe we need try several different things?  I see that `xdg-open' tries
all kinds of different things ("gio open", "gvfs open", "open_generic",
etc.).  But our needs are different: we want the command as a string, we
don't just want to run it.

PS. For the sake of simplicity, I would suggest that we could first
    figure out what to do on GNU/Linux and then we'll see if we can get
    that solution to work elsewhere or if we need to get other things in
    place.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 13:20:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 09:20:36 2021
Received: from localhost ([127.0.0.1]:34700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meGwu-0001Lz-8G
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:20:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35016)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1meGws-0001Lm-KA
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:20:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:32860)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1meGwn-0008Ha-44; Sat, 23 Oct 2021 09:20:29 -0400
Received: from [87.69.77.57] (port=4352 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1meGwm-0001Ti-N4; Sat, 23 Oct 2021 09:20:29 -0400
Date: Sat, 23 Oct 2021 16:20:16 +0300
Message-Id: <834k976fov.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Reuben Thomas <rrt@HIDDEN>
In-Reply-To: <CAOnWdoiexqZFZdKfVH=POFgYVhG4FkoutF_O7eBjd32NxH4jEA@HIDDEN>
 (message from Reuben Thomas on Sat, 23 Oct 2021 14:06:27 +0100)
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <83h7d85ec3.fsf@HIDDEN>
 <CADwFkmmBAT7XchCZxPfesNf0CCYqEDzTocgsaWYoC5FsoOon9g@HIDDEN>
 <CAOnWdoiexqZFZdKfVH=POFgYVhG4FkoutF_O7eBjd32NxH4jEA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Reuben Thomas <rrt@HIDDEN>
> Date: Sat, 23 Oct 2021 14:06:27 +0100
> Cc: Eli Zaretskii <eliz@HIDDEN>, 18132 <at> debbugs.gnu.org
> 
> I agree with Eli that mailcap is not the right tool for the job.

(Then why are we still talking about 'file'?)

> file's MIME-type support is easy to fix for types that don't (yet) have a MIME type supplied; file is actively
> maintained and frequently released.

Not sure it will help.  Example:

  $ file --mime-type -k -b lisp/international/uni-bidi.el
  application/octet-stream

Looks like there are some fundamental problems in 'file' that make it
not ideal for this purpose, to say the least.  Which, to me, just
reiterates what I already said up-thread: we should allow users to
override what the system-level tools provide, because they will never
be 100% satisfactory for our needs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 13:06:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 09:06:46 2021
Received: from localhost ([127.0.0.1]:34683 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meGjV-0000zL-W3
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:06:46 -0400
Received: from mail-pl1-f177.google.com ([209.85.214.177]:46679)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rrt@HIDDEN>) id 1meGjT-0000z7-Vr
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:06:45 -0400
Received: by mail-pl1-f177.google.com with SMTP id c4so768507plg.13
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 06:06:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=NU0U2NCMz49bYJHNzpipYNA8j/RYtqDPO2w9H0gbQuM=;
 b=VIo+u/57MTVRnB+tX2GIOBWSQ+hFPOcuud9kL17+GdbuDy34TrmMnOpHNm01t8Veno
 4BzZR8Tx03H6Rt4BdEQCVkgnuq/75QanTiBie7xfE99zv+aVVQ0ktyYZ8sq2K0S4p4RL
 gcEb4RD4w3iBqeZT9RnJQnwirxyyBbKJXtdXA=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=NU0U2NCMz49bYJHNzpipYNA8j/RYtqDPO2w9H0gbQuM=;
 b=IhDWlVBIomojTbDNM6ugqjkosGvouNybc3Q+bOiPDL4WqeTV+FbzPBLje4vxyIKRjr
 b7n0KqW2b4JI/7nvU2V9AceYPjUOo8rYn4NBpU+cEbdGXHMeyr0FqH9ruatGWDD+UURl
 5KlluZEyrXd1p4CV/m8gruSnJ0TE/OxNO3wMudDVgc+yFBxLDCKtf72ObmevQfWmayWA
 i5V1de7BiB3mK31LXDGleQsusReDQCgEORvsHRkMMIyUVYjLqmf3zIkltF+eXlYT9dA1
 CpPC8RUorqlXcXkE6KYxV2I7PvZTnrRkt8hKTgWCw5/Lgd7SlhaSpkagLDN55uAHkF99
 EUhw==
X-Gm-Message-State: AOAM533y0o8LG2vCwib4Ag4skiD6RUYjJNk0TnFAtLfGc8ARMWdGAwp+
 fu/FGSzZGNYhxrMkJy7iZCU4BLQIQ1XFawB9hu2aV/zd9a0=
X-Google-Smtp-Source: ABdhPJwML52ZN18gtDUdPVh/5SR01buV5xeKI+JBqv5/aLPO9Yxz0KQdi7a9RP9cXtMoD+XcqKg7u3JRbaX70lKQEi8=
X-Received: by 2002:a17:902:bd94:b0:13f:f96c:aa22 with SMTP id
 q20-20020a170902bd9400b0013ff96caa22mr5610119pls.43.1634994398284; Sat, 23
 Oct 2021 06:06:38 -0700 (PDT)
MIME-Version: 1.0
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <83h7d85ec3.fsf@HIDDEN>
 <CADwFkmmBAT7XchCZxPfesNf0CCYqEDzTocgsaWYoC5FsoOon9g@HIDDEN>
In-Reply-To: <CADwFkmmBAT7XchCZxPfesNf0CCYqEDzTocgsaWYoC5FsoOon9g@HIDDEN>
From: Reuben Thomas <rrt@HIDDEN>
Date: Sat, 23 Oct 2021 14:06:27 +0100
Message-ID: <CAOnWdoiexqZFZdKfVH=POFgYVhG4FkoutF_O7eBjd32NxH4jEA@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000051e0ec05cf04cc4d"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 18132
Cc: Eli Zaretskii <eliz@HIDDEN>, 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000051e0ec05cf04cc4d
Content-Type: text/plain; charset="UTF-8"

On Sat, 23 Oct 2021 at 10:48, Stefan Kangas <stefan@HIDDEN> wrote:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
> > More generally, I'm not sure mailcap is the right tool for the job:
> > its main purpose is to view attachments to email messages, where we
> > generally have metadata (MIME etc.) which is not necessarily available
> > for arbitrary disk files.
>
> Isn't that just "file --mime-type -b"?  file is a BSD command AFAICT so
> it should presumably be available almost everywhere.
>
> I also see in the man page than a certain Reuben Thomas has been
> involved in its development so maybe he has something to add here.  :-)
>

I agree with Eli that mailcap is not the right tool for the job.

file's MIME-type support is easy to fix for types that don't (yet) have a
MIME type supplied; file is actively maintained and frequently released.
Note that xdg-open won't use file on a system that has its own MIME-type
handling, such as GNOME.

-- 
https://rrt.sc3d.org

--00000000000051e0ec05cf04cc4d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Sat, 23 Oct 2021 at 10:48, Stefan Kangas &lt;<a href=3D"mailto:st=
efan@HIDDEN">stefan@HIDDEN</a>&gt; wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">Eli Zaretskii &lt;<a href=3D"mailto:eliz@=
gnu.org" target=3D"_blank">eliz@HIDDEN</a>&gt; writes:<br>
<br>
&gt; More generally, I&#39;m not sure mailcap is the right tool for the job=
:<br>
&gt; its main purpose is to view attachments to email messages, where we<br=
>
&gt; generally have metadata (MIME etc.) which is not necessarily available=
<br>
&gt; for arbitrary disk files.<br>
<br>
Isn&#39;t that just &quot;file --mime-type -b&quot;?=C2=A0 file is a BSD co=
mmand AFAICT so<br>
it should presumably be available almost everywhere.<br>
<br>
I also see in the man page than a certain Reuben Thomas has been<br>
involved in its development so maybe he has something to add here.=C2=A0 :-=
)<br>
</blockquote></div><br clear=3D"all"><div><div style=3D"font-family:arial,h=
elvetica,sans-serif;font-size:small" class=3D"gmail_default">I agree with E=
li that mailcap is not the right tool for the job.</div><div style=3D"font-=
family:arial,helvetica,sans-serif;font-size:small" class=3D"gmail_default">=
<br></div><div style=3D"font-family:arial,helvetica,sans-serif;font-size:sm=
all" class=3D"gmail_default">file&#39;s MIME-type support is easy to fix fo=
r types that don&#39;t (yet) have a MIME type supplied; file is actively ma=
intained and frequently released. Note that xdg-open won&#39;t use file on =
a system that has its own MIME-type handling, such as GNOME.<br></div></div=
><div><br></div>-- <br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=
=3D"ltr"><div><div dir=3D"ltr"><a href=3D"https://rrt.sc3d.org" target=3D"_=
blank">https://rrt.sc3d.org</a></div></div></div></div></div>

--00000000000051e0ec05cf04cc4d--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 13:02:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 09:02:00 2021
Received: from localhost ([127.0.0.1]:34660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meGeu-0000rF-F8
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:02:00 -0400
Received: from mail-pl1-f174.google.com ([209.85.214.174]:44712)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rrt@HIDDEN>) id 1meGeq-0000qx-3K
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 09:01:58 -0400
Received: by mail-pl1-f174.google.com with SMTP id t11so4639963plq.11
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 06:01:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=GntigtZRpeffG1TRnCZGJGxpWZzr0xkoArolpz1Th68=;
 b=ZqdtqydKQXIqGk1tCjX6A1JZNuffTifmAm1F3HVBAYsRDPIwqwc/Hq7/UT83U9CxG+
 enfPBe/lF8+dnVmo4WaStXcsdqQuiSnMaUCe8F3W2WraZzsSPeThSADMo39SKiVN26i/
 BI0uJj4NDyFntvAHH+Kl7whgWhRNGPbY4r8fs=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=GntigtZRpeffG1TRnCZGJGxpWZzr0xkoArolpz1Th68=;
 b=q4Ez5IWgfXkqjZpnL3hVoqrSGPdPDDpR4X+o7w3e+wnrfZxsHKCCMtvhhllBMhzJHy
 reTwWrjSpUyPugx4NDhPB0gd1fJ36VY/26JkY59lsI4eAf2dCRkCIuSDfbibwjx9BgwR
 GLBeB9S8/fS/t0bs4xhWdICmuluUYu1RXVmPXeZsyq2akNosTe/4+oEVu5lz71Ij02oX
 VBjDOQn6TvwT090SxwohAFLt6M2rAPVtlIiCRWUwzpve4+GcwK/FuJrAq6VMQ5DYOwYX
 q+OS8VKAJnnftkIwQQ8XyLWWjWaVSbWsO3rFTxvTxEB531BU2RRjRQHh0uErV71XCTxw
 hUgw==
X-Gm-Message-State: AOAM530QEjWtY6Nv4KNnliGlgvSJkdbuFK53HRbdoqHUmM5rSlHk0bIu
 ZBVvxK0UDi5XwDu2bfc6a3KmBEm+mIURVqNOnhB4Sw==
X-Google-Smtp-Source: ABdhPJwXqniFCY9dWC5KKktDO8txyly467Bj/7PC71Bq1G9Ln/kRoG40bNxtcHkHn3KvXwHd2K97skVzuj9+GTq5SiA=
X-Received: by 2002:a17:902:d718:b0:13d:e2ec:1741 with SMTP id
 w24-20020a170902d71800b0013de2ec1741mr5806908ply.38.1634994110176; Sat, 23
 Oct 2021 06:01:50 -0700 (PDT)
MIME-Version: 1.0
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
In-Reply-To: <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
From: Reuben Thomas <rrt@HIDDEN>
Date: Sat, 23 Oct 2021 14:01:39 +0100
Message-ID: <CAOnWdojTXD0QvKDn8V6x4Unja6qZuZZ3Q1KqqU2yEDLNKRmNig@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Stefan Kangas <stefan@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000025b4e105cf04bb1e"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 18132
Cc: Eli Zaretskii <eliz@HIDDEN>, 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000025b4e105cf04bb1e
Content-Type: text/plain; charset="UTF-8"

On Sat, 23 Oct 2021 at 09:16, Stefan Kangas <stefan@HIDDEN> wrote:

>
> That sounds like exactly the right thing to do.  So we need to add stuff
> here, without taking anything away.
>

That would be a shame: there are too many things in Emacs that just get
more complicated over time. I'm dubious about the utility of
system-independent configuration here too.

Looking even more closely at this, I guess `xdg-open' could be used as
> some final fallback, but it doesn't seem to add anything that isn't
> already available from mailcap?


xdg-open uses the underlying desktop system's MIME infrastructure. For a
GNU system, that would most typically be GNOME, and its "gio open" (or on
older systems, gvfs-open) command.

-- 
https://rrt.sc3d.org

--00000000000025b4e105cf04bb1e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr"><span class=3D"gmail_default" style=3D"font-family:arial,helvetica,s=
ans-serif;font-size:small"></span>On Sat, 23 Oct 2021 at 09:16, Stefan Kang=
as &lt;<a href=3D"mailto:stefan@HIDDEN">stefan@HIDDEN</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
That sounds like exactly the right thing to do.=C2=A0 So we need to add stu=
ff<br>
here, without taking anything away.<br></blockquote><div><br></div><div><di=
v style=3D"font-family:arial,helvetica,sans-serif;font-size:small" class=3D=
"gmail_default">That would be a shame: there are too many things in Emacs t=
hat just get more complicated over time. I&#39;m dubious about the utility =
of system-independent configuration here too.<br></div><br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex">

Looking even more closely at this, I guess `xdg-open&#39; could be used as<=
br>
some final fallback, but it doesn&#39;t seem to add anything that isn&#39;t=
<br>
already available from mailcap?</blockquote><div><br></div><div><div style=
=3D"font-family:arial,helvetica,sans-serif;font-size:small" class=3D"gmail_=
default">xdg-open uses the underlying desktop system&#39;s MIME infrastruct=
ure. For a GNU system, that would most typically be GNOME, and its &quot;gi=
o open&quot; (or on older systems, gvfs-open) command.</div><br></div>-- <b=
r></div><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><d=
iv dir=3D"ltr"><a href=3D"https://rrt.sc3d.org" target=3D"_blank">https://r=
rt.sc3d.org</a></div></div></div></div></div>

--00000000000025b4e105cf04bb1e--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 11:48:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 07:48:25 2021
Received: from localhost ([127.0.0.1]:34525 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meFVh-0007LA-29
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 07:48:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49198)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1meFVf-0007Kw-OT
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 07:48:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58482)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1meFVZ-0002YH-P9; Sat, 23 Oct 2021 07:48:17 -0400
Received: from [87.69.77.57] (port=2406 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1meFVZ-0003es-Ak; Sat, 23 Oct 2021 07:48:17 -0400
Date: Sat, 23 Oct 2021 14:48:06 +0300
Message-Id: <83a6j055e1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkmmBAT7XchCZxPfesNf0CCYqEDzTocgsaWYoC5FsoOon9g@HIDDEN>
 (message from Stefan Kangas on Sat, 23 Oct 2021 02:48:19 -0700)
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <83h7d85ec3.fsf@HIDDEN>
 <CADwFkmmBAT7XchCZxPfesNf0CCYqEDzTocgsaWYoC5FsoOon9g@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org, rrt@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Sat, 23 Oct 2021 02:48:19 -0700
> Cc: rrt@HIDDEN, 18132 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > More generally, I'm not sure mailcap is the right tool for the job:
> > its main purpose is to view attachments to email messages, where we
> > generally have metadata (MIME etc.) which is not necessarily available
> > for arbitrary disk files.
> 
> Isn't that just "file --mime-type -b"?  file is a BSD command AFAICT so
> it should presumably be available almost everywhere.

It isn't available on Windows, for starters.  (I do have it, but I
ported it myself.)

And what about files that have no MIME type defined for them?  Or
where 'file's output is not really useful, like this:

  $ file --mime-type -b elisp.info
  application/octet-stream




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 09:48:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 05:48:28 2021
Received: from localhost ([127.0.0.1]:34411 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meDdc-0003vw-4I
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 05:48:28 -0400
Received: from mail-pj1-f51.google.com ([209.85.216.51]:51934)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1meDdZ-0003vi-MK
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 05:48:26 -0400
Received: by mail-pj1-f51.google.com with SMTP id u12so553987pjy.1
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 02:48:25 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=mZjfyGRcUlW61sLXlL+w9mG9sWkZiHnMshVx297+h9A=;
 b=UDY/pd1XmI3I74vWigm6d+FlPVKSmQWFQm4PwHnff1l+MF/e5CFGiTZsaDMXPSfG9x
 yZJjbkylKnbwTffJliKkaEW+7Lf0MzPYt8EP4C1iUX6TDMRFSmvHaAlzYeE+KuJj28Tk
 jw+JqVvsaRivCs3A1g5955utEdy7bs1AzsD/wR+kTxUdFq+0JOFLZVEq7UxsTSdCQPkw
 ORTY0qRt+gG/XGCDNNjU5SX7Dy3ne7A6TnSZ6EnkV1PYl9Fp5XYGq7HtVdoaMWSnAwzS
 eyonG31llHqEeUhhU1cv9Wy0JRHcYVlvia9hdPahtU2UtEcmiwMb0vZYkX76HuzPVWzp
 ASMw==
X-Gm-Message-State: AOAM531mDaTFxbJVZMMp24gkiuXMdjnZLD2E4WI83na6gS6JUcLQIEG3
 Sv29L57leZNim94NpBSsRlUSxJldOVrgEdFSXxQ=
X-Google-Smtp-Source: ABdhPJwE2hJ2bZ6/gI1yiZGtfLb5jDP+1fnoSM0u+oK7QO+ypZXmlRJVxK7kviW6H/bchp2Ww5ieUQ0jB2S4oxrPnQo=
X-Received: by 2002:a17:90a:245:: with SMTP id
 t5mr5732378pje.133.1634982500037; 
 Sat, 23 Oct 2021 02:48:20 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 23 Oct 2021 02:48:19 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <83h7d85ec3.fsf@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 <83h7d85ec3.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sat, 23 Oct 2021 02:48:19 -0700
Message-ID: <CADwFkmmBAT7XchCZxPfesNf0CCYqEDzTocgsaWYoC5FsoOon9g@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org, rrt@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

> More generally, I'm not sure mailcap is the right tool for the job:
> its main purpose is to view attachments to email messages, where we
> generally have metadata (MIME etc.) which is not necessarily available
> for arbitrary disk files.

Isn't that just "file --mime-type -b"?  file is a BSD command AFAICT so
it should presumably be available almost everywhere.

I also see in the man page than a certain Reuben Thomas has been
involved in its development so maybe he has something to add here.  :-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 08:35:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 04:35:19 2021
Received: from localhost ([127.0.0.1]:34322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meCUo-0008N1-Id
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 04:35:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52824)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1meCUl-0008Ml-TT
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 04:35:16 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55150)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1meCUf-0000fk-TU; Sat, 23 Oct 2021 04:35:09 -0400
Received: from [87.69.77.57] (port=2203 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1meCUc-0004cA-M5; Sat, 23 Oct 2021 04:35:09 -0400
Date: Sat, 23 Oct 2021 11:34:52 +0300
Message-Id: <83h7d85ec3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
 (message from Stefan Kangas on Sat, 23 Oct 2021 01:16:48 -0700)
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
 <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org, rrt@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Sat, 23 Oct 2021 01:16:48 -0700
> Cc: rrt@HIDDEN, 18132 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > It's not only that.  Emacs's ability to run programs given a file can
> > extend and surpass those of the underlying OS, and the ability of
> > Emacs users to configure and customize that in a unified
> > system-independent manner are either better or simply not available at
> > all in the OS-level tools which offer similar functionality.
> >
> > So I think it would be nice to extend dired-guess-shell-* so that it
> > could delegate to the OS-level capabilities like xdg-open or
> > w32-shell-execute, but we should preserve the abilities to override or
> > extend that with Emacs-level associations between files and programs.
> 
> That sounds like exactly the right thing to do.  So we need to add stuff
> here, without taking anything away.

Yes, that's the idea.

> However, I will add that while we maintain our current capabilities for
> customization, we might want to consider removing or updating some
> entries from `dired-guess-shell-alist-default'.  For example, we
> currently recommend xpdf for PDF:s, which, sure, is presumably available
> "everywhere", but also is pretty lacking in features and just plain
> clunky compared to something like evince.
> 
> To make matters even worse,
> 
>     emacs -Q --eval "(progn (require 'dired-x) (dired \"~\"))"
> 
> happily offers up xpdf as the default command for PDF:s even though I
> don't even have xpdf installed!  So perhaps it's not that ubiquitous
> these days... you have to specifically install it to even have it.

I think that's a separate issue: how to deal with a failure to invoke
the program which we guessed would be appropriate for the file in
question.  I could argue that we should try invoking the program
anyway, because failure to invoke it could mean the user should
install some component, and that is useful information for the user.

> Looking even more closely at this, I guess `xdg-open' could be used as
> some final fallback, but it doesn't seem to add anything that isn't
> already available from mailcap?  And we already have
> `mailcap-file-default-commands', so why not just provide a default based
> on that?

Because that's not portable enough?

> On my machine, I get the very reasonable:
> 
>     (mailcap-file-default-commands '("foo.pdf"))
>     => ("evince" "xdg-open")

Here, the above returns something much less useful:

  ("pdftotext ? -" "gv -safer")

None of that would have helped me to view a PDF file.

So if we want to use mailcap for this, we'd need to extend that, and
make it smarter, in particular on non-GNU/Linux platforms.

More generally, I'm not sure mailcap is the right tool for the job:
its main purpose is to view attachments to email messages, where we
generally have metadata (MIME etc.) which is not necessarily available
for arbitrary disk files.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 08:16:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 04:16:57 2021
Received: from localhost ([127.0.0.1]:34300 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meCD3-0007tn-CK
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 04:16:57 -0400
Received: from mail-pf1-f181.google.com ([209.85.210.181]:38655)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1meCD1-0007tZ-GV
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 04:16:56 -0400
Received: by mail-pf1-f181.google.com with SMTP id k26so5730608pfi.5
 for <18132 <at> debbugs.gnu.org>; Sat, 23 Oct 2021 01:16:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:mime-version:date
 :message-id:subject:to:cc;
 bh=ovjPY4SOWG8lwVvQtFig6GhdGVmHDiEqB/j2uZaGWDE=;
 b=5A0dbq0Rc00aYqXUVNEWs9i/JEHyA8Usu9iiBb83Ay/TU9waqCulX9+Xp6xnzVtUHl
 NzJlxJvuNzWhU/QTjGqzhuJhsLFEU2XSXy+QwJzUn/wcGrq27ltpGHaCiydZaBp22O/K
 esUnC1eDP2oBG+6f1aOu39tefnf91gWEiairQ/Dtlc7V2dEY8WCag61wsB5msC3NnM5g
 4iacLXoRlkCYlqONPAp94rS2GGFv8GSg/EuwdXPudxc+LEk8ux3RoMuCIxKaTmUuKV3S
 9iIsiXm83ClKVItyg7jts22EW5TkT1SHsxqw3OlwERo7/xSgjUOp3kS5RnLK5PZQnRJS
 QrZw==
X-Gm-Message-State: AOAM533jWnwwgxuL+LW5Gm25zf4dui6lmC2URU4fIboOaQoUCopVSXXw
 Gz6pBIbFyZ5vLTcU0BXMfpGkAJ6e35FqhA0v7Jc=
X-Google-Smtp-Source: ABdhPJzpK79qu7vx4WQm4CpERNz1JSl+uig8VUkLKQnVI9udOOcz1IYC0amL+lA1IKs2mkkAVs5PLXXH+yxhfjI3Elg=
X-Received: by 2002:aa7:978b:0:b0:44c:abf1:a8b8 with SMTP id
 o11-20020aa7978b000000b0044cabf1a8b8mr5091264pfp.35.1634977009641; Sat, 23
 Oct 2021 01:16:49 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 23 Oct 2021 01:16:48 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <83lf2k5gna.fsf@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 <83lf2k5gna.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sat, 23 Oct 2021 01:16:48 -0700
Message-ID: <CADwFkmmP5tgu8eJCRqdbqwbqezHbjkQxtsotwhPszF9_ECdJzA@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org, rrt@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

> It's not only that.  Emacs's ability to run programs given a file can
> extend and surpass those of the underlying OS, and the ability of
> Emacs users to configure and customize that in a unified
> system-independent manner are either better or simply not available at
> all in the OS-level tools which offer similar functionality.
>
> So I think it would be nice to extend dired-guess-shell-* so that it
> could delegate to the OS-level capabilities like xdg-open or
> w32-shell-execute, but we should preserve the abilities to override or
> extend that with Emacs-level associations between files and programs.

That sounds like exactly the right thing to do.  So we need to add stuff
here, without taking anything away.

However, I will add that while we maintain our current capabilities for
customization, we might want to consider removing or updating some
entries from `dired-guess-shell-alist-default'.  For example, we
currently recommend xpdf for PDF:s, which, sure, is presumably available
"everywhere", but also is pretty lacking in features and just plain
clunky compared to something like evince.

To make matters even worse,

    emacs -Q --eval "(progn (require 'dired-x) (dired \"~\"))"

happily offers up xpdf as the default command for PDF:s even though I
don't even have xpdf installed!  So perhaps it's not that ubiquitous
these days... you have to specifically install it to even have it.

Looking even more closely at this, I guess `xdg-open' could be used as
some final fallback, but it doesn't seem to add anything that isn't
already available from mailcap?  And we already have
`mailcap-file-default-commands', so why not just provide a default based
on that?

On my machine, I get the very reasonable:

    (mailcap-file-default-commands '("foo.pdf"))
    => ("evince" "xdg-open")

So why not just move the guessing stuff over to dired.el, re-base it on
mailcap, and minimize the list in `dired-guess-shell-alist-default' to
something more reasonable.  Perhaps that list could be just nil by
default if we have the usual mailcap stuff?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 07:45:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 03:45:28 2021
Received: from localhost ([127.0.0.1]:34270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1meBiZ-0004w1-V9
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 03:45:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1meBiV-0004vm-Q7
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 03:45:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53768)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1meBiO-00031y-V7; Sat, 23 Oct 2021 03:45:16 -0400
Received: from [87.69.77.57] (port=2893 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1meBiI-0006os-Lz; Sat, 23 Oct 2021 03:45:15 -0400
Date: Sat, 23 Oct 2021 10:44:57 +0300
Message-Id: <83lf2k5gna.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
 (message from Stefan Kangas on Fri, 22 Oct 2021 22:25:09 -0700)
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org, rrt@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Kangas <stefan@HIDDEN>
> Date: Fri, 22 Oct 2021 22:25:09 -0700
> Cc: 18132 <at> debbugs.gnu.org
> 
> Reuben Thomas <rrt@HIDDEN> writes:
> 
> > 1. Do other maintainers agree that it is sensible to remove Emacs's
> > duplicated mechanism for guessing which command to run on a given
> > filetype, and instead use a system mechanism (according to the
> > underlying system)?
> 
> I agree, but I will add that it would be very nice if we don't lose the
> capability of seeing which command will be run on a file when typing &
> (dired-do-async-shell-command) on a file in Dired.  It sucks when the
> default only says "xdg-open", as you don't know what program that will
> open or if it is indeed the one you want.

It's not only that.  Emacs's ability to run programs given a file can
extend and surpass those of the underlying OS, and the ability of
Emacs users to configure and customize that in a unified
system-independent manner are either better or simply not available at
all in the OS-level tools which offer similar functionality.

So I think it would be nice to extend dired-guess-shell-* so that it
could delegate to the OS-level capabilities like xdg-open or
w32-shell-execute, but we should preserve the abilities to override or
extend that with Emacs-level associations between files and programs.

> > 2. I assume that for reasons of backward compatibility it would not be
> > acceptable immediately to remove dired-guess-shell-*, hence my
> > suggestion to implement step 1 in the first instance by supplying a
> > new default value for dired-guess-shell-alist-default. If later this
> > variable could be deprecated and replaced with a simple function, so
> > much the better.
> 
> Right, we can't just remove it outright.

I'm not sure I understand what exactly is proposed here as "step 1",
but it sounds like it's the same as my "extend dired-guess-shell-*"
proposal above?  Then I agree, of course, I just think that we don't
need to do anything else, and in particular we should never remove the
ability of Emacs users to augment/extend/override those system-level
facilities.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 05:25:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 23 01:25:17 2021
Received: from localhost ([127.0.0.1]:34151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1me9Wv-0001D9-9C
	for submit <at> debbugs.gnu.org; Sat, 23 Oct 2021 01:25:17 -0400
Received: from mail-pj1-f50.google.com ([209.85.216.50]:43644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1me9Wt-0001Cq-4l
 for 18132 <at> debbugs.gnu.org; Sat, 23 Oct 2021 01:25:16 -0400
Received: by mail-pj1-f50.google.com with SMTP id
 k2-20020a17090ac50200b001a218b956aaso248075pjt.2
 for <18132 <at> debbugs.gnu.org>; Fri, 22 Oct 2021 22:25:15 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc;
 bh=F4muWsel3OfhOKsXUG1ea0mxsLpEkqnRfbZeqZ+QQ84=;
 b=PJ70XAOUV3ndSeY50IJN13SuGFbV9mpxO6W9sRhT3SoAYrtaoQT6qyFwV5PRoZgMZa
 vAcYyLDfU9NN/0PYCDaz8ATaLItkRXG7J7tZcDQ3cmE+z2ueIxH86hdT1huzng9KcaLx
 LDeeaGLZ3JMNAkTEQyRhSpV5smbGVxC7WHwmJxMl/D4PNuOnPyI/hhEnWPkFPS/c/mef
 xkTkRiYCYl1OYF3moy52VNXf01cs4D+QmQ27G5pcF+ddktekDRAWx1WvvjkGFVm6wmQ3
 thIxanG43F6VCuMqnMWAZaoWlPpySwF76wBDwe+Do/NORAz5lHh/EMpXiiczWMt0Qqs1
 WhlA==
X-Gm-Message-State: AOAM530tAX8LVPE3wqSLUK9+D93+N+l5XOu6QvOD2hpZGaklbRUJkzBJ
 x4bF2tBwEb0XFR3CST4x5hXp4ShHCABRea6zyLo=
X-Google-Smtp-Source: ABdhPJzX7XaJ9bgj8nZnhN4af96yCxWTXdsQ9CGP4GUJ64g8q+r/Ax4n4WSSl+9/LXXjih1ai5aiaM4mckIq0WjBMYI=
X-Received: by 2002:a17:90b:3b86:: with SMTP id
 pc6mr2271380pjb.143.1634966709519; 
 Fri, 22 Oct 2021 22:25:09 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 22 Oct 2021 22:25:09 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
 (Reuben Thomas's message of "Tue, 5 Aug 2014 10:41:48 +0100")
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
 <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Date: Fri, 22 Oct 2021 22:25:09 -0700
Message-ID: <CADwFkmkgn6Kp8CULr4pe0wj1-gZfm3t183x-bnGLubOwnfaBSw@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
To: Reuben Thomas <rrt@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 18132
Cc: Juri Linkov <juri@HIDDEN>, 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Reuben Thomas <rrt@HIDDEN> writes:

> Unfortunately, we seem to have strayed from my question, "can I
> replace dired-guess-shell-* with a function that calls a suitable
> file-type dispatcher (xdg-open, open, w32-shell-execute &c.)" to a
> discussion of mailcap support, which is related, but perhaps better
> dealt with separately (given that I'm talking about removing, not
> adding, functionality from Emacs).
>
> I was really trying to address two concerns:
>
> 1. Do other maintainers agree that it is sensible to remove Emacs's
> duplicated mechanism for guessing which command to run on a given
> filetype, and instead use a system mechanism (according to the
> underlying system)?

I agree, but I will add that it would be very nice if we don't lose the
capability of seeing which command will be run on a file when typing &
(dired-do-async-shell-command) on a file in Dired.  It sucks when the
default only says "xdg-open", as you don't know what program that will
open or if it is indeed the one you want.

Does xdg-open have the capability to just print what it would run
without actually executing it?  I can't see such a flag on Debian
stable/bookworm.  If that is missing, should we perhaps add a feature
request for it?

https://www.freedesktop.org/wiki/Software/xdg-utils/

But in that case, we would need to check for that capability first,
somehow...

> 2. I assume that for reasons of backward compatibility it would not be
> acceptable immediately to remove dired-guess-shell-*, hence my
> suggestion to implement step 1 in the first instance by supplying a
> new default value for dired-guess-shell-alist-default. If later this
> variable could be deprecated and replaced with a simple function, so
> much the better.

Right, we can't just remove it outright.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 5 Aug 2014 09:41:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 05 05:41:59 2014
Received: from localhost ([127.0.0.1]:58274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XEbFm-0002Hz-87
	for submit <at> debbugs.gnu.org; Tue, 05 Aug 2014 05:41:58 -0400
Received: from mail-la0-f51.google.com ([209.85.215.51]:45224)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rrt@HIDDEN>) id 1XEbFi-0002Hk-Tc
 for 18132 <at> debbugs.gnu.org; Tue, 05 Aug 2014 05:41:56 -0400
Received: by mail-la0-f51.google.com with SMTP id pn19so512270lab.10
 for <18132 <at> debbugs.gnu.org>; Tue, 05 Aug 2014 02:41:48 -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=qRrfbmmIIAk1KjwkN7HtxrnC+XK24zhyATZypO3CIjI=;
 b=tCgvBLdKCl8lKVrEQWkqqK252QDwOkuv8piSSg5Ulo9EeHR3PS6stb1JHWj+J5c9p1
 0EDypAiRh4M8s7Qy89VUa/Jq2+JzyHDmVBjIJEg2Evevjl1WLI/QaIfa1IXxgFI6XO5K
 /Tgib7c+IwQzGoFCHjXl7ij8FDt6ll7RC8g9U=
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=qRrfbmmIIAk1KjwkN7HtxrnC+XK24zhyATZypO3CIjI=;
 b=PWAum/IQb85Y/ykJfPk/g2gbmCR2ID4b+IuL2fzL6VcB/KCl5eprN1tpfcmJ5UQrY9
 fWyptgwv/NY9lgYa8UZJ8m8OtessFtsjSQZQedMbAGCnkYqbseyJXsp38NLpeVKmTi0v
 KSW7RTYuJ54KwBsP7wuYvOWp5TLPKG5k271fjOpIN96WUqF1A8AHHz6GbT8c2H+CVunK
 BEVaUCr2ucFKeCoYswXlscIW2rX3s8kXeasTTVaIdvXmIFLJDffdPf0tsj9xynZfb0c+
 RXRd+JFsymhOZIA80x15ZhKyp2qukTtrcGqvbuayCH7rWCCGccUIJP01DXMKNNGfbawS
 d2yA==
X-Gm-Message-State: ALoCoQmD4UNAlS1abtvFgxgaPg27NhvXHx7DAINrFwA3E+QC2eb1Uc1o685NNZLJ2ti4GzwMQxLR
MIME-Version: 1.0
X-Received: by 10.112.138.195 with SMTP id qs3mr2556857lbb.49.1407231708695;
 Tue, 05 Aug 2014 02:41:48 -0700 (PDT)
Received: by 10.152.246.10 with HTTP; Tue, 5 Aug 2014 02:41:48 -0700 (PDT)
In-Reply-To: <87silbstsc.fsf@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 <87silbstsc.fsf@HIDDEN>
Date: Tue, 5 Aug 2014 10:41:48 +0100
Message-ID: <CAOnWdogh6UiaRCeuxLCj0p9cMqhCBOUwD1Rfsn1RUcGvLROP7Q@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
From: Reuben Thomas <rrt@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary=089e011609d01d39ed04ffdeaab9
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--089e011609d01d39ed04ffdeaab9
Content-Type: text/plain; charset=UTF-8

On 5 August 2014 00:45, Juri Linkov <juri@HIDDEN> wrote:

> > I'm sorry if I've missed something, but I don't see what this has to do
> > with run-mailcap.
>
> run-mailcap always runs the first alternative, but with
> `mailcap-file-default-commands' you can select a command
> to run using several M-n.
>
> ...

>
> Instead of customization, a more useful UI would be to remember
> the most frequently used commands, and provide them at the top
> of the completions in the minibuffer.
>

Unfortunately, we seem to have strayed from my question, "can I replace
dired-guess-shell-* with a function that calls a suitable file-type
dispatcher (xdg-open, open, w32-shell-execute &c.)" to a discussion of
mailcap support, which is related, but perhaps better dealt with separately
(given that I'm talking about removing, not adding, functionality from
Emacs).

I was really trying to address two concerns:

1. Do other maintainers agree that it is sensible to remove Emacs's
duplicated mechanism for guessing which command to run on a given filetype,
and instead use a system mechanism (according to the underlying system)?

2. I assume that for reasons of backward compatibility it would not be
acceptable immediately to remove dired-guess-shell-*, hence my suggestion
to implement step 1 in the first instance by supplying a new default value
for dired-guess-shell-alist-default. If later this variable could be
deprecated and replaced with a simple function, so much the better.

-- 
http://rrt.sc3d.org

--089e011609d01d39ed04ffdeaab9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 5=
 August 2014 00:45, Juri Linkov <span dir=3D"ltr">&lt;<a href=3D"mailto:jur=
i@HIDDEN" target=3D"_blank">juri@HIDDEN</a>&gt;</span> wrote:<br><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex">
<div class=3D"">&gt; I&#39;m sorry if I&#39;ve missed something, but I don&=
#39;t see what this has to do<br>
&gt; with run-mailcap.<br>
<br>
</div>run-mailcap always runs the first alternative, but with<br>
`mailcap-file-default-commands&#39; you can select a command<br>
to run using several M-n.<br>
<div class=3D""><br></div></blockquote><div>... <br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div class=3D"">
<br>
</div>Instead of customization, a more useful UI would be to remember<br>
the most frequently used commands, and provide them at the top<br>
of the completions in the minibuffer.<br>
</blockquote><div><br></div><div>Unfortunately, we seem to have strayed fro=
m my question, &quot;can I replace dired-guess-shell-* with a function that=
 calls a suitable file-type dispatcher (xdg-open, open, w32-shell-execute &=
amp;c.)&quot; to a discussion of mailcap support, which is related, but per=
haps better dealt with separately (given that I&#39;m talking about removin=
g, not adding, functionality from Emacs).<br>
<br></div><div>I was really trying to address two concerns:<br><br></div><d=
iv>1. Do other maintainers agree that it is sensible to remove Emacs&#39;s =
duplicated mechanism for guessing which command to run on a given filetype,=
 and instead use a system mechanism (according to the underlying system)?<b=
r>
<br></div><div>2. I assume that for reasons of backward compatibility it wo=
uld not be acceptable immediately to remove dired-guess-shell-*, hence my s=
uggestion to implement step 1 in the first instance by supplying a new defa=
ult value for dired-guess-shell-alist-default. If later this variable could=
 be deprecated and replaced with a simple function, so much the better.<br>
</div></div><br>-- <br><a href=3D"http://rrt.sc3d.org">http://rrt.sc3d.org<=
/a>
</div></div>

--089e011609d01d39ed04ffdeaab9--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 5 Aug 2014 00:10:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 04 20:10:45 2014
Received: from localhost ([127.0.0.1]:58010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XESKy-0003JD-Ch
	for submit <at> debbugs.gnu.org; Mon, 04 Aug 2014 20:10:44 -0400
Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:58440
 helo=ps18281.dreamhostps.com)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <juri@HIDDEN>) id 1XESKv-0003Iy-Eu
 for 18132 <at> debbugs.gnu.org; Mon, 04 Aug 2014 20:10:42 -0400
Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226])
 by ps18281.dreamhostps.com (Postfix) with ESMTP id 0C5453094551C1;
 Mon,  4 Aug 2014 17:10:39 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Reuben Thomas <rrt@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
Organization: JURTA
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
 <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
Date: Tue, 05 Aug 2014 02:45:55 +0300
In-Reply-To: <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
 (Reuben Thomas's message of "Wed, 30 Jul 2014 17:44:13 +0100")
Message-ID: <87silbstsc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.4 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > I'm sorry if I've missed something, but I don't see what
 this has to do > with run-mailcap. run-mailcap always runs the first
 alternative, 
 but with `mailcap-file-default-commands' you can select a command to run
 using several M-n. [...] 
 Content analysis details:   (2.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
 [69.163.216.107 listed in zen.spamhaus.org]
 1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
 [69.163.216.107 listed in bb.barracudacentral.org]
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.4 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > I'm sorry if I've missed something, but I don't see what
    this has to do > with run-mailcap. run-mailcap always runs the first alternative,
    but with `mailcap-file-default-commands' you can select a command to run
   using several M-n. [...] 
 
 Content analysis details:   (2.4 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
                             [69.163.216.107 listed in zen.spamhaus.org]
  1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
                             [69.163.216.107 listed in bb.barracudacentral.org]

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

run-mailcap always runs the first alternative, but with
`mailcap-file-default-commands' you can select a command
to run using several 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.

Instead of customization, a more useful UI would be to remember
the most frequently used commands, and provide them at the top
of the completions in the minibuffer.

> 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!)

Yes, this is so when the prompt displays the default value.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 30 Jul 2014 16:44:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 30 12:44:23 2014
Received: from localhost ([127.0.0.1]:52043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XCWzH-0006fX-5I
	for submit <at> debbugs.gnu.org; Wed, 30 Jul 2014 12:44:23 -0400
Received: from mail-la0-f47.google.com ([209.85.215.47]:65259)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rrt@HIDDEN>) id 1XCWzD-0006fJ-ND
 for 18132 <at> debbugs.gnu.org; Wed, 30 Jul 2014 12:44:21 -0400
Received: by mail-la0-f47.google.com with SMTP id mc6so1137708lab.34
 for <18132 <at> debbugs.gnu.org>; Wed, 30 Jul 2014 09:44:13 -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=2GfkD9Dr9auYjN10lIRGnJLUKQRJpjQ9254uaWm/Qo8=;
 b=MPuFP/JbWeXBNMjTE9LMeRduVRpliubOIknxxRANuaqbv/ZmtwRC8ERSq1p2iKEtdB
 44lf98qruLeDEvvqODUIJuW8XfDYzGKap6qj8fsWR11QW72hlHTIFDYZZSexBN0G6bB1
 2evQfLTEji4xVKhcu1LXtCMHWFBaBDiDnmxa0=
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=2GfkD9Dr9auYjN10lIRGnJLUKQRJpjQ9254uaWm/Qo8=;
 b=FhN7GrFRFoXegnBFkSrM3Jmh7nitXTJTnNe0JuyW0w1CrqCObePSQDEdvUZkYMQNvD
 xY9CBKz0UHuyB8kzREAfUPTn88AUelT5XCgTaZFDZh++l6Hl4YBt/MRsKWjIiYKNqUEN
 TKb04rnXj3sbErM+1fG/iq0GRdSPDrC5nCpwMB88RkOUIjK3KKljleT0X3w2Gwl6ZtHY
 brfU7UK8X4NhxD8kgAriynNScpa1DyxtlZ4eZr3atRTJ7GiRy/C8NGNrPE47nRw/TJkj
 qJFYODXgLJ7FV9hNbe12bC+TiaOhUydkv+yWhhqPZPXaf611Hw21sdH5sUaAf2xt5sMw
 tdRg==
X-Gm-Message-State: ALoCoQnYzNBXnJApIdnyT34PtAzc9IJkBCOHlpOEFB6eWiUpqAfZgTt/0wNL52ziGWP4obZYK5ux
MIME-Version: 1.0
X-Received: by 10.152.202.197 with SMTP id kk5mr6059276lac.19.1406738653536;
 Wed, 30 Jul 2014 09:44:13 -0700 (PDT)
Received: by 10.152.163.4 with HTTP; Wed, 30 Jul 2014 09:44:13 -0700 (PDT)
In-Reply-To: <87bns6dcul.fsf@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 <87bns6dcul.fsf@HIDDEN>
Date: Wed, 30 Jul 2014 17:44:13 +0100
Message-ID: <CAOnWdoiiMd1fqrY=ZAXA4U9ctu0Vcx1BCj7B0U27A9sbJTdpkg@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
From: Reuben Thomas <rrt@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary=001a1135f8dcbc811604ff6bdd85
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a1135f8dcbc811604ff6bdd85
Content-Type: text/plain; charset=UTF-8

On 30 July 2014 17:32, Juri Linkov <juri@HIDDEN> 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

--001a1135f8dcbc811604ff6bdd85
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 3=
0 July 2014 17:32, Juri Linkov <span dir=3D"ltr">&lt;<a href=3D"mailto:juri=
@jurta.org" target=3D"_blank">juri@HIDDEN</a>&gt;</span> wrote:<br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex">
<div class=3D"">&gt;&gt; run-mailcap is fully supported by shell-command an=
d async-shell-command where<br>
&gt;&gt; the list of available commands can be accessed using M-n in its mi=
nibuffer.<br>
&gt;<br>
&gt; I can&#39;t see any mention of run-mailcap in the Emacs source; do you=
 mean<br>
&gt; simply that it&#39;s possible to add it to the list of commands used?<=
br>
<br>
</div>grep -nH mailcap *.el<br>
./dired-aux.el:558:(declare-function mailcap-file-default-commands &quot;ma=
ilcap&quot; (files))<br>
./dired-aux.el:562:This function is used to add all related commands retrie=
ved by `mailcap&#39;<br>
./dired-aux.el:565: =C2=A0(let ((commands (and (boundp &#39;files) (require=
 &#39;mailcap nil t)<br>
./dired-aux.el:566: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0(mailcap-file-default-commands files))))<br>
./simple.el:2743:(declare-function mailcap-file-default-commands &quot;mail=
cap&quot; (files))<br>
./simple.el:2748:This function is used to add all related commands retrieve=
d by `mailcap&#39;<br>
./simple.el:2754: =C2=A0 =C2=A0 =C2=A0 =C2=A0(commands (and filename (requi=
re &#39;mailcap nil t)<br>
./simple.el:2755: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 (mailcap-file-default-commands (list filename)))))<br>=
</blockquote><div><br></div><div>I&#39;m sorry if I&#39;ve missed something=
, but I don&#39;t see what this has to do with run-mailcap.<br>
</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We could leave the or=
iginal list intact, and add xdg-open/w32-shell-execute<br>
to the top of the list, so it would be the first suggestion that the user<b=
r>
will get after the first M-n.<br></blockquote><div><br></div><div>It would =
be good to discourage customization of dired-guess-shell-alist-{default,use=
r}, and steer users towards the non-program-specific mechanisms. It would a=
lso be good eventually not to have to maintain the list, or indeed the dire=
d-guess-shell mechanism at all.<br>
<br></div><div>As for your mention of &quot;the first M-n&quot;, 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 t=
yped it. So is &quot;the first suggestion that the user will get after the =
first M-n&quot; actually the same thing as &quot;the default suggestion&quo=
t;? (I hope so!)<br>
</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

There is a good example how to check its availability in<br>
`browse-url-can-use-xdg-open&#39; that could be moved<br>
to a more general file like simple.el.<br>
</blockquote></div><br></div><div class=3D"gmail_extra">Thanks for the poin=
ter.<br clear=3D"all"></div><div class=3D"gmail_extra"><br>-- <br><a href=
=3D"http://rrt.sc3d.org">http://rrt.sc3d.org</a>
</div></div>

--001a1135f8dcbc811604ff6bdd85--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 30 Jul 2014 16:37:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 30 12:37:07 2014
Received: from localhost ([127.0.0.1]:52028 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XCWsE-0006To-Cc
	for submit <at> debbugs.gnu.org; Wed, 30 Jul 2014 12:37:06 -0400
Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:51491
 helo=ps18281.dreamhostps.com)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <juri@HIDDEN>) id 1XCWsB-0006SY-Aw
 for 18132 <at> debbugs.gnu.org; Wed, 30 Jul 2014 12:37:04 -0400
Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226])
 by ps18281.dreamhostps.com (Postfix) with ESMTP id 589F93725F96A3;
 Wed, 30 Jul 2014 09:37:01 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Reuben Thomas <rrt@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
Organization: JURTA
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
 <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
Date: Wed, 30 Jul 2014 19:32:58 +0300
In-Reply-To: <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
 (Reuben Thomas's message of "Wed, 30 Jul 2014 10:12:40 +0100")
Message-ID: <87bns6dcul.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.4 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: >> 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? [...] 
 Content analysis details:   (2.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
 [69.163.216.107 listed in bb.barracudacentral.org]
 0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
 [69.163.216.107 listed in zen.spamhaus.org]
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.4 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  >> 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? [...] 
 
 Content analysis details:   (2.4 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
                             [69.163.216.107 listed in zen.spamhaus.org]
  1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
                             [69.163.216.107 listed in bb.barracudacentral.org]

>> 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)))))

> 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.

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.

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 30 Jul 2014 09:12:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 30 05:12:49 2014
Received: from localhost ([127.0.0.1]:42551 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XCPwH-0007WX-7C
	for submit <at> debbugs.gnu.org; Wed, 30 Jul 2014 05:12:49 -0400
Received: from mail-lb0-f171.google.com ([209.85.217.171]:33698)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rrt@HIDDEN>) id 1XCPwF-0007WJ-15
 for 18132 <at> debbugs.gnu.org; Wed, 30 Jul 2014 05:12:48 -0400
Received: by mail-lb0-f171.google.com with SMTP id l4so659065lbv.30
 for <18132 <at> 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
MIME-Version: 1.0
X-Received: by 10.152.43.34 with SMTP id t2mr3013626lal.28.1406711560710; Wed,
 30 Jul 2014 02:12:40 -0700 (PDT)
Received: by 10.152.163.4 with HTTP; Wed, 30 Jul 2014 02:12:40 -0700 (PDT)
In-Reply-To: <87d2cn67zo.fsf@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 <87d2cn67zo.fsf@HIDDEN>
Date: Wed, 30 Jul 2014 10:12:40 +0100
Message-ID: <CAOnWdoivtsBnHPhZWkjxNEqiMxfOwnYiU2eaoQEu4_3bjCx=JQ@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
From: Reuben Thomas <rrt@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11c35704e0bead04ff658ef6
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c35704e0bead04ff658ef6
Content-Type: text/plain; charset=UTF-8

On 30 July 2014 00:49, Juri Linkov <juri@HIDDEN> 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

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 3=
0 July 2014 00:49, Juri Linkov <span dir=3D"ltr">&lt;<a href=3D"mailto:juri=
@jurta.org" target=3D"_blank">juri@HIDDEN</a>&gt;</span> wrote:<br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex">
&gt; These days, there are mature programs for launching an arbitrary file =
with<br>
&gt; an appropriate viewer: run-mailcap (which is mature to the point of<br=
>
&gt; obsolescence) and<br>
<br>
run-mailcap is fully supported by shell-command and async-shell-command whe=
re<br>
the list of available commands can be accessed using M-n in its minibuffer.=
<br></blockquote><div><br></div><div>I can&#39;t see any mention of run-mai=
lcap in the Emacs source; do you mean simply that it&#39;s possible to add =
it to the list of commands used?<br>
</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

&gt; xdg-open on GNU systems; open on Mac OS X; start on MS Windows).<br>
<br>
xdg-open is a single command that is too easy to add to the top of this lis=
t.<br>
</blockquote></div><br></div><div class=3D"gmail_extra">Did you mean &quot;=
easy too&quot;?<br><br></div><div class=3D"gmail_extra">So, yes, both of th=
ese commands can be added.<br><br>My original point is that they&#39;re not=
 currently used; instead there is a custom list that has to be configured s=
eparately by the user from either of these.<br>
<br>Hence, I suggest using these commands (and similarly &quot;open&quot; o=
n Mac OS, and, as per Eli&#39;s suggestion, w32-shell-execute on Windows) i=
nstead of the current contents of dired-guess-shell-alist-default.<br><br>
</div><div class=3D"gmail_extra">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.<br>
</div><div class=3D"gmail_extra"><br>-- <br><a href=3D"http://rrt.sc3d.org"=
>http://rrt.sc3d.org</a>
</div></div>

--001a11c35704e0bead04ff658ef6--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 30 Jul 2014 03:56:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 29 23:56:04 2014
Received: from localhost ([127.0.0.1]:42456 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XCKzk-0007Df-2k
	for submit <at> debbugs.gnu.org; Tue, 29 Jul 2014 23:56:04 -0400
Received: from mtaout21.012.net.il ([80.179.55.169]:37324)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1XCKzg-0007D9-Pq
 for 18132 <at> debbugs.gnu.org; Tue, 29 Jul 2014 23:56:02 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0N9I00700A5CMZ00@HIDDEN> for 18132 <at> debbugs.gnu.org;
 Wed, 30 Jul 2014 06:55:53 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0N9I007WZAX5KJ70@HIDDEN>;
 Wed, 30 Jul 2014 06:55:53 +0300 (IDT)
Date: Wed, 30 Jul 2014 06:56:12 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#18132: Time for a smarter
 dired-guess-shell-alist-default?	(dired-x.el)
In-reply-to: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Reuben Thomas <rrt@HIDDEN>
Message-id: <83bns7ts83.fsf@HIDDEN>
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Mon, 28 Jul 2014 19:26:07 +0100
> From: Reuben Thomas <rrt@HIDDEN>
> 
> 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).

It would be a bad idea to use 'start' on Windows: it has too many
quirks regarding quoting of its command line.  Instead, just invoke
the existing primitive w32-shell-execute with the 'open' verb.  As a
nice side effect, this will support Unicode file names, something that
is currently impossible when you invoke an external command.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 29 Jul 2014 23:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 29 19:52:04 2014
Received: from localhost ([127.0.0.1]:42362 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XCHBc-0007Sv-3A
	for submit <at> debbugs.gnu.org; Tue, 29 Jul 2014 19:52:04 -0400
Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:34169
 helo=ps18281.dreamhostps.com)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <juri@HIDDEN>) id 1XCHBZ-0007SU-OX
 for 18132 <at> debbugs.gnu.org; Tue, 29 Jul 2014 19:52:02 -0400
Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226])
 by ps18281.dreamhostps.com (Postfix) with ESMTP id 5EE3D37E8E88E5;
 Tue, 29 Jul 2014 16:52:00 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Reuben Thomas <rrt@HIDDEN>
Subject: Re: bug#18132: Time for a smarter dired-guess-shell-alist-default?
 (dired-x.el)
Organization: JURTA
References: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
Date: Wed, 30 Jul 2014 02:49:31 +0300
In-Reply-To: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
 (Reuben Thomas's message of "Mon, 28 Jul 2014 19:26:07 +0100")
Message-ID: <87d2cn67zo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.4 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > 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. [...] 
 Content analysis details:   (2.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
 [69.163.216.107 listed in zen.spamhaus.org]
 1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
 [69.163.216.107 listed in bb.barracudacentral.org]
X-Debbugs-Envelope-To: 18132
Cc: 18132 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.4 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > 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. [...] 
 
 Content analysis details:   (2.4 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
                             [69.163.216.107 listed in zen.spamhaus.org]
  1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
                             [69.163.216.107 listed in bb.barracudacentral.org]

> 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.

> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at 18132 <at> debbugs.gnu.org:


Received: (at 18132) by debbugs.gnu.org; 28 Jul 2014 18:44:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 28 14:44:49 2014
Received: from localhost ([127.0.0.1]:41248 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XBpuf-0002ak-Fq
	for submit <at> debbugs.gnu.org; Mon, 28 Jul 2014 14:44:49 -0400
Received: from mail-la0-f53.google.com ([209.85.215.53]:55048)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rrt@HIDDEN>) id 1XBpua-0002aR-Fz
 for 18132 <at> debbugs.gnu.org; Mon, 28 Jul 2014 14:44:44 -0400
Received: by mail-la0-f53.google.com with SMTP id gl10so5858837lab.12
 for <18132 <at> debbugs.gnu.org>; Mon, 28 Jul 2014 11:44:34 -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=cIE3GgVKRT97YQrdOkMa5QlqF6OuqVLWEzXEiYzf1k4=;
 b=pgIG0JsNgwbhmBFvFYryGefN0EdadhkSL0Wcw7ub6YCbwW6two3fkZMRtjilnyC7zx
 W8H8Pn71FKIf9oPEajjxw3bNNcgbSDTwgi7ZuVTfby3uheKY6lWtPmG2MREjbuo8ivCk
 aeDwA6/0Xj5oDynGa96kvF9EoA7LPgLkWjWfQ=
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=cIE3GgVKRT97YQrdOkMa5QlqF6OuqVLWEzXEiYzf1k4=;
 b=TcACwngUNEBmLfA1f8+YHK+dZhFR/0/Yd80E8gMwWZG9OBUqElNT7A6KoAO5Ic8cZy
 KFShO9KoWQgLJHK9TP0nmTPCXoBrFBTVapZ6OM4CQuYptf+SVMvaWOlGKvAT1TewEcsq
 q6vjNWn6b4zx80ik81J9JprM3ZKe7sLrNJmCIIugc9zZhNR1jJ2WEOuMlnIVwlzJbzH2
 E3KsMkJYsm8aiRUBmkayGnEsAoTM4uhFLZ36EYuAFmGrIzoKsnrEuQpV/9JHvMooLFga
 x1qzq5mQbu9ldmbHaRMR2ThuJ8xAZqjAQNkiRgoOxe0ZjL+pIiIKI69UW0nAWIeIC9mt
 Eizw==
X-Gm-Message-State: ALoCoQkSyeqMc19IayU+03sttQIfS0BpGhPqOmXiQY9RnI6eoswW4kj8UJ0a5lwzmn5KZGNdG5eJ
MIME-Version: 1.0
X-Received: by 10.152.87.229 with SMTP id bb5mr11663848lab.75.1406573074092;
 Mon, 28 Jul 2014 11:44:34 -0700 (PDT)
Received: by 10.152.163.4 with HTTP; Mon, 28 Jul 2014 11:44:34 -0700 (PDT)
Date: Mon, 28 Jul 2014 19:44:34 +0100
Message-ID: <CAOnWdoiVB8YqOX_X=XNgKfbeP86X_VGZPA+Hkp=ehMYbizmmAQ@HIDDEN>
Subject: Sample code
From: Reuben Thomas <rrt@HIDDEN>
To: 18132 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary=001a11c34e066eaf8804ff45504c
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 18132
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c34e066eaf8804ff45504c
Content-Type: text/plain; charset=UTF-8

Xah Lee has already written some code to do this:

http://ergoemacs.org/emacs/emacs_dired_open_file_in_ext_apps.html

-- 
http://rrt.sc3d.org

--001a11c34e066eaf8804ff45504c
Content-Type: text/html; charset=UTF-8

<div dir="ltr">Xah Lee has already written some code to do this:<br><br><a href="http://ergoemacs.org/emacs/emacs_dired_open_file_in_ext_apps.html">http://ergoemacs.org/emacs/emacs_dired_open_file_in_ext_apps.html</a><br clear="all">
<br>-- <br><a href="http://rrt.sc3d.org">http://rrt.sc3d.org</a>
</div>

--001a11c34e066eaf8804ff45504c--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Jul 2014 18:26:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 28 14:26:36 2014
Received: from localhost ([127.0.0.1]:41229 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XBpd2-000272-9l
	for submit <at> debbugs.gnu.org; Mon, 28 Jul 2014 14:26:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44233)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rrt@HIDDEN>) id 1XBpcv-00026Z-9P
 for submit <at> debbugs.gnu.org; Mon, 28 Jul 2014 14:26:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1XBpcp-0004JA-1E
 for submit <at> debbugs.gnu.org; Mon, 28 Jul 2014 14:26:19 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,HTML_MESSAGE,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38155)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rrt@HIDDEN>)
 id 1XBpco-0004J6-Ue
 for submit <at> debbugs.gnu.org; Mon, 28 Jul 2014 14:26:18 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45948)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1XBpcn-0000kU-Ph
 for bug-gnu-emacs@HIDDEN; Mon, 28 Jul 2014 14:26:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1XBpcm-0004Ie-N8
 for bug-gnu-emacs@HIDDEN; Mon, 28 Jul 2014 14:26:17 -0400
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51028)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rrt@HIDDEN>)
 id 1XBpcm-0004IZ-KX
 for bug-gnu-emacs@HIDDEN; Mon, 28 Jul 2014 14:26:16 -0400
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 <rrt@HIDDEN>) id 1XBpcm-0005eE-9F
 for bug-emacs@HIDDEN; Mon, 28 Jul 2014 14:26:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1XBpcj-0004I4-AJ
 for bug-emacs@HIDDEN; Mon, 28 Jul 2014 14:26:16 -0400
Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:53156)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rrt@HIDDEN>)
 id 1XBpcj-0004Hd-0B
 for bug-emacs@HIDDEN; Mon, 28 Jul 2014 14:26:13 -0400
Received: by mail-lb0-f169.google.com with SMTP id s7so6201007lbd.28
 for <bug-emacs@HIDDEN>; 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
MIME-Version: 1.0
X-Received: by 10.112.2.167 with SMTP id 7mr4778614lbv.103.1406571967777; Mon,
 28 Jul 2014 11:26:07 -0700 (PDT)
Received: by 10.152.163.4 with HTTP; Mon, 28 Jul 2014 11:26:07 -0700 (PDT)
Date: Mon, 28 Jul 2014 19:26:07 +0100
Message-ID: <CAOnWdohO7eOa9Pj5mAPv9f2+699F1XSYFhT_E_u3iMzuuujDew@HIDDEN>
Subject: Time for a smarter dired-guess-shell-alist-default? (dired-x.el)
From: Reuben Thomas <rrt@HIDDEN>
To: bug-emacs <bug-emacs@HIDDEN>
Content-Type: multipart/alternative; boundary=14dae94ee0197dab3e04ff450e14
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-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

--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

<div dir=3D"ltr"><div>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).<br>
<br></div>xdg-open already works reasonably well: <a href=3D"http://lists.g=
nu.org/archive/html/help-gnu-emacs/2012-01/msg00143.html">http://lists.gnu.=
org/archive/html/help-gnu-emacs/2012-01/msg00143.html</a><br clear=3D"all">
<div><div><div><div><div><br></div><div>(I have a fix for the &quot;multipl=
e files&quot; problem, which I&#39;ll be sending to xdg-utils upstream when=
 I can.)<br><br></div><div>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 (&quot;xdg-open&quot;, &quot;gvfs-=
open&quot;, &quot;see&quot;=E2=80=A6).<br>
<br></div><div>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.<br><br></div><div>
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&#39;s desirable to open a file &quot;internally&quot; t=
o org-mode.<br>
</div><div><br>-- <br><a href=3D"http://rrt.sc3d.org">http://rrt.sc3d.org</=
a>
</div></div></div></div></div></div>

--14dae94ee0197dab3e04ff450e14--




Acknowledgement sent to Reuben Thomas <rrt@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#18132; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 23 Oct 2021 21:00:02 UTC

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