From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58075: Mapping file types to major modes Date: Mon, 26 Sep 2022 08:13:34 -0400 Message-ID: References: <87a66m8jgn.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11508"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Ikumi Keita , 58075@debbugs.gnu.org, Juri Linkov To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 26 14:16:00 2022 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 1ocn1j-0002jr-LP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Sep 2022 14:16:00 +0200 Original-Received: from localhost ([::1]:43836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocn1h-0008Ld-OG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Sep 2022 08:15:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocmzr-0007dW-G7 for bug-gnu-emacs@gnu.org; Mon, 26 Sep 2022 08:14:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocmzr-0000Rb-1I for bug-gnu-emacs@gnu.org; Mon, 26 Sep 2022 08:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocmzq-0001Wr-HR for bug-gnu-emacs@gnu.org; Mon, 26 Sep 2022 08:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Sep 2022 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58075 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58075-submit@debbugs.gnu.org id=B58075.16641944265846 (code B ref 58075); Mon, 26 Sep 2022 12:14:02 +0000 Original-Received: (at 58075) by debbugs.gnu.org; 26 Sep 2022 12:13:46 +0000 Original-Received: from localhost ([127.0.0.1]:49531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocmza-0001WE-8l for submit@debbugs.gnu.org; Mon, 26 Sep 2022 08:13:46 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocmzW-0001Vy-Mr for 58075@debbugs.gnu.org; Mon, 26 Sep 2022 08:13:44 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D738A440A2C; Mon, 26 Sep 2022 08:13:36 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 855964409D6; Mon, 26 Sep 2022 08:13:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1664194415; bh=bushpqo398InIz6+ZOOkFE1KJ0uKVZF6si4UC4usBAY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GO6a+wnWgOYqXakE6E9xRdjGbxOQCgZ6jkkXB9WAunG7+bFuW17MnkCg2IE0RrsEK 1mqojp3Tgax1rJRx5fjj4Tl0xrFZu0ZcV8VlpHJdKLprxh59Zu4tutX7pxoFqNZneY 1JicyP7X4vVd7Rlqn4BSnQxYCpFNLvEGV9rD4Sl9L8+dbPa0GB8REgnC0pQVfyZKJf fD+ER+sJZxzyI/hMTU8Q0VvzYzhaHal/LGydJeJ8D7KcuXwy+tQYXR6hZ97TSeL7he OcuECjeBEk1CSLminoKGnjidQoWxaa+szlfea2xdAOli7bAJz4E5ExLyH6PO8q+FE4 v/hAjMAmgRIbw== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4A1A9120816; Mon, 26 Sep 2022 08:13:35 -0400 (EDT) In-Reply-To: <87a66m8jgn.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 26 Sep 2022 13:26:48 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:243650 Archived-At: Lars Ingebrigtsen [2022-09-26 13:26:48] wrote: > Stefan Monnier writes: >> We have various ways to deal with those different cases, which are >> variously convenient/successful, but for things like `cperl-mode` vs >> `perl-mode` or `latex-mode` vs AUCTeX the usual solution is not >> satisfactory since it looks like: >> >> (defalias 'perl-mode #'cperl-mode) > > Isn't the usual solution to just make `auto-mode-alist' map .pl to > cperl-mode instead of perl-mode? > > Hm, well, that's > > ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) > > so it's a bit of a mouthful. And that doesn't account for the files where the mode is found by `interpreter-mode-list`, by `mode:` cookies, etc... Stefan