From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 7IvPOhlEiGI1WAAAbAwnHQ (envelope-from ) for ; Sat, 21 May 2022 03:44:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kFK2ORlEiGJlmAAA9RJhRA (envelope-from ) for ; Sat, 21 May 2022 03:44:57 +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 8213CD17E for ; Sat, 21 May 2022 03:44:57 +0200 (CEST) Received: from localhost ([::1]:40136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsEAp-0007cQ-U2 for larch@yhetil.org; Fri, 20 May 2022 21:44:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsE9u-0007cI-CG for emacs-orgmode@gnu.org; Fri, 20 May 2022 21:43:58 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:51006) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsE9s-0000cK-Le for emacs-orgmode@gnu.org; Fri, 20 May 2022 21:43:57 -0400 Received: by mail-pj1-x1034.google.com with SMTP id ds11so9446129pjb.0 for ; Fri, 20 May 2022 18:43:56 -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=okI6TUkcq6PO3q9UlPl3USTC7wwV8H1+M8sWsNezEVw=; b=BYSyWi64pvuqAUZPak4rZpOFOKCuPrf1WakPJZMqph9nsHM3ZHDS6EhmMBuA7d1dWb Vlbbkhai0z4ehzdyhuyOuspB0X66ton1ObTo8NJXarkUHOSbuiKPziEcpD+aSR/RWMDd KEOhB9gHiv8isG3WegS4ceXJzo1GRrgFIDndjZDLBJdVN6MyyWcXhf3jyRfEE8AD1oOK Wx+8lcXuDeRNWwIus0xoMt6/j2Uuo/DSX2l3BQ8OoM4pR0IQUtGDcLOD6OdIq7Kfa4sH 3BwUCsCe3vR3MmYlOMgyl/3sWtvP73ni64ElJGOX5th+c2chBHofrGfYweIrgtdjs1X1 Z/Mw== 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=okI6TUkcq6PO3q9UlPl3USTC7wwV8H1+M8sWsNezEVw=; b=ZmU8AYpMWTKYnaTcKcLqIhZ0xKO/wqRu2Pow+h7UcaomfxQBXU90IuZwIR6CM1M7F6 iB5977cuAlrvmniyQrqzOdXrjWrlJo/fa71nBt1chBx+XvBxUK9s6G2v0B2f2VhCfqpH HfuQDN1+giq7d3LSujIWtZ9ecn/Q1ihplHv74BbOo+VgnjWyL/NUaxUSl4nO1xFjPbaX QhzsNNDpaFpxZrqCExZCxiduP1P9/xEARoT4m8CX1zuHoLuNpiCJJmlAdUhiglvDohHz B6Cn5G5q65D5ZlN/Nb9J6qpmGogIeVOtTgnWJzrvJpEGeQKiusAFQvymjuUvl0z+3HV2 QPEw== X-Gm-Message-State: AOAM531eQ22kWaZJDK1/Koc8z84y3qJpk3r6e8g5CYkOVjIz/2oKJXt9 d7VzVutx7dfgdTi/QvTxDmg= X-Google-Smtp-Source: ABdhPJzGWP3b30SsaaWd8EJMpIS7HmaNpGXAGCGGM8LQzisRo8oCuQ7Sxt3zgqtQIjH8MSiUwgZ61w== X-Received: by 2002:a17:902:d2d2:b0:161:be0f:ccd7 with SMTP id n18-20020a170902d2d200b00161be0fccd7mr12271748plc.98.1653097435097; Fri, 20 May 2022 18:43:55 -0700 (PDT) Received: from localhost ([107.186.235.202]) by smtp.gmail.com with ESMTPSA id w2-20020a170902a70200b0015e8d4eb28esm351002plq.216.2022.05.20.18.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 18:43:54 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin , Craig STCR Cc: emacs-orgmode@gnu.org Subject: 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> Date: Sat, 21 May 2022 09:44:39 +0800 Message-ID: <87ilpz3bi0.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1034.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=1653097497; 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=okI6TUkcq6PO3q9UlPl3USTC7wwV8H1+M8sWsNezEVw=; b=u/B+lP7+65XYqAU50PGQCARE9Pv7q21jBMT9z0hCakpqHqA++Zb2JowJ+5dQKY2fDTfU8u tEebBE0Agl7VM8YOR9QnW02NoSuMjt3pQy5RCZuSujE8zHItOnLdQ0ZaKDNU+LpY+yd6gm nOqT1HbS+mI+qlHY5+HcaZ+sV3MzC+ieHWK3+GDgIxq66X7TzGZBqgz1lO7vBxV1fwOdnV gnYjmdtUEl6xpO2awufV/zRkK0xKiilwXWJYcnwaE8UHPY8Nh9WrleW7Z2riSIkLngjI/h K/3s+0a5ShoWlUhzpYqImJdRzl7ZqTiCeXa+rcsW1i4TAu/gjqiLGLY7WMBU+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653097497; a=rsa-sha256; cv=none; b=irtUkV0sQmuhSOQ7OXXSKKKlRIfA8dzob7hc5EzAlmSGqc+EaLn6cBGmAgITAJAMauqhPh XkR/OfK3D7bo4fD/+FePlvIrl0gvKMBR3I5hoZweWCCZird44DfPbYCCHUVinm6L1cFlRH lJH707tt0wNN1KFsOYdQkDpOOEgCoA+aVRPGwpRevHQflW7J8ifF5VgkZ7bFmU7g1A8ec0 OFkcE8Ltfu7dsb6rBAAKwUlU02JD5Cpxfsa1VwgwOLlJauMLZ5zd7/J9TR1mxhoSuEPkav bzcsGHmite/l5XdT2divCodDRB3OztBmX+wsNwNMxkwx4cY69yRV9NnyqGaK7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BYSyWi64; 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: -3.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BYSyWi64; 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: 8213CD17E X-Spam-Score: -3.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0lMsf7S3Po4r Max Nikulin writes: > On 20/05/2022 15:22, Ihor Radchenko wrote: >> Max Nikulin writes: >> >>>>> run-mailcap --norun ~/path/to/script >>>> >>>> Note that mailcap.el does _not_ use run-mailcap or anything external. It >>>> is written purely in elisp. >>>> >>>> So, can you please report the output of M-: (mailcap-mime-info nil)? >>> >>> view-mode >> >> Sorry, I did not consider that you customised mailcap-user-mime-data (I >> guess). No doubt your Emacs opens the script in other window. >> >> What about using emacs -Q? > > It is the same with and without -Q and no, I have not customized > `mailcap-user-mime-data', its value is nil, easy customization interface > tells that it is the standard value. There is a chance that debian has > some patch, but most of debian specific is disabled when -Q option is used. Interesting. In any case, it confirms that mailcap behaviour depends on both Emacs settings and also system settings. As I understand now: 1. (mailcap-mime-info nil) in Emacs 26 returns 'view-mode disregarding ~/.mailcap 2. (mailcap-mime-info nil) in Emacs 27 returns "less %s" on my system unless I have ~/.mailcap, in which case it takes text/plain handler from ~/.mailcap 3. (mailcap-mime-info nil) in Emacs 28/29 returns 'fundamental-mode unless I have ~/.mailcap, in which case it takes text/plain handler from there Dear Craig, your issue will kind of disappear if you upgrade Emacs or provide plain/text handler in ~/.mailcap. On Org side, the very reason we call (mailcap-mime-info nil) with _nil_ argument is because mailcap.el does not recognise file types without extension. I think that we can prefer the output of `file' utility if it is available on the system. However, I am not sure what to do on Windows/Mac. Best, Ihor