From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kOcUAJtRy2UVAAAAqHPOHw:P1 (envelope-from ) for ; Tue, 13 Feb 2024 12:25:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kOcUAJtRy2UVAAAAqHPOHw (envelope-from ) for ; Tue, 13 Feb 2024 12:25:15 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rrZI848C; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707823514; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=n+R9HKmk+rzuwWt6zEeg+q7wUmEt++dy8YBW/i5u7SM=; b=obybc6l8yELlTy+ZYAm4pkRdMddN9Jun4S21dyp0a3NmsO2hPPp1nN3prDaOVY5PYtZISp vk6VB6NhpUHshKZzeIzX0p61mDE46CWBBtTvb5hfDbI077nfsvpGuMKScbgfwn/IxlgGYJ UoXHqkiEq4eoFKt8cvS8MlW57xRkUkNu/B2VoZRnpl7yNwn5bfC9pY5Mx+bBag1esGNteO /XVmqmexdZyf96drB1yIwMdqJod9FwAPJ7XMmBI3vH/SzXvUfzUHqlPCbxySaa8itUcboq 4yNqVqT6HDFTdJhRemA/7Z06rmMm5PrbbbLUyT0IpL9t4PgzmdccE42TR2sW/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rrZI848C; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707823514; a=rsa-sha256; cv=none; b=TP/CudmusKT/QFTLxW4+ASoLFYLGh23MOzAAs18HJzf/4AGZzKGO0wNSdvmduLh5hwdtdx MFL+PudgDX9O7RKC2wH9T5rS3hWd+QgUN7qMn4XZ+er1hYByiKf1gSBtep0ZHqYM0vq1Rm GYKwqUGtf4C4Rk1teH68nwHzZX5GQ4gBEVWu8GsVjGPb1ER0okaACAnWr6JyfPXREXk/AV ZpGeAzvkFvQlHqeloi05fEv9hTzTTLGXSbEnBvH8V28h9FvPR6lFeN/HiLGRd41jRQrRzQ gHW7imAFhUrHzx5KXFS6dDomhpFjBQelEBJqQA7McOo+1OJ+VUKBqjiix92+MQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AFD7A3FDCE for ; Tue, 13 Feb 2024 12:25:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZqth-0005Qq-AP; Tue, 13 Feb 2024 06:24:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZqtg-0005Qi-2m for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 06:24:20 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZqtY-00026n-Uj for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 06:24:15 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DFF6C240104 for ; Tue, 13 Feb 2024 12:24:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707823449; bh=VwgYBAT3IFdHYErlZmvQRXEtuX9d6iDhNg2sHPqkwHE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=rrZI848CL0VptyKn/6oQoOu+2le7rDIQeRaPgOWEjA7vIcG5g3/xobR7OyqMaSJM2 ofoXsc2i0/LZ1xlM6R3v4OumES0cRAAV/P8XW/EAd+aRWyoyqYccfSBZGMV6oRYk20 c2tzvQ3Mn2eNR1YNZjmbak/e7OGmLIdDN1tqn9YJi4bni+nddIgxbP2zuU3NjXtnss HsOjrcQ+joKWw+NnHgxkkJUFXZ9SSOB5oYb5pw01ps9iQwhYwVYzPIlrlflb/p3EvW 2MR+ylgPKGlWD6P6WGodWwV++62KDnVDvH58Te39jN4mU4uf5SFYU69CdV66BYeqB3 WleU5ZLdCsVsg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TYzVc5mnqz6tsB; Tue, 13 Feb 2024 12:24:08 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [DISCUSSION, default settings] Using mailcap as default handler for opening file links In-Reply-To: References: <963d5f94-3fdf-a01b-bc91-edc99222cb34@gmail.com> <877d6lbsg5.fsf@localhost> <7c75b724-1ea2-5e3e-cbe6-e1895fd35bd3@gmail.com> <877d6j2htv.fsf@localhost> <87ilq14p6p.fsf@localhost> <87v8u0396t.fsf@localhost> <87ilpz3bi0.fsf@localhost> <87h75ip5r6.fsf@localhost> <87zgj46hwo.fsf@localhost> <8735gr15ok.fsf@localhost> <878rqcy27h.fsf@localhost> <874jedoo4d.fsf@localhost> Date: Tue, 13 Feb 2024 11:27:37 +0000 Message-ID: <87bk8kwqmu.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.20 X-Migadu-Queue-Id: AFD7A3FDCE X-Spam-Score: -8.20 X-Migadu-Scanner: mx11.migadu.com X-TUID: 9mX6Mw1bJW7N Max Nikulin writes: >> I have been digging more on this issue recently, and I have found that >> Carsten once attempted to tweak this default to use xdg-mime: > > Have you faced another issue with mailcap? Frankly speaking, I am unsure > what particular issues we are going to address (file type, Emacs and Org > versions, OS). I am mostly going to address user confusion about mailcap - (1) a number of people are using DMs that rely on FreeDesktop and xdg-open; they get surprised when .mailcap is used - I've seen a number of questions in IRC/Matrix and on reddit related to how Org mode opens file links; (2) Emacs' mailcap does not implement the specification fully - only a subset of mailcap format is obeyed. So, I do not feel that Emacs' implementation of mailcap support is a good default for most users. > Did you intentionally mentioned "xdg-mime"? No. I meant xdg-open. > ... While xdg-open tries to find > suitable .desktop file to open a file, xdg-mime is more close to the > file(1) tool, but it consults signatures from shared-mime-info and > site&user config files. In addition, unlike file(1), it uses file > extensions to guess media type. That might be a good alternative to file indeed; although file is probably more widely installed. > An advantage of mailcap.el is that it should allow users have > Emacs-specific Emacs-wide configuration for viewers. Yes, but mailcap is not documented in Emacs manual. FYI, I first heard that .mailcap files are a thing when I encountered org-file-apps. > ... In principle it > should be more reliable when invoking emacs through xdg-open when Emacs > is configured as a handler for some media types. I doubt so. There are problems with mailcap.el and there might be problems with Emacs media type configuration. I prefer xdg. > Is it necessary to modify Org? Maybe an alternative is to add "xdg-open > %s" for */* to `mailcap-user-mime-data'. Do you mean changing the default value of `mailcap-mime-data'? >> I believe that xdg-open issue has been fixed by you in >> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5db61eb0f >> org.el: Avoid xdg-open silent failure > > I am still not really comfortable due to the strategy to start external > processes diverged from methods used in browse-url.el. Is it related to the problem at hand? > I have not had a look into xdg.el yet. AFAIK, xdg.el does not support xdg-open functionality. We cannot use it here. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at