From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0N1FNEsQymXG9wAAe85BDQ:P1 (envelope-from ) for ; Mon, 12 Feb 2024 13:34:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 0N1FNEsQymXG9wAAe85BDQ (envelope-from ) for ; Mon, 12 Feb 2024 13:34:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=iUWw1x2N; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707741259; 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=BFZDtPKe37PUaUE2+v6yFbKme8/GnAxWdYDMyG+S7RM=; b=spK09nlu5zKih5WUCi9mHRXKmLUuKxC6kL/bkwD6r7BjzNvJwNGLgUDbWNcaFY7GX72Iq5 e1YqYt6kPnUB/+x33cAwlftCoRIi5KOEreSEbOYrEOfhis/7zEsX7J2S4AJwB3RRNONmMk XLbBdW8z0L9bg8X/kgBFjwdn/KnGimZFJGpPB64DY6sLjz4RoVjM1JiktXk5+4/VPgODjK SNkV//d72RiM1MKcooHIpixflauRUUlOxnTfo3sLBZXZ5Gb8Q4ru3JgZ2MwltzUET3rGjX vbb3KYaFK/pbCryiSaCcU3CLoPXMVQCaJiJiyTPVjFyF9kqGj3K+jcFwJ1OMvw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=iUWw1x2N; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707741259; a=rsa-sha256; cv=none; b=JyFfZ4r0kPBfgAJ3ZRYKuNrLQbJSfUqohJ5Jr9AdfYp3C5pBKR8yCa2/2iVSH2JjUva2bC HHWKUw88LUOqWWWtCj9LN0FIAiod+tn/4JIUn+BYar/b/mptM7L8k6IMdauMB1oPNcUsTZ fVbP0mqswOZYjwE7Pnoib/Ao90Z9IcXzeBdTeqGRO4ZuxiDosICqblL2cEqxEwbVF/BuCA lWx8RPfwJ2efYDIwW0X66LfdrS45NhExfDK0E5S0WLP4ifvAEJhp9cCQQQx3ZrTYjSD09c 8gyDLJ/M+yl0RwJm3eBWuStk3EEUWzZ3SGesi2UZQKJr8rZVkn9CkPzdGe3Xkw== 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 6862414546 for ; Mon, 12 Feb 2024 13:34:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZVV0-0005rJ-DK; Mon, 12 Feb 2024 07:33:26 -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 1rZVUy-0005mB-Oy for emacs-orgmode@gnu.org; Mon, 12 Feb 2024 07:33:24 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZVUw-0004um-MB for emacs-orgmode@gnu.org; Mon, 12 Feb 2024 07:33:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0140A240028 for ; Mon, 12 Feb 2024 13:33:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707741200; bh=UwNJAd67mJSPyWAvT3FarqM+zA64yHCpKf9pNWaOGFY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=iUWw1x2N+VfVBmP96sA3lUOwlUOyj8ZMx2ESH40KeUdJfWw0uP6V61kVYGAUIvAgd jGOz3wLo1ngTTvz0zgwxqVEIWFDDOjT1sdY88z0Pv8MnzbZETyIISug3mEY8n8x/zR Fzb5L3HZFWmdMjJFcr43uZ5aV1dhCYpA7bXQ2TdpXM/dE7XmGD9tTq9u3DL5KgKDhJ LeyGsRAmMew/VTQnjwyXXbK0SNaXVfVEUlS68X2s4z4SvAD6a1jXSokb+lot4qBlsu GRlcPjzKlYkXA21R8B69pvQ0nDTmaxhbZ+ATiMqwSxR+DXVJc3o9Jqo+ccyrvCIWTx tbgLIQltXVnIw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TYP4v0C3yz9rxD; Mon, 12 Feb 2024 13:33:18 +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> <87a6bhc1w6.fsf@localhost> <86692975-4d5f-6933-3227-c6b208f76862@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> Date: Mon, 12 Feb 2024 12:36:50 +0000 Message-ID: <874jedoo4d.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H3=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: -9.90 X-Spam-Score: -9.90 X-Migadu-Queue-Id: 6862414546 X-Migadu-Scanner: mx12.migadu.com X-TUID: IKlVSLY9mWXx Max Nikulin writes: > On 04/06/2022 20:42, Ihor Radchenko wrote: >> >> It appears that using mailcap is giving us more trouble than benefits. >> I am not sure about the situation on Windows and Mac though. >> >> Should we change the default file handlers to Emacs globally (unless >> user customizes otherwise)? Should we continue efforts to work around >> mailcap issues? Maybe there is yet another alternative generic way to >> open files? > > ... > I believe, there are enough issues with mailcap implementation in Emacs, > but do we have some alternative? There is no support of queries to > mimeapps.list files in Emacs (XDG). Like Chrome it is possible to call > xdg-open for any type that can not be handled internally. Maybe it > possible to leave it in Org as is or with the patch to call "file" > utility (after some fixes). 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: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=15ae89b39 Use `xdg-open' to open files where available * lisp/org.el (org-file-apps-defaults-gnu): Use `xdg-open' to open files where available. (defconst org-file-apps-defaults-gnu - '((remote . emacs) - (system . mailcap) - (t . mailcap)) + (append + '((remote . emacs)) + (if (executable-find "xdg-open") + '((system . "xdg-open %s") + (t . "xdg-open %s")) + '((system . mailcap) + (t . mailcap)))) However, that commit had been reverted because xdg-open did not work for some users, "failing silently": https://list.orgmode.org/CAN_Dec8n=yNTto6Uh0dN50fG_HbqHFQtmYOCchH7wsyJdm3_Gg@mail.gmail.com/ 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 So, it may be safe to re-apply that Carsten's commit now. WDYT? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at