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: Fri, 22 Oct 2021 22:25:09 -0700 Message-ID: References: <87d2cn67zo.fsf@mail.jurta.org> <87bns6dcul.fsf@mail.jurta.org> <87silbstsc.fsf@mail.jurta.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="12284"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) 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 07:26:12 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 1me9Xn-0002zB-Uz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 07:26:11 +0200 Original-Received: from localhost ([::1]:57962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1me9Xm-0001LT-Rd for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 01:26:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1me9Xf-0001Kl-4k for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 01:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1me9Xe-0005nK-Sx for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 01:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1me9Xe-0001Ec-Hw for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 01:26: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 05:26: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.16349667174663 (code B ref 18132); Sat, 23 Oct 2021 05:26:02 +0000 Original-Received: (at 18132) by debbugs.gnu.org; 23 Oct 2021 05:25:17 +0000 Original-Received: from localhost ([127.0.0.1]:34151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1me9Wv-0001D9-9C for submit@debbugs.gnu.org; Sat, 23 Oct 2021 01:25:17 -0400 Original-Received: from mail-pj1-f50.google.com ([209.85.216.50]:43644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1me9Wt-0001Cq-4l for 18132@debbugs.gnu.org; Sat, 23 Oct 2021 01:25:16 -0400 Original-Received: by mail-pj1-f50.google.com with SMTP id k2-20020a17090ac50200b001a218b956aaso248075pjt.2 for <18132@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) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Oct 2021 22:25:09 -0700 In-Reply-To: (Reuben Thomas's message of "Tue, 5 Aug 2014 10:41:48 +0100") 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:217941 Archived-At: Reuben Thomas 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.