From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yPgNIohhm2JFEgAAbAwnHQ (envelope-from ) for ; Sat, 04 Jun 2022 15:43:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +F3nIYhhm2KjgAAAauVa8A (envelope-from ) for ; Sat, 04 Jun 2022 15:43:36 +0200 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 1158C38AAA for ; Sat, 4 Jun 2022 15:43:36 +0200 (CEST) Received: from localhost ([::1]:39840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxU3y-0007z7-OK for larch@yhetil.org; Sat, 04 Jun 2022 09:43:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxU2c-0007yw-4y for emacs-orgmode@gnu.org; Sat, 04 Jun 2022 09:42:10 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:33531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nxU2a-0006az-61 for emacs-orgmode@gnu.org; Sat, 04 Jun 2022 09:42:09 -0400 Received: by mail-pg1-x530.google.com with SMTP id r71so9383730pgr.0 for ; Sat, 04 Jun 2022 06:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=hfg8wKFrv0OjiNJO/pmTy6lIUNfZTiCbfi+sZb2iP4U=; b=GX2MpWOB4OmNtlPHB+KgWp5/ZwbVqB2eU1aHm6YpVmPH9ySN+Xy3PlxdoayBCBFRm2 9I7y90nuFOQ0vNWlifm2pA3mKHsHhstskQhVKu/diY0hjcPrJ/LM3BdAavDUoGRp0C1C 8wKjB9Hg+Rew6aDWWB/TXgITP+loWwjiVdv64msDT5Qfs5vzfYIcj7d0WLHLAF4nYtW2 D8PiT23Rwt0Dpzbc+Xm3Yh53/oZpvRt+YBlxCJrSZz265q5WjvKEQKhQBwGptVN3vwDF Ev+jOs5oXn5gqQ66Hk0503JZMquwOLGO/OKTFB8/HVLq72T5oV4aT3xkzuO1a9KAiPSy FEwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=hfg8wKFrv0OjiNJO/pmTy6lIUNfZTiCbfi+sZb2iP4U=; b=GhroihbUzslNTtLqAHaBYDmlFSDX1SL5xzCwds4vuaw8cjg0q1zFpwpS6lOIL4mBGP SWb+B817O9yuv/5pm2w/TPRR9Px1PeCVbzKolxIA/ydqOw0wi4K2/CCHdyFYmkRNkWhg jrcoN+tVmtXKwqBfLzJsqiUjHlqn40DgtadrcNGkZ8MJLacPuk9oW5zVntHqHKWZLTWV sLu8czUB29K0/RiRfjppcT8WnDX/GHGANcBjvQYuQgANJisFIYDO5tdBpUDr8kT7RwwA oHQFI5gpjrlPM3vPf2x9KPV2RQkJgb7jtbbhGFvrkQjt7Hjv+pLGc+b0XEFKieRNmPWO rdDg== X-Gm-Message-State: AOAM533sGgsN9SOzGr9hnk7rgVVZqqFLCGZNchvyQEly76b/l0UCnb9J 4MXt+KRiATUPmE2H+3ymxDk= X-Google-Smtp-Source: ABdhPJy7eHWp2M7LpexeR5hpMsxVaXA+SdSQnemAQlMrMP8Gp5rp7oGjdVUsDIGZzYuXSdEYeTPvRw== X-Received: by 2002:a65:5a43:0:b0:3f2:779e:8bf2 with SMTP id z3-20020a655a43000000b003f2779e8bf2mr13117897pgs.584.1654350126259; Sat, 04 Jun 2022 06:42:06 -0700 (PDT) Received: from localhost ([208.115.232.2]) by smtp.gmail.com with ESMTPSA id x21-20020a170902ea9500b001618b70dcc9sm7294524plb.101.2022.06.04.06.42.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jun 2022 06:42:05 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: [DISCUSSION, default settings] Using mailcap as default handler for opening file links (was: [PATCH v3] Re: Bug in 9.5.3 org--file-default-apps) In-Reply-To: References: <963d5f94-3fdf-a01b-bc91-edc99222cb34@gmail.com> <87czgeaxir.fsf@localhost> <6615610d-93ae-171f-b554-3f4cc79354cc@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> Date: Sat, 04 Jun 2022 21:42:42 +0800 Message-ID: <878rqcy27h.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=yantar92@gmail.com; helo=mail-pg1-x530.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654350216; 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=hfg8wKFrv0OjiNJO/pmTy6lIUNfZTiCbfi+sZb2iP4U=; b=hBhTMj6gSlL7K5AOLb8894gLarhql7gkKmqLnQkVbhD0XQt3xdVZem9Js/J8qeYnDgBB8z lskzpuEX+Qihj/EmJ7K+kO5aa4KtR3CSPa6KPwYPU4NNCuk/CDMejMFu+uOwkCcB524rC1 ln+vO0JbdWjlE7nZWoiXhdZUdcGKNuTn2mjLd5uXwpy2vtvbZ0NXNmiANjI4f5T9ZZG5GD 0VCpBYNmEt4sCYZbjac1R49POK9KVAfmdUisrjoiD2j1Cpn+05yKsTveX21D4ClGmUPjST IXZxsjkTq487RLYkrsWgwlT2T/RkSQTJXcE7WVhTbyOot5yJXr6h6JpUFzYAqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654350216; a=rsa-sha256; cv=none; b=a9Nt/BYrJpZVoYs00XA+PhDPtktloB3vKFB1SPbdacxxCL1zRrbYUVAdd8FZrJ/upBn/8C mBtOX/ytrBqLtfVZw1yNFxPTczeXdZ22dSPVNQeFgKXitt8gKL93lWcsRZaMfDKu+12IT8 Aw037NjijKfq/Prur9gMorMnLaBBFDzzFgkVRwrGwhy2DISLnhH7FIuC+bmgA+T7f/+TTU ytm4/3u4jk4jw6u/SUXbQSc2m3aQWs+PbX3gKfnuoMT0qW5+50KY66birEfpUjJ4JOKv9w JQ9offDGvxkwHwnTJgd/Q4w/Qr50kMFklgUE4AU7x0WrmG1jUS68YXtyHktwPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=GX2MpWOB; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -7.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=GX2MpWOB; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: 1158C38AAA X-Spam-Score: -7.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: XlN2gBU+Ih+V Max Nikulin writes: >> I am confused here. org-file-apps-gnu says that we rely on mailcap: >> >> ((remote . emacs) >> (system . mailcap) >> (t . mailcap)) >> >> So, is (3) following what you would expect from mailcap (regardless >> whether it is incorrectly configured or not)? Wrong configuration of >> mailcap is none of Org business - we need not to be "smart" and fix user >> "errors". They may be deliberate. > > Ihor, I am afraid that your patch may break some subtle equilibrium > existing despite discrepancy in MIME type names for shell script. Worst > scenario: without the patch shell scripts are opened in the same Emacs > session, with it attempt to open a script silently fails due to "less" > handler requiring a terminal. > > I admit that your patch may improve handling of e.g. images, however it > is more rare case when an image file has no suffix, while it is quite > common for various scripts (shell, python, perl, etc.) As Craig found out, Org 9.5.2 didn't try to use mailcap at all (because of typo). So, the equilibrium you are talking about only exists since Org 9.5.3 (April, 2022). Before Org 9.5.3, the default behavior on Linux (not Windows or Mac) was opening links in Emacs or, more precisely (funcall (cdr (assq 'file org-link-frame-setup)) file) Since Org 9.5.3, the default behavior on Linux is using mailcap with all the side-effects we are observing. 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? Best, Ihor