From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Date: Fri, 14 Oct 2022 15:07:19 +0000 Message-ID: <87sfjqh2ag.fsf@posteo.net> References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26718"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58506@debbugs.gnu.org, Stefan Monnier , Juri Linkov To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 17:21:16 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 1ojMUt-0006fq-SY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 17:21:15 +0200 Original-Received: from localhost ([::1]:45666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojMUs-0003pE-R2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 11:21:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojMI6-00046p-Jo for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 11:08:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojMI6-0006Z5-Bz for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 11:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojMI5-0006QG-QV for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 11:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 15:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs Original-Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166576006224654 (code B ref 58506); Fri, 14 Oct 2022 15:08:01 +0000 Original-Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 15:07:42 +0000 Original-Received: from localhost ([127.0.0.1]:38313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMHm-0006PZ-1g for submit@debbugs.gnu.org; Fri, 14 Oct 2022 11:07:42 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:55789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMHj-0006PM-Qt for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 11:07:40 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 11980240026 for <58506@debbugs.gnu.org>; Fri, 14 Oct 2022 17:07:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665760054; bh=Ilpo1TLBZtdYWMiXXihnxlbCnBagDaWPf7lrfuZwE8A=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=FtTkqhJaEy+Ba72hfeRngUpXOUqZypekEv1kW83DtdI6LK82DQBBJ8fLVuqeM29Ka 96HKbqhNBa6zPK+a9wJTSux1G05pN2NrKt2h13fZ6rlBsy8mVnAi7pNfQo5pVmGggd fLDebCPZiMhbUohsZM9cucenH5dWV6cPQQXUOkxVcaK7iqgFIYDXXCOaEm1oZIt5PP GAQNB+IExwcctPxqntyg8TaR/q6ihw9qMOntPPh390rNjEKjv8oO8ZK3XmHiMdAzfl pPk8rE2broGNgKQgTlEJb/P1Gowhexzf27mdWdjSEOl3THE62xIJj5AVrL/SUp4bhX 2q2slPObwWbPA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpqW553KNz6tn7; Fri, 14 Oct 2022 17:07:29 +0200 (CEST) In-Reply-To: (Stefan Kangas's message of "Fri, 14 Oct 2022 11:22:23 +0200") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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:245455 Archived-At: Stefan Kangas writes: > Severity: wishlist > > [Spun out from Bug#58486.] > > Juri Linkov writes: > >> It's already handled by auto-mode-alist: >> >> (defvar auto-mode-alist >> ... >> ;; .dir-locals.el is not really Elisp. Could use the >> ;; `dir-locals-file' constant if it weren't defined below. >> ("\\.dir-locals\\(?:-2\\)?\\.el\\'" . lisp-data-mode) > > It's nice if we can use the "*.eld" extension for files that are not > supposed to be executed. But it's hard to just change that outright, as > a file ".dir-locals.eld" won't be used on old versions of Emacs. FWIW it could be possible to mitigate this situation using Compat from ELPA. It could make use of the `hack-local-variables-hook' and "transparently" add support for .dir-locals.eld. Another idea would be to provide such a feature as a package that could intentionally be installed from ELPA for older versions.