From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes Date: Wed, 25 Jan 2023 15:26:37 +0200 Message-ID: <83mt66g2ya.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60929@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 25 14:27:31 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 1pKfoI-0001cp-QB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Jan 2023 14:27:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKfnq-0002W3-TY; Wed, 25 Jan 2023 08:27:02 -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 1pKfnq-0002Vi-Cj for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 08:27:02 -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 1pKfnq-0004Nd-4V for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 08:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKfnp-0007uF-W8 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 08:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2023 13:27:01 +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.167465319230337 (code B ref 60929); Wed, 25 Jan 2023 13:27:01 +0000 Original-Received: (at 60929) by debbugs.gnu.org; 25 Jan 2023 13:26:32 +0000 Original-Received: from localhost ([127.0.0.1]:58618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKfnM-0007tF-D7 for submit@debbugs.gnu.org; Wed, 25 Jan 2023 08:26:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKfnK-0007sz-Ee for 60929@debbugs.gnu.org; Wed, 25 Jan 2023 08:26:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfnE-0004K9-89; Wed, 25 Jan 2023 08:26:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mICp83T9pu4eFMHPBE/m3WTa+gdzCNUVxVl6wd6d/mU=; b=qaBRhfklSgg5 K9Sgj2giRN4gFgfXTv7mhKlb5Sd2hN4ABSad7qUtkXZMTL0hNTRL0hyRh2gW7ifjUH2lZ1ohBXIdk +HtBqo0eHda8bZHvoLqs+tmvrN8pQEJ4kK1H3KvQvM/Xu3y0K1WbhXhfgZ34NBBt5bo+kiArATkY0 0mV/2fBpPb87vg3EIr8fDrX9IvbolRsSj9S3YfnZq12rRA9wI1MJJ4QjTC+q/ELTbgGjLMHnQ6IxZ OLk9pJfdRwC5kHAa0RngI8+9+6Oi30gICEkkPJVTuceWYmtPtkFl0Pr4/VUcW7JFzdIOGMM9sj3ay bmkilSy0HjlWQ6CD0EHUwg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfnD-0003PF-7L; Wed, 25 Jan 2023 08:26:23 -0500 In-Reply-To: <87y1pqlpl3.fsf@localhost> (message from Ihor Radchenko on Wed, 25 Jan 2023 13:18:48 +0000) 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:254127 Archived-At: > From: Ihor Radchenko > Cc: 60929@debbugs.gnu.org > Date: Wed, 25 Jan 2023 13:18:48 +0000 > > 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? > 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.