From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18132: Time for a smarter dired-guess-shell-alist-default? (dired-x.el) Date: Sat, 23 Oct 2021 10:44:57 +0300 Message-ID: <83lf2k5gna.fsf@gnu.org> References: <87d2cn67zo.fsf@mail.jurta.org> <87bns6dcul.fsf@mail.jurta.org> <87silbstsc.fsf@mail.jurta.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 18132@debbugs.gnu.org, rrt@sc3d.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 23 10:04:01 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 1meC0W-0008vT-BP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 10:04:00 +0200 Original-Received: from localhost ([::1]:37204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meC0V-0001yG-7F for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 04:03:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meBj9-0006rv-7n for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 03:46:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meBj7-0003gi-UJ for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 03:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meBj7-0004wr-Q5 for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 03:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 07:46:01 +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.163497512818978 (code B ref 18132); Sat, 23 Oct 2021 07:46:01 +0000 Original-Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 07:45:28 +0000 Original-Received: from localhost ([127.0.0.1]:34270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meBiZ-0004w1-V9 for submit@debbugs.gnu.org; Sat, 23 Oct 2021 03:45:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meBiV-0004vm-Q7 for 18132@debbugs.gnu.org; Sat, 23 Oct 2021 03:45:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53768) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meBiO-00031y-V7; Sat, 23 Oct 2021 03:45:16 -0400 Original-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 ) id 1meBiI-0006os-Lz; Sat, 23 Oct 2021 03:45:15 -0400 In-Reply-To: (message from Stefan Kangas on Fri, 22 Oct 2021 22:25:09 -0700) 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:217951 Archived-At: > From: Stefan Kangas > Date: Fri, 22 Oct 2021 22:25:09 -0700 > Cc: 18132@debbugs.gnu.org > > Reuben Thomas 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.