From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kDwnDFjJjWIuGAAAbAwnHQ (envelope-from ) for ; Wed, 25 May 2022 08:14:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CCktC1jJjWKhTQAAG6o9tA (envelope-from ) for ; Wed, 25 May 2022 08:14:48 +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 CAFBB22C29 for ; Wed, 25 May 2022 08:14:47 +0200 (CEST) Received: from localhost ([::1]:36322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntkIA-00065V-6p for larch@yhetil.org; Wed, 25 May 2022 02:14:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntkDS-00063P-Mc for emacs-orgmode@gnu.org; Wed, 25 May 2022 02:09:54 -0400 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]:34398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntkDO-0000G3-96 for emacs-orgmode@gnu.org; Wed, 25 May 2022 02:09:51 -0400 Received: by mail-oi1-x22b.google.com with SMTP id y66so17915059oia.1 for ; Tue, 24 May 2022 23:09:49 -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:content-transfer-encoding; bh=1z6uqPMlosDH8WxWuKQ1cB5ObWl+1EP0KbLjMF34H7g=; b=LCwB76pXqaycXGw2nFnRN9wO+bEfpambmFx1AGLhLk+WSiR7WAkwdIRNDri2r6OajU jOL4FJLsklmvyPAK7OFqvdE+YUTMnnSxRHcd/mz/CFe3LuLnVrspZbqc5R63k6TNgT0k SNluz/x0ybFPC3ZjXsqXQvYIzciCZWnZmHK283D2JwZfs7FnSXHXL9XV1rcWvQLtWikS 1TkQ2CtB707zBvXn7KY/a7PXoTSnMtYzVGWGi57HEEvVXSvOcSuAF4OLEaIkajd+o8QT J0/qLQfGPXmI13rf3sGISC1+Hbt6nPw+niY0ULJHsfSG8cKLQ0gSXBCI9HxHZDSTJ5az 66iA== 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:content-transfer-encoding; bh=1z6uqPMlosDH8WxWuKQ1cB5ObWl+1EP0KbLjMF34H7g=; b=kRbgMxdjfNd5BfWoc16Af8HhA40j5Atg+0BUxNDME8XsL1XsQfIjtoaOsXyEB89VOJ wWGc7Hk9LIkh2GXzegaIaki3scy/MLb+/ss8kfJByXvoECgdGJgQ+NqH5sxksk5MGRwg UNeeO18MRvKtaEwenk0co4kbuIzxPzZRt5/UPQaPVU1iMoPucLP4byMu6nzJEW2Vu7Ey GQiJ84MtYcLHl40mcyJad0PJJCpoxD4uSPF15NiGc2ppzhig5tY+dc+VccSfMckpbbeo ZLnga658SWQyXKEW3kgENAuvOfLocFxSU9FArY+O+rCA6y06CWsa8gI0VeN27FECCOlI +6OA== X-Gm-Message-State: AOAM533SsVogLZZIQadnIZGyXg34fz4LDMWrVNbitxNbniZZ+HVmrh3n NAFMt/33JDNwGjklVzX51Ws= X-Google-Smtp-Source: ABdhPJz5vc1yANDvGYGegaCcsyORebY7OdPo/bu3Psx99TpP81DtYNOyG+Alng+vXasRO60EYsdJFw== X-Received: by 2002:a05:6808:178b:b0:32b:20a4:ed66 with SMTP id bg11-20020a056808178b00b0032b20a4ed66mr4470809oib.136.1653458989216; Tue, 24 May 2022 23:09:49 -0700 (PDT) Received: from localhost ([207.126.91.4]) by smtp.gmail.com with ESMTPSA id h62-20020aca3a41000000b00326414c1bb7sm5935184oia.35.2022.05.24.23.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 23:09:48 -0700 (PDT) From: Ihor Radchenko To: Craig STCR Cc: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: Bug in 9.5.3 org--file-default-apps In-Reply-To: <0d8e9eb3-8b4f-127b-2293-2dfd182cd2cf@gmail.com> 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> <0d8e9eb3-8b4f-127b-2293-2dfd182cd2cf@gmail.com> Date: Wed, 25 May 2022 14:10:25 +0800 Message-ID: <877d6a2lda.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=yantar92@gmail.com; helo=mail-oi1-x22b.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=1653459287; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=1z6uqPMlosDH8WxWuKQ1cB5ObWl+1EP0KbLjMF34H7g=; b=L1GglfZ+T4uJeT1q4+VFAtMezXtZRZL0gTx9QwNXk6oWXVJzgzk2qtYGegypkJYrbpa+3K Rj7Fbhqr59R3fr245rby1pDOMXrgrNgnXsOI10OBO02z/h1vPYQxXWMU0zgSqjXXLDGPOk qjMzy9j9vuPmiX+YG/h1xPHAQ1rDhkBNUSf9u2tJkoPD2ipPzKp84tp/7Cd4JKh/rBXaLy UiCQuVpMBtUc5KGJ8y9JHG6dS9mnPmlHRJegFHu0Ed7Jh3ZUgI9qIDZW36suFjMMs6gSQy enWzeAn1n5qbLlb8OhfnmtCmk2hBUJPlb8lzUKy3mLU+gO94TPhPeclRDdtstQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653459287; a=rsa-sha256; cv=none; b=UK19XgkDyI7fb72ChaZcCJhQ3w8BuWJ243VUxkh1sdsn4n7HXwgEsf/lww++D4JMHX4GZB xykW+i+nyz5vtqgk+DA7KHS0upeg1TSh8rG5x1cwRQEfW1Y4vH0h+DxpjzrXAsK/3k/78x 9WY7rhDJvNnOUbAbWogaymYhGRlRFZvR0bzaXXNxJIT5COtQiJgGQulPZ+QqEN/9XMgvH+ Ec4cDsgXmpjtFqLQyCOLfA178OM9c3oKmlAvA4str7qsEguoN8vIM2eFXDTwAeT4aBVTcr t4zDXpKsR3MGLZ1nnF9jeo7GjPPaz2tWl6tfvQQ/nPuGG1Xnjj7tGQF/gR86gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=LCwB76pX; 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: -5.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=LCwB76pX; 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: CAFBB22C29 X-Spam-Score: -5.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: M/REG6nrXB3d Craig STCR writes: > On 5/20/22 9:44 PM, Ihor Radchenko wrote: >> However, I am not sure what to do on Windows/Mac. > Maybe try a quick-and-dirty, cross-platform solution that checks=20 > non-binary files for a first-line shebang?=C2=A0 Could use existing Emacs= =20 > hooks that determine major-mode when opening files. Good idea. Currently, Org only supports auto-mode-alist (see org-file-apps docstring) checking the filename. I think that the same option can be extended to use magic-mode-alist and such. I will leave it for others to implement. Patches are welcome! Best, Ihor