From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes Date: Wed, 25 Jan 2023 13:37:03 +0000 Message-ID: <87pmb2loqo.fsf@localhost> References: <87o7qw6rrz.fsf@localhost> <83y1q01031.fsf@gnu.org> <87v8l45740.fsf@localhost> <83ilh3293n.fsf@gnu.org> <878rht7eht.fsf@localhost> <83tu0hidcp.fsf@gnu.org> <87cz745gqp.fsf@localhost> <83y1psglbs.fsf@gnu.org> <87y1pqlpl3.fsf@localhost> <83mt66g2ya.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22995"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60929@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 25 14:37:45 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKfyD-0005jz-4R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Jan 2023 14:37:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKfxw-00061o-Ok; Wed, 25 Jan 2023 08:37:29 -0500 Original-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 1pKfxa-0005rd-Hq for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 08:37:22 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKfxW-0006B2-W2 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 08:37:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKfxW-0008Ei-Ky for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 08:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2023 13:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60929 X-GNU-PR-Package: emacs Original-Received: via spool by 60929-submit@debbugs.gnu.org id=B60929.167465380631617 (code B ref 60929); Wed, 25 Jan 2023 13:37:02 +0000 Original-Received: (at 60929) by debbugs.gnu.org; 25 Jan 2023 13:36:46 +0000 Original-Received: from localhost ([127.0.0.1]:58637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKfxF-0008Do-Pf for submit@debbugs.gnu.org; Wed, 25 Jan 2023 08:36:46 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:33301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKfxB-0008DL-Gf for 60929@debbugs.gnu.org; Wed, 25 Jan 2023 08:36:43 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 175E524012E for <60929@debbugs.gnu.org>; Wed, 25 Jan 2023 14:36:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674653795; bh=niSC1vjBXET/Zjlz4huTwIcriFfngIFgFL8Tpwm0Iug=; h=From:To:Cc:Subject:Date:From; b=P2pZmonpjc/wlJGY8fftjlCDrPzW0+7gMwxp7tybFSVvgncE28zsY/6F3S7GMdWxS x+Ut7aX0iOK+KUyN/Qj8sOyymxFjAQQC1J2wf+uKSJRmnX9pGrQzxVnhTTxyeMlcyV VtMtqeTLc0XMR5/7vJH6d74py+2wAaeyOQk5lxxqodcLiZw2y+1bqj2IpN1Lgo0pKp Hka6xkDfHDA1w1pevkRF+KVe5NgcY4CQqTBruD5j1l2djH00KRXs5+aCVM9pqCM0MW T48obVtITxHZNrIm9LBHH608UmQXaEN0jl2SCyL3Ip+hFF50QD/WTJk/t3FD3D7oJt v4PT2riMfxZSg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P24cb6N2Dz9rxH; Wed, 25 Jan 2023 14:36:30 +0100 (CET) In-Reply-To: <83mt66g2ya.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254131 Archived-At: Eli Zaretskii writes: >> > . given "foo.org.~10~" return the list ("foo" org-mode backup) >> > . given "foo.org.gpg.gz" return ("foo" org-mode epa-file compress) >> >> I do not think that you can deterministically associate file extension >> with major mode. Alternative major modes do exist for some file >> extensions (like built-in python.el vs. python-mode.el). Just extension >> list may suffice in the simplest scenarios. > > The intent was to use auto-mode-alist, of course. Or are you saying > that you'd like, for example, to treat *.org files as Org files even > if the user customized auto-mode-alist to use a different mode? Fair point. But then the extension information will be lost. "backup" may mean multiple different things, including "bak" or "~10~" or "~". "compress" may also involve different algorithms. >> In addition, given "foo.txt.org.gpg.gz" may return >> ("foo.txt" "org" "gpg" "gz") not stripping the first .txt as it never >> affects how Emacs opens the file. > > Talking about "opening the file" again narrows the scope of the > requested feature, IMO. We don't want to assume that the application > would like to open the file. Besides, Text mode does affect how Emacs > treats the file. Agree. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at