From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#18132: Time for a smarter dired-guess-shell-alist-default? (dired-x.el) Date: Sat, 23 Oct 2021 06:56:59 -0700 Message-ID: References: <87d2cn67zo.fsf@mail.jurta.org> <87bns6dcul.fsf@mail.jurta.org> <87silbstsc.fsf@mail.jurta.org> <83lf2k5gna.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3703"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 18132@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 23 15:58:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meHXJ-0000i8-Bh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 15:58:13 +0200 Original-Received: from localhost ([::1]:48548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meHXI-0000Vo-4R for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 09:58:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meHXB-0000VH-SN for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 09:58:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53516) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meHX8-0007oT-Hn for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 09:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meHX8-0002qZ-D4 for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 09:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 13:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18132 X-GNU-PR-Package: emacs Original-Received: via spool by 18132-submit@debbugs.gnu.org id=B18132.163499742710871 (code B ref 18132); Sat, 23 Oct 2021 13:58:02 +0000 Original-Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 13:57:07 +0000 Original-Received: from localhost ([127.0.0.1]:36829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meHWF-0002pH-9R for submit@debbugs.gnu.org; Sat, 23 Oct 2021 09:57:07 -0400 Original-Received: from mail-pj1-f52.google.com ([209.85.216.52]:50945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meHWD-0002oo-Je for 18132@debbugs.gnu.org; Sat, 23 Oct 2021 09:57:06 -0400 Original-Received: by mail-pj1-f52.google.com with SMTP id gn3so4916178pjb.0 for <18132@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) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 23 Oct 2021 06:56:59 -0700 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217993 Archived-At: Reuben Thomas 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.