From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: juri@linkov.net, philipk@posteo.net, monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 09:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 58506@debbugs.gnu.org Cc: Juri Linkov , Philip Kaludercic , Stefan Monnier X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Juri Linkov , Philip Kaludercic , Stefan Monnier Received: via spool by submit@debbugs.gnu.org id=B.16657393488335 (code B ref -1); Fri, 14 Oct 2022 09:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Oct 2022 09:22:28 +0000 Received: from localhost ([127.0.0.1]:35777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojGtg-0002AM-9i for submit@debbugs.gnu.org; Fri, 14 Oct 2022 05:22:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:53660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojGtf-0002AF-4r for submit@debbugs.gnu.org; Fri, 14 Oct 2022 05:22:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojGte-0006Fb-UF for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 05:22:26 -0400 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:45882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojGtd-0005sI-C3 for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 05:22:26 -0400 Received: by mail-ot1-x334.google.com with SMTP id a16-20020a056830101000b006619dba7fd4so1510383otp.12 for ; Fri, 14 Oct 2022 02:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=JOp0CimjZJu6geIwDj9LqmFR04uMBqz99fbhdPJV0CI=; b=aytUzkIjQAQJkJH52aAWVLAslB1W7xj8SwD4UCXBdjiB5UWKoa7EbbA1oJLWe3+4oV nRe0NB0oobEzZfJzvuPD9H+tKdgPURQsvz5yC2H0jg+HKHxl0OGXZx2DnQ8HUkxaht6x K7kvGr3vw7Eda8NO9eHtJSB/P81GkLDWulQXueswMNK0q/Abd7viRp7+OMvUFfqUv6Bt tqFPDkSNLGfyQRx8hzrc0bjNKPejRVw/Ydep0Cu7xmi+COw6m24Ph7zH8q1+dpJ2eJWJ lHnWq/tzENUWt3/RPa8dOe2ANHxyGMPe+lcTBDtotZZJnM5BfG6S98N1EeQ8GgmB7O9K 9htw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JOp0CimjZJu6geIwDj9LqmFR04uMBqz99fbhdPJV0CI=; b=dWMzV1dxLp3G+MoNgUNDA9Sy4TVmbwv38TV748BJ9JT+WLR+97p/JVr2FOda8lwD48 Byd52Pg68rS5R06kFQU5bKToTeq6GCC8fbGUohetdUzyv2JqTSZ/FQlGshFyPEbA3C2z d5USkwo+2kpz1NxoeV6Osn3Q18KF2n+HkPy9NaePQdBc/A1nAzcRRmSVkgWuQ3/La62R ry18sxnm9Qd8RJTwgYpYoAfXspeGthLC0iMZ0Fdng39QZVEWVSupTFdH5DWEvM2IkXBM 3+a/KpbTDzPP2Z2UHG9pHQ8ToQvcIIPwFH48dUYwputzsphhmrNH/HrIcO3lRSSfPujB 6SUA== X-Gm-Message-State: ACrzQf0wKBo9GvspG2zEJ+8M/68kURWIuypQMDR8VGE6pfAiLpLYtuSL Er2XOfCZhck4AO71HtKC9aCk3vlgWC+PF+CG6Y8NFrJi X-Google-Smtp-Source: AMsMyM5buofMulxopj+eAGJOGWFSdmrIbeSdAx9w7cdMeaiuGxXejS1Cv+BLh3NGgDt9Qf8MevkLS7UJUrbP2xZJxtc= X-Received: by 2002:a05:6830:3c1:b0:637:28be:7920 with SMTP id p1-20020a05683003c100b0063728be7920mr1927128otc.105.1665739343515; Fri, 14 Oct 2022 02:22:23 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Oct 2022 11:22:23 +0200 From: Stefan Kangas In-Reply-To: <865ygn4pno.fsf@mail.linkov.net> References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> X-Hashcash: 1:20:221013:bug-gnu-emacs@gnu.org::9uuDwDPlm5yhyucc:AMSa MIME-Version: 1.0 Date: Fri, 14 Oct 2022 11:22:23 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::334; envelope-from=stefankangas@gmail.com; helo=mail-ot1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. So how about doing something like the below, as a future compatibility patch? Then, in some undefined future version, we can consider creating ".dir-locals.eld" files by default, instead. diff --git a/lisp/files.el b/lisp/files.el index 94d110f0b7..bfd1e5e8e1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4403,11 +4403,14 @@ dir-locals--all-files (dosified-file-name dir-locals-file) dir-locals-file) directory)) - (file-2 (when (string-match "\\.el\\'" file-1) + (is-el (string-match (rx ".el" eos) file-1)) + (file-2 (when is-el (replace-match "-2.el" t nil file-1))) (out nil)) ;; The order here is important. - (dolist (f (list file-2 file-1)) + ;; Support *.eld files, too. + (dolist (f (list (and is-el (concat file-2 "d")) file-2 + (and is-el (concat file-1 "d")) file-1)) (when (and f (file-readable-p f) ;; FIXME: Aren't file-regular-p and From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 10:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: 58506@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca, juri@linkov.net Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166574393017281 (code B ref 58506); Fri, 14 Oct 2022 10:39:03 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 10:38:50 +0000 Received: from localhost ([127.0.0.1]:35850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojI5a-0004Uf-6J for submit@debbugs.gnu.org; Fri, 14 Oct 2022 06:38:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojI5Y-0004UB-6B for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 06:38:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojI5R-00018i-K4; Fri, 14 Oct 2022 06:38:41 -0400 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=jTiWjjcpDt7mzD+dCARrp59dIeYaPPZvJ6kZcNmOrcg=; b=JwnJc4dhJKFx eAD+VM9LYc0ZM2yS3/RV/xL1yEMHdaLwDC7ODn1rfghQEkWN/q64SaaLtU2kqGRNc2VX8xQI50ZKF 5clMIfrSuRyY14Upzij77IUdEgIN2e9WlSDvI6ismPQgxWLtQHGacgjZbe3b6AkZ23dY3APLg6rTE LyQgKdTvwrH+umX3BLXkxWD71hTv3SIGG2rcIWsV5tdJKhpwBaxiRzzGeRSg3dvSFYKK7KMmYtZjE huNqWZb9ISTF7r3Iv6TpW7nXWwnPzJOjRf2ljYqNFRHWbaHYgL2j7OpGypiHYIknDFZ1f7lLRKUIV g0RMqMhl41bBX5hIvaa9Iw==; Received: from [87.69.77.57] (port=3973 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 1ojI5Q-0006Vy-VT; Fri, 14 Oct 2022 06:38:41 -0400 Date: Fri, 14 Oct 2022 13:38:27 +0300 Message-Id: <83pmeu8zbw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Kangas on Fri, 14 Oct 2022 11:22:23 +0200) References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Juri Linkov , Philip Kaludercic , > Stefan Monnier > From: Stefan Kangas > Date: Fri, 14 Oct 2022 11:22:23 +0200 > > 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. > > So how about doing something like the below, as a future compatibility > patch? Then, in some undefined future version, we can consider creating > ".dir-locals.eld" files by default, instead. > > diff --git a/lisp/files.el b/lisp/files.el > index 94d110f0b7..bfd1e5e8e1 100644 > --- a/lisp/files.el > +++ b/lisp/files.el > @@ -4403,11 +4403,14 @@ dir-locals--all-files > (dosified-file-name dir-locals-file) > dir-locals-file) > directory)) > - (file-2 (when (string-match "\\.el\\'" file-1) > + (is-el (string-match (rx ".el" eos) file-1)) > + (file-2 (when is-el > (replace-match "-2.el" t nil file-1))) > (out nil)) > ;; The order here is important. > - (dolist (f (list file-2 file-1)) > + ;; Support *.eld files, too. > + (dolist (f (list (and is-el (concat file-2 "d")) file-2 > + (and is-el (concat file-1 "d")) file-1)) This conses 2 strings, which is a pity, because this code is called a lot. Can this be done without so much consing for such a simple job? From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 11:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Monnier , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166574673922634 (code B ref 58506); Fri, 14 Oct 2022 11:26:01 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 11:25:39 +0000 Received: from localhost ([127.0.0.1]:35951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojIos-0005t0-UH for submit@debbugs.gnu.org; Fri, 14 Oct 2022 07:25:39 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojIor-0005sk-6K for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 07:25:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=b4Ng5EwhOL9wKlkMtRt+Bm/WlhlU9BzX/luA4WpkT50=; b=LJ/w0C4uThkNGZWszeaZqUh6Tw 2cJZG8iQzdY7x7tEK6eoRsK414gfeVO1uwgPxZTHtVtsNIi1SpgfUVg73X6cTiiP0ktSDiPJIQT34 64jLpN4Sm703kLNUG9a6/WHm5oc4Qaf158QRczYAzK2UGLgBjxWc4KZ9EvyHUHNciS9Y=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojIoe-0005R7-R8; Fri, 14 Oct 2022 13:25:26 +0200 From: Lars Ingebrigtsen In-Reply-To: (Stefan Kangas's message of "Fri, 14 Oct 2022 11:22:23 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> X-Now-Playing: Afrorack's _L'Esprit de Nyege 2020_: "Last Modular" Date: Fri, 14 Oct 2022 13:25:22 +0200 Message-ID: <87y1tiabq5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > So how about doing something like the below, as a future compatibility > patch? Then, in some undefined future version, we can consider creating > ".dir-locals.eld" files by default, instead. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Kangas writes: > So how about doing something like the below, as a future compatibility > patch? Then, in some undefined future version, we can consider creating > ".dir-locals.eld" files by default, instead. It sort of makes sense to me, but if we're doing a name change, I'd rather make it a functional change, too. It's been pointed out many times that the .dir-locals.el file format is bad -- it's not extensible, and many things have been proposed for extra functionality that's impossible to add today. (For instance -- variables set before the major mode happens, and adding to list variables.) So if we introduce .dir-locals.eld, we should take the opportunity to add a brand new, sensible, extensible syntax, too. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 12:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Monnier , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16657509696550 (code B ref 58506); Fri, 14 Oct 2022 12:37:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 12:36:09 +0000 Received: from localhost ([127.0.0.1]:36134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojJv6-0001hZ-Rp for submit@debbugs.gnu.org; Fri, 14 Oct 2022 08:36:09 -0400 Received: from mail-oo1-f43.google.com ([209.85.161.43]:34721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojJv4-0001h0-O8 for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 08:36:07 -0400 Received: by mail-oo1-f43.google.com with SMTP id c17-20020a4aa4d1000000b0047653e7c5f3so1700896oom.1 for <58506@debbugs.gnu.org>; Fri, 14 Oct 2022 05:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=KgC3ICqd4EWEV3AomBdPEO9BJ3VzNS9pqg3dF6K24Ag=; b=W4PoI+nswmZ12iXS7VZcIFPwNrKnlnQ73w8hTb9CDEpi/u8xd/mogFe77zwErvj948 lnvUgJaH8tEcyPHpFT6KCPHhSW0ETGPLPNzZvLguBp15RCRRdY6aVVI7oO9NIEZHNWIb pCgjXmSbWETG86v4wlXv2e0ZybyQUft2ngZA7cHb85RuATYEMy+I1tKrera/5Vcm5h7E LXnjNGx5zkieDgxlBXlSGwtq3+nAdj17gWF2KPm6TrRiH+Dw9gAoG+dLe1mkGeC6oA2E vZm4NaWb9EsCSzx5sCf+D/dv3rwLXgw0gxv6A6/+pgA4gpbcA/jQos3EvKq4o2AalXwC UBsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KgC3ICqd4EWEV3AomBdPEO9BJ3VzNS9pqg3dF6K24Ag=; b=EHYXpeyYIEf6dyWQ/vGi48Is05sLXtZKmkumqCTiGQhNYXI9v3QDrFlKbxVFRw+yTs 4rno0J8NoQfJdaiu5e+i+g+JEAi+vcdaeW0DkREiBnDTSPh+VVHi4RRWp+nNaOPihfIN c/1E/ittXHjCxNSf7JTI8nEp4Ny7xa8chEQ+ys8F37RY6K3CP6txP4/aihuGumLdmTKu VMmmPmFtChjQlwL11WDJZ/61jvl96diA0FgRuUeNlLRmqWebdm1Z+j0PIDGC5D5kTa8L Yi9OCGVLmde36ahst+aB8B9HZrcm3hXJvXrTtVT+T/1a+MlxzXwqH/9tI1ioeGeqbRc8 2Xfg== X-Gm-Message-State: ACrzQf0cApvSpvv6zj7UC5sSVSCc/lLcowSrJUx7rsgrXUGOtnzkCwQ7 aCZ4SO/nbHmx/G3bLn+cPwDiJvVoUfU9agfW2dc= X-Google-Smtp-Source: AMsMyM7vOfpn6LwOH9cKcG4fhKCWuqxCUrGcIBSr8iceeCJZnIHwciI5RzeRp2/EkmhzT7wQL605s7os3+CgRqfKkYc= X-Received: by 2002:a05:6820:1746:b0:47f:926a:286d with SMTP id bf6-20020a056820174600b0047f926a286dmr1828477oob.5.1665750961010; Fri, 14 Oct 2022 05:36:01 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Oct 2022 07:36:00 -0500 From: Stefan Kangas In-Reply-To: <87y1tiabq5.fsf@gnus.org> References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> X-Hashcash: 1:20:221014:philipk@posteo.net::zV+N6jABHhVR9rKV:QP/P MIME-Version: 1.0 Date: Fri, 14 Oct 2022 07:36:00 -0500 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > So if we introduce .dir-locals.eld, we should take the opportunity to > add a brand new, sensible, extensible syntax, too. That makes sense. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 12:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 58506@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca, juri@linkov.net Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16657509816591 (code B ref 58506); Fri, 14 Oct 2022 12:37:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 12:36:21 +0000 Received: from localhost ([127.0.0.1]:36140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojJvI-0001iF-Jc for submit@debbugs.gnu.org; Fri, 14 Oct 2022 08:36:21 -0400 Received: from mail-ot1-f41.google.com ([209.85.210.41]:43728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojJvG-0001hm-Rk for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 08:36:19 -0400 Received: by mail-ot1-f41.google.com with SMTP id t4-20020a9d7f84000000b00661c3d864f9so1754310otp.10 for <58506@debbugs.gnu.org>; Fri, 14 Oct 2022 05:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=xsYldSuuSpMBxqqodzBi9hXgBGmtNgrfA3MUvmbAqK8=; b=XRcdQB7kUW0Z+lPhh8fpDyhIMjCoCkJOn31TpEO+mcHdyjI8sTVJ6l9BVnj+jfblri sLgyPw7rRSH8XVWSreF/OulDAd/ldmDjDSRtNJVGMOpMHArhIMdtTuvuau9eF16uFEUh 0SPgfyQO40IPv4d+0BBR+FpPjSNuDCnLGYePEGPYXj7ct+Rd3Wa33y05etb8bwVBPPxa fVAYwcigevh8iac7E33rnNFWvlHUU9xQuOSrbV22pdeD4mHVlRt+YDiJCN7QhDvFbgXV we2gP6pqyqjakUq2cMHou3MsRMUORkSL3iCRQjEmQfssa0DnHpxTDXzb4tBgKO2L2NkK +iiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xsYldSuuSpMBxqqodzBi9hXgBGmtNgrfA3MUvmbAqK8=; b=B6S/MX9exNER22QLLs9MAH8lDRjq6oq6Kma0qu/BiY2+5vuvy0yPdkFDkcLgmZj+CO RA/aNxC/oQ5xFAy6TnJ0eIG53qGq0wxN+g5d+69tnqkFo5lbPJ9CAj9wpa6B+GtHlRWF iz+jsMr3hAPYKKyowVQX1fhOLyn6q55eEVpy8Cp6bGcI4KcXslL2uRyC81VtvLSVogEs xc524sr1X62pUHYKPpFu5s3iFGXLf96xE2sDcNh02Ct3KPTu/Kuel8pIxp4xQXzQf/Yw 758oERoB9g3s+IH47cp8Y4RozyakONOHS1cBBfqLfuMiG69MtK2/cLUffhAGk4XyOhQR hP+Q== X-Gm-Message-State: ACrzQf2WyvLj3c/mhcaSClAzIh0z/dTTL174oTu+2QxRburg4kBequsL DT6p9mbhrS5R2P+pQNWpDliGN/T8HxxDM+k5huk= X-Google-Smtp-Source: AMsMyM4SVslamq5n5HngCxOGAuvzaeiEkgKxSMLxG/5oYlLiixiqJtqwJikMoRQEexERVMb/BkQmCEaTelmCSiA77xM= X-Received: by 2002:a05:6830:3c1:b0:637:28be:7920 with SMTP id p1-20020a05683003c100b0063728be7920mr2258907otc.105.1665750973383; Fri, 14 Oct 2022 05:36:13 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Oct 2022 07:36:13 -0500 From: Stefan Kangas In-Reply-To: <83pmeu8zbw.fsf@gnu.org> References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <83pmeu8zbw.fsf@gnu.org> X-Hashcash: 1:20:221014:monnier@iro.umontreal.ca::P7AtXR3othPRQkU4:4FW2 MIME-Version: 1.0 Date: Fri, 14 Oct 2022 07:36:12 -0500 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> diff --git a/lisp/files.el b/lisp/files.el >> index 94d110f0b7..bfd1e5e8e1 100644 >> --- a/lisp/files.el >> +++ b/lisp/files.el >> @@ -4403,11 +4403,14 @@ dir-locals--all-files >> (dosified-file-name dir-locals-file) >> dir-locals-file) >> directory)) >> - (file-2 (when (string-match "\\.el\\'" file-1) >> + (is-el (string-match (rx ".el" eos) file-1)) >> + (file-2 (when is-el >> (replace-match "-2.el" t nil file-1))) >> (out nil)) >> ;; The order here is important. >> - (dolist (f (list file-2 file-1)) >> + ;; Support *.eld files, too. >> + (dolist (f (list (and is-el (concat file-2 "d")) file-2 >> + (and is-el (concat file-1 "d")) file-1)) > > This conses 2 strings, which is a pity, because this code is called a > lot. Can this be done without so much consing for such a simple job? Actually, 2 strings are already consed up, so this brings it up to 4. How about something like this instead? It brings us down to 0, as long as users don't mess with the value of `dir-locals-file'. Maybe it's even worth installing even if we don't add support for *.eld? diff --git a/lisp/files.el b/lisp/files.el index 94d110f0b7..dedf9c4848 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4393,27 +4393,34 @@ dir-locals-file See Info node `(elisp)Directory Local Variables' for details.") +(defvar dir-locals--file-last nil) +(defvar dir-locals--files nil) (defun dir-locals--all-files (directory) "Return a list of all readable dir-locals files in DIRECTORY. The returned list is sorted by increasing priority. That is, values specified in the last file should take precedence over those in the first." (when (file-readable-p directory) - (let* ((file-1 (expand-file-name (if (eq system-type 'ms-dos) - (dosified-file-name dir-locals-file) - dir-locals-file) - directory)) - (file-2 (when (string-match "\\.el\\'" file-1) - (replace-match "-2.el" t nil file-1))) - (out nil)) - ;; The order here is important. - (dolist (f (list file-2 file-1)) - (when (and f - (file-readable-p f) - ;; FIXME: Aren't file-regular-p and - ;; file-directory-p mutually exclusive? - (file-regular-p f) - (not (file-directory-p f))) + ;; Users might be misguidedly messing with the `dir-locals-file' + ;; variable, as ELisp doesn't bother enforcing defconst. + (unless (equal dir-locals-file dir-locals--file-last) + ;; Caching this avoids consing. + (setq dir-locals--files + (delq nil + (let* ((file-1 (if (eq system-type 'ms-dos) + (dosified-file-name dir-locals-file) + dir-locals-file)) + (is-el (string-match "\\.el\\'" file-1)) + (file-2 (when is-el + (replace-match "-2.el" t nil file-1)))) + ;; The order here is important. + ;; Support *.eld files, too. + (list file-2 (and is-el (concat file-2 "d")) + file-1 (and is-el (concat file-1 "d"))))))) + (let ((default-directory directory) out) + (dolist (f dir-locals--files) + (when (and (file-readable-p f) + (file-regular-p f)) (push f out))) out))) From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 13:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16657526989757 (code B ref 58506); Fri, 14 Oct 2022 13:05:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 13:04:58 +0000 Received: from localhost ([127.0.0.1]:36198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKN0-0002XI-3p for submit@debbugs.gnu.org; Fri, 14 Oct 2022 09:04:58 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:33607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKMx-0002X4-O5 for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 09:04:56 -0400 Received: by mail-wr1-f41.google.com with SMTP id a3so7556255wrt.0 for <58506@debbugs.gnu.org>; Fri, 14 Oct 2022 06:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=zo7KIuPdJMIKsOpC+Qlu8f9xvP+W8CQznzvPJwLvt1k=; b=BkEWdi2kPJMGBa1koFP1VfI9IzuEkxo0WuZaO74vI8515xP8jcfJYsPd6i8Linv1LE al91eooOkBsceSAoEUVDvixngcjeOjGo8xm3JWhzRs3//s8vfu+48HqsJrgr79FZLD5o qyPS7GiIrR03Gm6y6hrbNTWTJV7Xl7YihenzoAqp40vFdlf6Q6PQursuOW07WbzLsEm6 iN/zXsnyLwh88RXLAibeA0B7wprQPuQY9wiNlPhb4/KBVPNqAQCJVgLwebcgCJQW/V2h okMa1k7Fy8SobiWiNrQI5e2x88ZcNQPOvm+ea6QJqYwlu7kVxVZmpsZaadbP6GMOrlPs e8xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zo7KIuPdJMIKsOpC+Qlu8f9xvP+W8CQznzvPJwLvt1k=; b=yYrcpyB90SXKWGCRB3ot7sPtIUO4IlG6rTfo9+WS3zq7gCvqy/UQphHtAdf7iQNmXN 4Oa+5hsjKbT62TRhJdI5X+D6hSazu8JfFG9GIsZB3he65qz1Z3PGJM2x7dBzyOUKtYJy OMqT8BsS9tB6yvdIfLsbcXJwUqDVaa53EQmO0ufaUnbgmq71irob4OtNE5r2vrBn/mAn Q7gXP50cx+eWVmHlqTwc+qkv/xBDnUR9O3AKFxtWregN9doHR+M5vIOeXH/itJ1W+hdu VIY0WUn+9E/0WZwxXaFkijNI3DFKA4oHRVyyqWkaNh3RVFG4wUMUGL3MvLFZWHWuiWhS en/Q== X-Gm-Message-State: ACrzQf10sOsHZu0d/3y1OxJ2Dg/5QaFtEdWvsQ2SkauWtRqXhmAhHNLw GfBlY9P2TN7EJT2U2bY5pHc= X-Google-Smtp-Source: AMsMyM6OQKya9w+5gJKwAg+xUPd0/z8aRvZsh2BAPnOLtmR3mx6KHSGVgGQDfZp667WLi/Yf+FOhaQ== X-Received: by 2002:a5d:62d2:0:b0:22e:4a7:1ab6 with SMTP id o18-20020a5d62d2000000b0022e04a71ab6mr3422749wrv.334.1665752688816; Fri, 14 Oct 2022 06:04:48 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id i17-20020a5d6311000000b0022e035a4e93sm1808150wru.87.2022.10.14.06.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 06:04:47 -0700 (PDT) From: Robert Pluim In-Reply-To: <87y1tiabq5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 14 Oct 2022 13:25:22 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> Date: Fri, 14 Oct 2022 15:04:46 +0200 Message-ID: <87czauzhch.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Fri, 14 Oct 2022 13:25:22 +0200, Lars Ingebrigtsen said: Lars> So if we introduce .dir-locals.eld, we should take the opportunit= y to Lars> add a brand new, sensible, extensible syntax, too. We could use an almost syntax-less language with lots of structuring parentheses (LOSP for short). And we=CA=BCd have to call the file 'please-pwn-my-Emacs.el' Seriously, having files popping up safe-variable warnings is scary enough already, do we really need to complicate things by adding yet-another not-quite-lisp syntax? Is the support for `eval' in .dir-locals.el not enough? Robert --=20 From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Robert Pluim Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166575302010366 (code B ref 58506); Fri, 14 Oct 2022 13:11:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 13:10:20 +0000 Received: from localhost ([127.0.0.1]:36215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKSC-0002h7-1F for submit@debbugs.gnu.org; Fri, 14 Oct 2022 09:10:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKSA-0002gr-8x for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 09:10:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fxLnEbwrmm60U3CFG3exoYtlercDHtYB3gn4I+fqT4Q=; b=jdoqzUZn267wDzc0hjTdyvdNyC wKorDleQ1yWKYHhMM8TraUWYNyxz6pFPSGsPkGghwHoEZcnSuDEGHETBOzoTpUrht8m9zZU4UE/nY w72Yiu3I6ylRNbQZfLfEAQUKwjA0NCq98DqyNwu0xwQ7RCiat2u5mF5imQhedp8Ef83I=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojKRy-0006BY-SU; Fri, 14 Oct 2022 15:10:08 +0200 From: Lars Ingebrigtsen In-Reply-To: <87czauzhch.fsf@gmail.com> (Robert Pluim's message of "Fri, 14 Oct 2022 15:04:46 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWHX0hULyM/KiX/ //9fL2cNAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDgsSKZC1OvMAAAHESURBVCjPRZFNi5MxEMen sivsbYU+4vbuwX6KIj4Fe9otm2DmpmyCM59CRBfsaZ/SBJNbpRM28ylND+LcfmTm/0IA/s8MzONm nM1nZ7iAITlrvM0PNwPCUMg8+Rgnf8uwcGQmN6Xt7Z3C8I5k8my3Zl3gta1fxePaxssN3CSKzafk 4p2FNyEcZDABx3kCw07MwihfzRFqRrd0vtDVYIHEOjbE7t5byPRwcsao+yQdrDSDVVO87JDijZ7n 0G9aOQwrMNpyf2kmv1wB6KnYDm9zWcEL1Zgs1LCPH/BYxEeEFEP8qR3QFhDTbNKqz2osPPv25aws 3BNEz6EQa0XCbkoa6VWpFBCapSptpjqGLsCjNr1m3mq/kaTarlGOaLtPZG23qNLjiFJRPW7USYBW nQh3eKQEUjf5sDyOumva11B+L08jIyNEJfq1fPKMFkEKmh8A5zwLUKz4DYbu5RYwZSLu4oq8hgmR XGu12B6nN9Srmu9abAtoEgUrOefdFvQjH4P6EvJ9gobGf871e2oX56CJQ+Y9y/o9TFR53cpeZAwQ T5HSWPY72fRfyNnI2iZWDJAbpt42yAEZel2XQkB3jwh/dKf/5i+i6AE30+DuCQAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMi0xMC0xNFQxMToxODo0MSswMDowMKTBsXkAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjItMTAtMTRUMTE6MTg6NDErMDA6MDDVnAnFAAAAAElFTkSuQmCC X-Now-Playing: Catudiosis's _L'Esprit de Nyege 2020_: "Kakoze" Date: Fri, 14 Oct 2022 15:10:04 +0200 Message-ID: <87a65y8sb7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Robert Pluim writes: > Seriously, having files popping up safe-variable warnings is scary > enough already, do we really need to complicate things by adding > yet-another not-quite-lisp syntax? Is the support for `eval' i [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Robert Pluim writes: > Seriously, having files popping up safe-variable warnings is scary > enough already, do we really need to complicate things by adding > yet-another not-quite-lisp syntax? Is the support for `eval' in > .dir-locals.el not enough? It's not -- there's a bunch of bug reports around these issues *handwaves at debbugs*. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 13:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166575382611770 (code B ref 58506); Fri, 14 Oct 2022 13:24:01 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 13:23:46 +0000 Received: from localhost ([127.0.0.1]:36232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKfC-00033j-EL for submit@debbugs.gnu.org; Fri, 14 Oct 2022 09:23:46 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:35481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKfA-00033V-Ru for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 09:23:45 -0400 Received: by mail-wr1-f41.google.com with SMTP id u10so7575032wrq.2 for <58506@debbugs.gnu.org>; Fri, 14 Oct 2022 06:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FgenDpGAPsXdFy+nY4LceqQjpUNAsZNJvjCF/+rcZf0=; b=MA7m4uRkNT2r2ZcWuxH4WiH5jvUfIdCasOpdn7xnqvp+OzFYqXL8hR8IXmJzVg2svy ILuIhhH5kgcvlpUryuaFxKEw7P6ot1m8rLFAC77q1fax7zrpldzbT3c6pOU/lwjC2HzV hYZpGCgS+Nkv0GBcT6O2apn5dAnPlswfL1u4mQeQRXU7ecz+uw4jU3wi8I1U/VBkxvtF Q2gYtvdxb8wpvEyWh5AwOSSZN3PVp2YLM6XmjM1twsj/pUYpSaF2EUEOPzdZhbDnKryB YihdEJyFendEova63nr9Xx79tFWMmVrStJOukFMc0+l82Osv+Km712wLuP6cs9BZjDCa 09Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FgenDpGAPsXdFy+nY4LceqQjpUNAsZNJvjCF/+rcZf0=; b=B4uqvLrGO/uYyf5odRy27ZNTvLN30Vt3dWS6B5lMCeJX1ESG2I7+u9rPKV9BqFW1uL 8yrq8aM8XYHaOs2UqZZXQHICILSPUI+Y7T5r9Ep/EvM4M3JYQLtu/Sgle4yqJDIZFnly VSIxZCLtXZqaD1CHZU+FIjVj5YFJHTggO+2RFxcn9th4UOGsSlRiuZQ4RacR/Mlvkkc0 LBb0zhpcp8d/Er+WxuZOR14O6mIXHX762xKWLnPqVxn11XoX3zx+nII+mPshM4J5pmry jI1fskYKW22qIw+1236RbTYywhWp+aFZ6Si4xoaz5D+Ha4udqdGYyH2Cs7wrhqE3YTt1 6NMg== X-Gm-Message-State: ACrzQf1Xt536PRNk6fOv/4ENpWLXoJ0zen+44IjQc2hLcyVtC76Fpe9t VMz5mku92BANttM7KVHYp7I= X-Google-Smtp-Source: AMsMyM76K/s87wRLBq97lm+dNdWSG7IswOJAvOvzPRFe8IGPSNsl231TFN8qAFL+6rUBB9G0zTY98A== X-Received: by 2002:a05:6000:18aa:b0:22e:60ef:9c1 with SMTP id b10-20020a05600018aa00b0022e60ef09c1mr3331646wri.108.1665753818672; Fri, 14 Oct 2022 06:23:38 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id o39-20020a05600c512700b003b4ff30e566sm14242400wms.3.2022.10.14.06.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 06:23:37 -0700 (PDT) From: Robert Pluim In-Reply-To: <87a65y8sb7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 14 Oct 2022 15:10:04 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87a65y8sb7.fsf@gnus.org> Date: Fri, 14 Oct 2022 15:23:37 +0200 Message-ID: <87zgdyy1wm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Fri, 14 Oct 2022 15:10:04 +0200, Lars Ingebrigtsen said: Lars> Robert Pluim writes: >> Seriously, having files popping up safe-variable warnings is scary >> enough already, do we really need to complicate things by adding >> yet-another not-quite-lisp syntax? Is the support for `eval' in >> .dir-locals.el not enough? Lars> It's not -- there's a bunch of bug reports around these issues Lars> *handwaves at debbugs*. My debbugs-gnu-foo must be too weak: I can only find two, neither of which look like they=CA=BCd be fixed by changing the syntax accepted by .dir-locals.el Robert --=20 From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Robert Pluim Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166575419612325 (code B ref 58506); Fri, 14 Oct 2022 13:30:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 13:29:56 +0000 Received: from localhost ([127.0.0.1]:36239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKl7-0003Cg-6Q for submit@debbugs.gnu.org; Fri, 14 Oct 2022 09:29:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKl4-0003CR-Rg for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 09:29:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kIqjN0I7BLLDNFNHsCxsNd+L1lSFVDoCSkGbhwx+nhM=; b=RklO1ZwLI+hq3GxIETSfHlnbQV /X/R3Hq0+sRrqvlZr8QTBCGtQTe/Z/vm5ZsUDX55kLzEJHoqdhtOKAa8gXrrnpLCtHVqikG7N12OR UGfq8BMrFK+3UIrmVyOyOFvpTt/QfSfCkF/4XM8sPvkgJboy3sDb/8DFpan/Mn6rzH54=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojKks-0006Ji-OW; Fri, 14 Oct 2022 15:29:40 +0200 From: Lars Ingebrigtsen In-Reply-To: <87zgdyy1wm.fsf@gmail.com> (Robert Pluim's message of "Fri, 14 Oct 2022 15:23:37 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87a65y8sb7.fsf@gnus.org> <87zgdyy1wm.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWHX0hULyM/KiX/ //9fL2cNAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDgsSKZC1OvMAAAHESURBVCjPRZFNi5MxEMen sivsbYU+4vbuwX6KIj4Fe9otm2DmpmyCM59CRBfsaZ/SBJNbpRM28ylND+LcfmTm/0IA/s8MzONm nM1nZ7iAITlrvM0PNwPCUMg8+Rgnf8uwcGQmN6Xt7Z3C8I5k8my3Zl3gta1fxePaxssN3CSKzafk 4p2FNyEcZDABx3kCw07MwihfzRFqRrd0vtDVYIHEOjbE7t5byPRwcsao+yQdrDSDVVO87JDijZ7n 0G9aOQwrMNpyf2kmv1wB6KnYDm9zWcEL1Zgs1LCPH/BYxEeEFEP8qR3QFhDTbNKqz2osPPv25aws 3BNEz6EQa0XCbkoa6VWpFBCapSptpjqGLsCjNr1m3mq/kaTarlGOaLtPZG23qNLjiFJRPW7USYBW nQh3eKQEUjf5sDyOumva11B+L08jIyNEJfq1fPKMFkEKmh8A5zwLUKz4DYbu5RYwZSLu4oq8hgmR XGu12B6nN9Srmu9abAtoEgUrOefdFvQjH4P6EvJ9gobGf871e2oX56CJQ+Y9y/o9TFR53cpeZAwQ T5HSWPY72fRfyNnI2iZWDJAbpt42yAEZel2XQkB3jwh/dKf/5i+i6AE30+DuCQAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMi0xMC0xNFQxMToxODo0MSswMDowMKTBsXkAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjItMTAtMTRUMTE6MTg6NDErMDA6MDDVnAnFAAAAAElFTkSuQmCC X-Now-Playing: Tyor Iganna's _L'Esprit de Nyege 2020_: "Faras el nil" Date: Fri, 14 Oct 2022 15:29:36 +0200 Message-ID: <871qra8ren.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Robert Pluim writes: > Lars> It's not -- there's a bunch of bug reports around these issues > Lars> *handwaves at debbugs*. > > My debbugs-gnu-foo must be too weak: I can only find two, Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Robert Pluim writes: > Lars> It's not -- there's a bunch of bug reports around these issues > Lars> *handwaves at debbugs*. > > My debbugs-gnu-foo must be too weak: I can only find two, Isn't two a bunch? =F0=9F=98=80 > neither of which look like they=CA=BCd be fixed by changing the syntax > accepted by .dir-locals.el I suspect that by "syntax" you're thinking about syntax syntax -- I'm talking semantics syntax. The .dir-locals.eld file will be Lisp forms, of course. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 13:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Kangas , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166575470013274 (code B ref 58506); Fri, 14 Oct 2022 13:39:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 13:38:20 +0000 Received: from localhost ([127.0.0.1]:36261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKtH-0003S1-Qu for submit@debbugs.gnu.org; Fri, 14 Oct 2022 09:38:20 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKtG-0003Ro-DJ for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 09:38:18 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2009310012E; Fri, 14 Oct 2022 09:38:13 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9E816100098; Fri, 14 Oct 2022 09:38:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665754691; bh=vF2NTgJ3WgmzOghVYjJUN82ck/Sa8J6Ill918nhaTLk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jkB/NMqdGBJ4tb2TZkE7oD14sgleUXOTPrmCthy6PorFHq41fD+pnBh7v0zncTIzY VO8hU/t0dyGba5m96QpQKZL0nLTOanfpJiFH7pIm8271d2Cfb19VU7x3EwelIHQ0wA muUhDZilRubYPyLi7WBtObZiHltIpzbnUwnArzb+N1eS4ZdtmKtE+YLR1KooHgyUyN 3zxXrm49rbwvLMBUGIO9fEh9dSK0Ew4zsjflnKsGGOfjU9DBlaOocu2zLQutugoDzl 2cEb5sD8TAfe9iFOEq8Eui9mFCSleZ1xE+CZlTzAfsHFTZSDsEeccHpD4qnCEu6GNu RyVM51YkzU57A== Received: from alfajor (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 64403120CE9; Fri, 14 Oct 2022 09:38:11 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87y1tiabq5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 14 Oct 2022 13:25:22 +0200") Message-ID: References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> Date: Fri, 14 Oct 2022 09:38:09 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.075 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > It sort of makes sense to me, but if we're doing a name change, I'd > rather make it a functional change, too. While I can see why that might sound attractive, AFAICT the functional change is very far from being clear, so it seems unlikely it will happen any time soon. Stefan From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 13:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166575490513640 (code B ref 58506); Fri, 14 Oct 2022 13:42:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 13:41:45 +0000 Received: from localhost ([127.0.0.1]:36265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKwb-0003Xw-DM for submit@debbugs.gnu.org; Fri, 14 Oct 2022 09:41:45 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:46937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojKwZ-0003Xi-VU for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 09:41:44 -0400 Received: by mail-wr1-f45.google.com with SMTP id bk15so7583482wrb.13 for <58506@debbugs.gnu.org>; Fri, 14 Oct 2022 06:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bD9hIWOPXXdD0i4dwm3U2pDHkqUnid9Q2ggPODUgwnw=; b=mLFmMa/uBYWiCzW//2EKvBSJABCh01zcjrrnsmtORJoxy65/zxli9N56Odj73GRKij lcjG+O7KCsi2zI8+xCGH+8husjVnTqUYwHg5qaM7qR4VbH3EPvknl0V+xCxzW/P5fQVH UNWTnkh4xiMHJKpwvbFzd6yT1xay/cVJC0cET+rwGyrZ/4k7g1sMaIiaVnlDwFiX65wx LM4ITKFfwfLddhNA4WoJXC1idojdHGPdwjAOVO68ogX0wXBitx6JfnEeB0Ooj41898xj gKFcODsPvdfVqSrZiSW4nmpQ6ZFNaS8mi+v7rPDwPIEoEcCebiduYDePCTGhrgFCAb+m DEjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bD9hIWOPXXdD0i4dwm3U2pDHkqUnid9Q2ggPODUgwnw=; b=2TjjMw+uA8NkTTYz9PqhSM0Z5pU8x/XOlJdHNssjqUEHaHrNTCvBknPrvrAjLVwdec qnFYiv28iuNzlBWcm39VaNl7oE9iCWO+1Oca0PMHWxR5FySfsCyf4mE8IYQi0QaaCfio N2e0OF1YSk4TddzbArdo5YBSb+XzSZqj30cizU8Mk6/PJT0PQS3/r9nLOVlvd6Gr43t0 bv3lDYe/5SlZ5UvFY3l8TbuOaUEcmyuA6OwQLheCQSawogOWDSwBjvqeemQ8evYXUQ9N /PnRwYP4oJEp15c59iANbX1ZFN4yzBSS6yXLH2TUzRvWWf5tr6WQ4j8Cj8Hf4C6zc80i LF9g== X-Gm-Message-State: ACrzQf16zfKzDcc9et4DgP8WM1usVQHvd8cDDPtYkzbISgTvO99Ww6Lr 8MzIlOOdG3cBrY7PUuKYx+o= X-Google-Smtp-Source: AMsMyM5g+taRYxPsfzQc3W6LXzRYQ87gdKICEreRsliTUnszBQGMOHDcoa7BttllVNIjItW6kIOV7Q== X-Received: by 2002:a05:6000:704:b0:22e:c347:291c with SMTP id bs4-20020a056000070400b0022ec347291cmr3287924wrb.585.1665754898084; Fri, 14 Oct 2022 06:41:38 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id q10-20020adff94a000000b00225307f43fbsm1931462wrr.44.2022.10.14.06.41.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 06:41:37 -0700 (PDT) From: Robert Pluim In-Reply-To: <871qra8ren.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 14 Oct 2022 15:29:36 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87a65y8sb7.fsf@gnus.org> <87zgdyy1wm.fsf@gmail.com> <871qra8ren.fsf@gnus.org> Date: Fri, 14 Oct 2022 15:41:36 +0200 Message-ID: <87v8omy12n.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Fri, 14 Oct 2022 15:29:36 +0200, Lars Ingebrigtsen said: Lars> Robert Pluim writes: Lars> It's not -- there's a bunch of bug reports around these issues Lars> *handwaves at debbugs*. >>=20 >> My debbugs-gnu-foo must be too weak: I can only find two, Lars> Isn't two a bunch? =F0=9F=98=80 Maybe, but if one of them is "Lars can=CA=BCt reproduce, waiting for feedback", is it really open? >> neither of which look like they=CA=BCd be fixed by changing the synt= ax >> accepted by .dir-locals.el Lars> I suspect that by "syntax" you're thinking about syntax syntax --= I'm Lars> talking semantics syntax. Lars> The .dir-locals.eld file will be Lisp forms, of course. Then I still fail to see how it=CA=BCs different from `eval', unless you=CA= =BCre planning on adding "run these forms before/after setting the mode" semantics. Robert --=20 From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist 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 X-GNU-PR-Keywords: To: Stefan Kangas Cc: 58506@debbugs.gnu.org, Stefan Monnier , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166576006224654 (code B ref 58506); Fri, 14 Oct 2022 15:08:01 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 15:07:42 +0000 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 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 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== 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) From: Philip Kaludercic In-Reply-To: (Stefan Kangas's message of "Fri, 14 Oct 2022 11:22:23 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> 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 Date: Fri, 14 Oct 2022 15:07:19 +0000 Message-ID: <87sfjqh2ag.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 15:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Robert Pluim Cc: 58506@debbugs.gnu.org, Lars Ingebrigtsen , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166576043525317 (code B ref 58506); Fri, 14 Oct 2022 15:14:02 +0000 Received: (at 58506) by debbugs.gnu.org; 14 Oct 2022 15:13:55 +0000 Received: from localhost ([127.0.0.1]:38331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMNn-0006aG-6V for submit@debbugs.gnu.org; Fri, 14 Oct 2022 11:13:55 -0400 Received: from mout01.posteo.de ([185.67.36.65]:34059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMNl-0006a2-0c for 58506@debbugs.gnu.org; Fri, 14 Oct 2022 11:13:53 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D3B15240029 for <58506@debbugs.gnu.org>; Fri, 14 Oct 2022 17:13:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665760426; bh=radjWTiWdjGYy9SOzje3Ioez5NlD75I3VdwTYsslVo8=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=LrUs9BACCXUoT3NUdT/VycY0h6ONVOpA5YMnT9GlwXrs7T25p0OW/hv/sUDvuK2jG g/InippP3Od5bBMzCwNEC0MTjxsKYGIxn0QamXf7U+5GvQOZ1VSmulE8ih+vFLFdii gy1l1NkjyYweao1YQK2IJsTjXh44bn+KLCkgokGw2otOWKYCRoaO+YU/OqYKlNLS5R KSTTPydywrXKKbRhTSFYZp4nUD8oiRLK2rpM/kgs71yIK9kWZRu96uPOS+ilD3+AVF OFQH1UFJ4z9OlLp/L8RUkuxY2Bx/7fRit9uhfqV0LK1fCvzI8y+1LkhqreXtpuFpQi g0K4xMncWGFrA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpqfG6S6dz9rxP; Fri, 14 Oct 2022 17:13:42 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87czauzhch.fsf@gmail.com> (Robert Pluim's message of "Fri, 14 Oct 2022 15:04:46 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> 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 Date: Fri, 14 Oct 2022 15:13:42 +0000 Message-ID: <87k052h1zt.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Robert Pluim writes: >>>>>> On Fri, 14 Oct 2022 13:25:22 +0200, Lars Ingebrigtsen said: > > Lars> So if we introduce .dir-locals.eld, we should take the opportun= ity to > Lars> add a brand new, sensible, extensible syntax, too. > > We could use an almost syntax-less language with lots of structuring > parentheses (LOSP for short). And we=CA=BCd have to call the file > 'please-pwn-my-Emacs.el' > > Seriously, having files popping up safe-variable warnings is scary > enough already, do we really need to complicate things by adding > yet-another not-quite-lisp syntax? Is the support for `eval' in > .dir-locals.el not enough? What I would like to see if some kind of extensibility in the syntax. Perhaps using methods. I have often seen projects using `eval' just because the options they are setting are not trivial assignments, but conventional modifications like prepending an item to a list or setting a symbol property (check out the .dir-locals.el for Guix if you want to see a massive "Do you want to accept all these variables" prompt). > Robert From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: 58506@debbugs.gnu.org, Robert Pluim , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166582555428274 (code B ref 58506); Sat, 15 Oct 2022 09:20:02 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 09:19:14 +0000 Received: from localhost ([127.0.0.1]:39436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdK5-0007Ly-RM for submit@debbugs.gnu.org; Sat, 15 Oct 2022 05:19:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdK3-0007Lk-DF for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 05:19:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9Y1lElsO6ojyMCXZ191HdixO6+wPNStu2kTMzUcJOiQ=; b=sLhpYDu94J4m6lRudEokhYUaRk fpwhMd/2dPoiR4vMOyFjXfRu74wRcPC6hjNr2nuGYS+DARI5ZxiUqs3tJRf0tdigiBl5/sxWr5nod Vz8MG6cSznL2FKY9PQ9w5x9Zn+JHEphP1/hztebsAciFV0YgbQVzvcRRyChiK1ZkXm/c=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojdJr-0006aj-4g; Sat, 15 Oct 2022 11:19:01 +0200 From: Lars Ingebrigtsen In-Reply-To: <87k052h1zt.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 14 Oct 2022 15:13:42 +0000") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXGfIbRPEBTVrX/ //8XHU2tAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDwkFMEplpa4AAAF1SURBVCjPNdC9bqQwEAfw v6MQnbZiJbvZJ7jbp8CnuKEyKw8FXaRsEZ6CFDTpLoqbVJuC1TJPeTM4cYHmx3xh4LpUjRRID2JM bshdQWMj9Usq8Lbz1Vrq4O59ZVra6gB7b0M7kyMKgHuM4WF9kUSWaVbmcf4XaEETjLWuzWklhxh8 APXXxDOBUq1jxw/+IlSp9pRwWHg5oYrUUARW5h2MbHIJ/jczQ49N7nE8CpoKv2qENGyQ7hqO/n4K DJGJ8sC1wDeyDX8UIcnA09zsSgYwpxl3P5DL0E/G6DV1tPZWlDRRIFWtxKvUR0EvMX+hdg32/lCw PwP7NCpeQccJljRmWS5wSeOLQTxe4E6KySCzYJD4Jpc+CyrtvwhIX/E3ZvmKu61FIIOmXUGHN/4+ U0U4anBTuILri36/zdDEQu/MXm45bBj4ZqRH9y3nXld3G/IzcYbpMdxGybRMnnqQ1C/yC/J+A/GV Pg8T8KAY+Cn3HAu2w5n6/2Byy0hq/tYqAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTEwLTE1VDA5 OjA1OjQ4KzAwOjAwbE0DUAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0xMC0xNVQwOTowNTo0OCsw MDowMB0Qu+wAAAAASUVORK5CYII= X-Now-Playing: Bill Callahan & Bonnie Prince Billy's _Blind Date Party (1)_: "Blackness Of The Night" Date: Sat, 15 Oct 2022 11:18:58 +0200 Message-ID: <87ilkl78cd.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > What I would like to see if some kind of extensibility in the syntax. > Perhaps using methods. I have often seen projects using `eval' just > because the options they are setting are not trivial ass [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > What I would like to see if some kind of extensibility in the syntax. > Perhaps using methods. I have often seen projects using `eval' just > because the options they are setting are not trivial assignments, but > conventional modifications like prepending an item to a list or setting > a symbol property (check out the .dir-locals.el for Guix if you want to > see a massive "Do you want to accept all these variables" prompt). Yes, exactly -- people have to resort to using `eval' (which is something people should use as little as possible) because our syntax doesn't allow for simple things like adding values to a list. Post-mode variables and list concatenation are two things we'd like to have, but I'm sure there's a whole bunch of stuff people will come up with if the syntax allowed for (safe) extensions. I don't know what the new syntax would look like -- the current syntax is, er, very implementation-friendly and user-hostile. I.e., it's easy for Emacs to parse, and difficult for people to write: ((nil . ((tab-width . 8) (sentence-end-double-space . t) (fill-column . 70) (emacs-lisp-docstring-fill-column . 65) (vc-git-annotate-switches . "-w") (bug-reference-url-format . "https://debbugs.gnu.org/%s") (diff-add-log-use-relative-names . t))) (c-mode . ((c-file-style . "GNU") (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK")) (electric-quote-comment . nil) (electric-quote-string . nil) (indent-tabs-mode . t) (mode . bug-reference-prog)))) Perhaps a more imperative style would be nice. Err... something like... (in-mode c-mode (set c-file-style "GNU") (set-early treesit-thing t) (add-to-list odd-list 3) (minor-mode indent-tabs-mode) (minor-mode blink-parentheses-mode)) `safep' would have to be a bit adjusted -- a `safep' for `odd-list' would be (cl-every #'oddp) etc. And we'd make the parser backwards/forwards compatible -- i.e., elements that are unknown to the Emacs version running would just be ignored. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 09:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Robert Pluim , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166582669730362 (code B ref 58506); Sat, 15 Oct 2022 09:39:02 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 09:38:17 +0000 Received: from localhost ([127.0.0.1]:39474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdcW-0007td-Kc for submit@debbugs.gnu.org; Sat, 15 Oct 2022 05:38:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdcU-0007t5-7h for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 05:38:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id EC316240101 for <58506@debbugs.gnu.org>; Sat, 15 Oct 2022 11:38:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665826687; bh=9ULBi7Pz/LO3/ZZ8qK03TBkabJcSxjvsFBMa2lDiD9M=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=frDUpAvi/XrSVKHh+/qMugV/u0qeEnHN89txbahVBxTWePy0JJUsBmOrCmM1dVD4B xISWaJVDTcLvra+ndHw+FBJi2X9wTw6JmI9PxWRcFtVNLuhi6b+LZON32tZQ6QCAR1 zWPIxUBTIu2WTiuCt3bx9ritaplTaKU0i2s13WbXzXN1KU5LqyPPj0wM3znoTH9F5m XwjvoX7d0r9QF9kyUaWLYoGW8EAHyCfgB6OvoGXxYR7qaMD2MwLRGIb4K2XtjxtPW6 1zossnv3TLsKZolWzmZTIaqpt2MqyP8Y2hDd3PNR6fS/RRaxfP6nRr59eJ4yX80zO0 01hSfTsVte8OQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MqJ8Y311lz9rxM; Sat, 15 Oct 2022 11:38:05 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87ilkl78cd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 15 Oct 2022 11:18:58 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> 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 Date: Sat, 15 Oct 2022 09:38:00 +0000 Message-ID: <874jw577gn.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> What I would like to see if some kind of extensibility in the syntax. >> Perhaps using methods. I have often seen projects using `eval' just >> because the options they are setting are not trivial assignments, but >> conventional modifications like prepending an item to a list or setting >> a symbol property (check out the .dir-locals.el for Guix if you want to >> see a massive "Do you want to accept all these variables" prompt). > > Yes, exactly -- people have to resort to using `eval' (which is > something people should use as little as possible) because our syntax > doesn't allow for simple things like adding values to a list. > > Post-mode variables and list concatenation are two things we'd like to > have, but I'm sure there's a whole bunch of stuff people will come up > with if the syntax allowed for (safe) extensions. > > I don't know what the new syntax would look like -- the current syntax > is, er, very implementation-friendly and user-hostile. I.e., it's easy > for Emacs to parse, and difficult for people to write: > > ((nil . ((tab-width . 8) > (sentence-end-double-space . t) > (fill-column . 70) > (emacs-lisp-docstring-fill-column . 65) > (vc-git-annotate-switches . "-w") > (bug-reference-url-format . "https://debbugs.gnu.org/%s") > (diff-add-log-use-relative-names . t))) > (c-mode . ((c-file-style . "GNU") > (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK")) > (electric-quote-comment . nil) > (electric-quote-string . nil) > (indent-tabs-mode . t) > (mode . bug-reference-prog)))) Since we are admitting that this is data (-> .eld), not code is it even necessary to worry about how difficult it is two write. Couldn't adding a comment referencing `add-dir-local-variable', or if necessary some other, new function be enough? > Perhaps a more imperative style would be nice. Err... something > like... > > (in-mode c-mode > (set c-file-style "GNU") > (set-early treesit-thing t) > (add-to-list odd-list 3) > (minor-mode indent-tabs-mode) > (minor-mode blink-parentheses-mode)) My only objection to "something like" this is that it appears to be Lisp code, and people could get surprised when they try to add something that isn't (eg. a regular `add-to-list' call that had a quote -- beginners often get tripped up on these minor syntactic points). > `safep' would have to be a bit adjusted -- a `safep' for `odd-list' > would be (cl-every #'oddp) etc. > > And we'd make the parser backwards/forwards compatible -- i.e., elements > that are unknown to the Emacs version running would just be ignored. Ideally there would be a warning or some way you could find out that variables aren't loaded, e.g. if you have a typo in `blink-parenthesis-mode' vs. `blink-parentheses-mode'. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 09:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: 58506@debbugs.gnu.org, Robert Pluim , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166582695630915 (code B ref 58506); Sat, 15 Oct 2022 09:43:02 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 09:42:36 +0000 Received: from localhost ([127.0.0.1]:39494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdgi-00082Z-Cj for submit@debbugs.gnu.org; Sat, 15 Oct 2022 05:42:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdgg-00082M-K0 for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 05:42:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+2d5jUTGGO7lAIpCiTJ9Z+LRzXHz6TpSj86dGL2yGpQ=; b=u2GtMleDXN41bpEAAoFoqkTdH6 uhNuqU2stc2qy3BDsM7gziggr9/g50bn59Ga5eXaQEq/EN1J3kGq0Vo6DR0JgVeefNpQJ4vzz4ERC UnHVDGGLsOTAch9liiJ7XqeoUWPhYYrOfHkFX6w7LFfnQBKJwb9/2Nu0+LEXwv2UVz/A=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojdgV-0006ki-Qo; Sat, 15 Oct 2022 11:42:25 +0200 From: Lars Ingebrigtsen In-Reply-To: <874jw577gn.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 15 Oct 2022 09:38:00 +0000") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXGfIbRPEBTVrX/ //8XHU2tAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDwkFMEplpa4AAAF1SURBVCjPNdC9bqQwEAfw v6MQnbZiJbvZJ7jbp8CnuKEyKw8FXaRsEZ6CFDTpLoqbVJuC1TJPeTM4cYHmx3xh4LpUjRRID2JM bshdQWMj9Usq8Lbz1Vrq4O59ZVra6gB7b0M7kyMKgHuM4WF9kUSWaVbmcf4XaEETjLWuzWklhxh8 APXXxDOBUq1jxw/+IlSp9pRwWHg5oYrUUARW5h2MbHIJ/jczQ49N7nE8CpoKv2qENGyQ7hqO/n4K DJGJ8sC1wDeyDX8UIcnA09zsSgYwpxl3P5DL0E/G6DV1tPZWlDRRIFWtxKvUR0EvMX+hdg32/lCw PwP7NCpeQccJljRmWS5wSeOLQTxe4E6KySCzYJD4Jpc+CyrtvwhIX/E3ZvmKu61FIIOmXUGHN/4+ U0U4anBTuILri36/zdDEQu/MXm45bBj4ZqRH9y3nXld3G/IzcYbpMdxGybRMnnqQ1C/yC/J+A/GV Pg8T8KAY+Cn3HAu2w5n6/2Byy0hq/tYqAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTEwLTE1VDA5 OjA1OjQ4KzAwOjAwbE0DUAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0xMC0xNVQwOTowNTo0OCsw MDowMB0Qu+wAAAAASUVORK5CYII= X-Now-Playing: Bill Callahan & Bonnie Prince Billy's _Blind Date Party (1)_: "I Love You" Date: Sat, 15 Oct 2022 11:42:23 +0200 Message-ID: <87ilkl5sow.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > My only objection to "something like" this is that it appears to be Lisp > code, and people could get surprised when they try to add something that > isn't (eg. a regular `add-to-list' call that had [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > My only objection to "something like" this is that it appears to be Lisp > code, and people could get surprised when they try to add something that > isn't (eg. a regular `add-to-list' call that had a quote -- beginners > often get tripped up on these minor syntactic points). Then I guess `add-to-list' wouldn't be a good "directive" here. >> And we'd make the parser backwards/forwards compatible -- i.e., elements >> that are unknown to the Emacs version running would just be ignored. > > Ideally there would be a warning or some way you could find out that > variables aren't loaded, e.g. if you have a typo in > `blink-parenthesis-mode' vs. `blink-parentheses-mode'. Well, that would make things less backwards/forwards compatible -- people would be getting warnings when flipping between different Emacs versions. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 10:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: 58506@debbugs.gnu.org, Robert Pluim , Stefan Kangas , Stefan Monnier , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16658280498875 (code B ref 58506); Sat, 15 Oct 2022 10:01:02 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 10:00:49 +0000 Received: from localhost ([127.0.0.1]:39513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdyK-0002J5-P7 for submit@debbugs.gnu.org; Sat, 15 Oct 2022 06:00:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojdyI-0002Ir-Kc for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 06:00:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kzAp6kSohtYnvIS5mwEMX6BjLJ3uDH7oGAbUUxvWL6U=; b=MxLY5XvTuqHrWp3YUvDkeuZbN8 YxkTH5bLEuao3vUaBgpyCfBmBJEGiW8MAOHiK9/ZO47FKuN0uRQ1wT6x11YvidVJNLPF8mo2RfPAD mnk9dkEtPYs7snyYSe/Phl2xhMbiKgULxcenDD+6q03BJLqtLBS3WtLshfbr/wAfMx/w=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojdy7-0006rd-O2; Sat, 15 Oct 2022 12:00:37 +0200 From: Lars Ingebrigtsen In-Reply-To: <87ilkl5sow.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 15 Oct 2022 11:42:23 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> <87ilkl5sow.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWpSz40JSiDjbz/ ///rtNpNAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDwoAAv2DvjIAAAGgSURBVCjPNdDBatwwEAbg 32YFG59EkC49LhQ2fgq5dKHxSbtoBPEth0KjpzBLDyGnUupAc/IuMdjzlB05VL7Mx1gzowHg87f3 kOOgETam1husJAuz01bCCk0gRxutHXDqCxI4fSugd7XCZwTB0RmpkzEp8o/kSx7lt4mI7khju11h 6Z78tqoyDkSg02V77uFVtILYu7KHfTeWFAV8y/gpfWzR9sh3ghU0/nydgUGKkVKh5Iyc2dtQ5owN 9kB7Y8B7QAVzJGiDOQGHUDhBV891rqb6UE6J+QPPoVqYK4G0rzif6kUmoEOd47GUIeQ1a+Jr0TIW styxtC++MFjbFCUjUyXwQF13Zt4tlwimp/t0zlMWERd6uksuAyyglvtu2GTIptrUy/tGx3iW5X4S xOsvgSrcjbMUoRl/LDU3MkYynvGmqFlyR5I7Y0NX9rIukmqjt7cPg8Q58xhUXGOSQY+hiANP1L0y 43ugB5JpeZgZKU5HYin9d5exnJhfh8RvjPbIpuZhSrPceeHlR+JpkcUxfi95gcwrxs8fyAdLXLr/ +AcNOcONF1pRZwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0xMC0xNVQxMDowMDowMiswMDowMLDE cj4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMTAtMTVUMTA6MDA6MDIrMDA6MDDBmcqCAAAAAElF TkSuQmCC X-Now-Playing: Bill Callahan & Bonnie Prince Billy's _Blind Date Party (2)_: "Miracles" Date: Sat, 15 Oct 2022 12:00:35 +0200 Message-ID: <87a65x5ruk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> My only objection to "something like" this is that it appears to be Lisp >> code, and people could get surprised when they try to add something th [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> My only objection to "something like" this is that it appears to be Lisp >> code, and people could get surprised when they try to add something that >> isn't (eg. a regular `add-to-list' call that had a quote -- beginners >> often get tripped up on these minor syntactic points). > > Then I guess `add-to-list' wouldn't be a good "directive" here. But, yes, that's a good point about making these directives look too much like Lisp code, so perhaps a different kind of syntax would be nice... but what? From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 10:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic , Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Robert Pluim , Stefan Monnier , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16658283539402 (code B ref 58506); Sat, 15 Oct 2022 10:06:01 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 10:05:53 +0000 Received: from localhost ([127.0.0.1]:39522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oje3E-0002Ra-Ry for submit@debbugs.gnu.org; Sat, 15 Oct 2022 06:05:53 -0400 Received: from mail-oa1-f45.google.com ([209.85.160.45]:45727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oje3E-0002RN-22 for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 06:05:52 -0400 Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-132fb4fd495so8543127fac.12 for <58506@debbugs.gnu.org>; Sat, 15 Oct 2022 03:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=GSPOptf3A3yqr53jzBqonniQ0ypB03u/KolhPVCQTBI=; b=HRzxTjFilqhlIuaeOaUC9CXYtJzNvm7EaYRQAaA/kzZt8nP1MeX7wbeYaN9gTV8lyU 1pT9DyEbyDRZgzYrH1V2kkAPCBFMlVYZ5XV2HKsCIyV3UG68SewjCqMBDOVIrxfz2nqk ADW2oefNLqKC25gYkmPQSBbFk53nlwIInhVSxM4xbZJ/piQJkaoVALHidTGsL70EcH0K 88UFF17bhYSnmBzBuil4qABUBnszbqr8KuI9kXEA4MlP0rksKPlEU9iwzzI9WINhfCQl l8vHf08KEbK8QNkQJJJGG6IJFg+qEI2RivlWrbR5r3B4nyrcUknB3xOabgNVFCng5pKn 83/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GSPOptf3A3yqr53jzBqonniQ0ypB03u/KolhPVCQTBI=; b=pV+5ckszUQtS+ztJxT5MYiQlUNMcsDyePqJckLiilGLw8/Bi4Ilz2T4it43X50n+AW blX9c/yCO7W85ruuTCeaQE+5COE1FFRUejTxCMITi+YmZlzjPY0zvVh+To+I0SmxojBN VgJt7NWAH8kiEw10CZ5zOEHEgUQBQEDa/qe94iI2DWoViY4Sr6tEDAZvya2SS/stOHex HQoG7qxcYGAcx8tG1qLsGS26V+do+FI8hgkxUK08T7wM4r5gZixE7YN+6xI4NvXBcx7R wmSoxHz+xLilFT0p/9jSKOe1ksuQ9x25WC3sm2qQNV8586JyqdQ/DtKP4NfmqBAZSKQ/ z2RQ== X-Gm-Message-State: ACrzQf03liiVGa0j9T9jn+2d4JmR1usHy49+0WXPy+9FQGA23GqMm8bg 0GTDZyhHl6TGxrH9+luN+Evl2c2VcCB8U1WKJ9c= X-Google-Smtp-Source: AMsMyM64NFSwrm0ucc3otMYvFYJGbUhcIznSC7SWVU4cogrFictZHQzwKSPNRImt6tMT2E8uAJgTviSIa0QkBVmzc7E= X-Received: by 2002:a05:6870:9126:b0:132:b724:e96c with SMTP id o38-20020a056870912600b00132b724e96cmr10790692oae.199.1665828346267; Sat, 15 Oct 2022 03:05:46 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 15 Oct 2022 10:05:45 +0000 From: Stefan Kangas In-Reply-To: <874jw577gn.fsf@posteo.net> References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> X-Hashcash: 1:20:221015:juri@linkov.net::KjZGiGGSda7PV0Op:BKvJ MIME-Version: 1.0 Date: Sat, 15 Oct 2022 10:05:45 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > My only objection to "something like" this is that it appears to be Lisp > code, and people could get surprised when they try to add something that > isn't (eg. a regular `add-to-list' call that had a quote -- beginners > often get tripped up on these minor syntactic points). We could add a comment at the top of the file to explain this. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 11:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Robert Pluim , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166583372613788 (code B ref 58506); Sat, 15 Oct 2022 11:36:02 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 11:35:26 +0000 Received: from localhost ([127.0.0.1]:39638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojfRu-0003aK-25 for submit@debbugs.gnu.org; Sat, 15 Oct 2022 07:35:26 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojfRo-0003Zx-Qu for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 07:35:24 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id ADF28240104 for <58506@debbugs.gnu.org>; Sat, 15 Oct 2022 13:35:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665833714; bh=19FMFa63YdZwkV1vsXkMGYOeYlMzbWddzRgoPxMuLmk=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=XoSvBjgDvq1ive09ydcClnZlyPbWf8Vwo504KVFkD7unL13/sVB73pILGooeTxFPf 4LyQokXmbAVQVorAunqK4QD0LILeaJQkYZ/pR+KFLc5ni2BoLWlj84xhupVeAnEFOC KV9pGwHoCZ0cQnqUoasvURiBGeWpihWCEn2+gZdvf/dqz+N3LQg/OOVb3oDhEmAeGD lde42H7kEWW/CSlizW06BABHUEeQSppCBh36qpw7Nyav/tMES0m6cvVJOfnT6GKGAV cxWEHEUig2I0sHlOJg2Oz8Rkk23lEWaVuYdyi6QBFStq/YAv1KtjmGZJUjrRhdbPlT SHBVXrtxcueSg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MqLlh19Tkz6tmr; Sat, 15 Oct 2022 13:35:12 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87ilkl5sow.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 15 Oct 2022 11:42:23 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> <87ilkl5sow.fsf@gnus.org> 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 Date: Sat, 15 Oct 2022 11:35:11 +0000 Message-ID: <87v8ol5ngw.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> My only objection to "something like" this is that it appears to be Lisp >> code, and people could get surprised when they try to add something that >> isn't (eg. a regular `add-to-list' call that had a quote -- beginners >> often get tripped up on these minor syntactic points). > > Then I guess `add-to-list' wouldn't be a good "directive" here. Another idea could be to take inspiration from Guile's "Sandboxed Evaluation"[0] and provide a "safe subset" of Elisp that can be evaluated (with some additional checks). E.g. the following would allow evaluating `add-to-list' if the list if safe and the value is self-evaluating: --8<---------------cut here---------------start------------->8--- (cl-defmethod safe-eval ((_fn (eql 'add-to-list)) &rest args) (when-let* ((list-var (nth 0 args)) (element (nth 1 args)) ((macroexp-const-p element)) (append (nth 2 args)) (new-list (if append (append (symbol-value list-var) (list element)) (cons element (symbol-value list-var)))) ((safe-local-variable-p list-var new-list))) (add-to-list list-var element append))) --8<---------------cut here---------------end--------------->8--- [0] https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Sandboxed-Evaluation.html >>> And we'd make the parser backwards/forwards compatible -- i.e., elements >>> that are unknown to the Emacs version running would just be ignored. >> >> Ideally there would be a warning or some way you could find out that >> variables aren't loaded, e.g. if you have a typo in >> `blink-parenthesis-mode' vs. `blink-parentheses-mode'. > > Well, that would make things less backwards/forwards compatible -- > people would be getting warnings when flipping between different Emacs > versions. No, what I had in mind was not to trigger warnings but either to highlight unused variables or provide a command that would check it for you. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 13:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: 58506@debbugs.gnu.org, Robert Pluim , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166584221831056 (code B ref 58506); Sat, 15 Oct 2022 13:57:02 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 13:56:58 +0000 Received: from localhost ([127.0.0.1]:42286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojhes-00084q-7b for submit@debbugs.gnu.org; Sat, 15 Oct 2022 09:56:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojhem-00084f-EU for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 09:56:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MERLCjQjBewjAY9+2XQFYPIagSeSTosaTuUNlfh029Q=; b=Zr/4xDN7R2Rb9dl27ZJv8DKXbV 1EGd6/MlIVJKEUpdZBC//G3EV3OU/kvB4ea9OSGQvEpHAYEHBcHYL5BttF/pxHCHXduV8MDQI2ZvA UuQhB7u2n+BGftyTRGCL8Di/LADSJfGrJPP+f3EyS0Ojjtk45oPhWI8sMgqtg1H9RhQ8=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojheZ-0000Br-My; Sat, 15 Oct 2022 15:56:42 +0200 From: Lars Ingebrigtsen In-Reply-To: <87v8ol5ngw.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 15 Oct 2022 11:35:11 +0000") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> <87ilkl5sow.fsf@gnus.org> <87v8ol5ngw.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEWFeHypnJ4WEBLf 1NDFubdeU1f///8VmpI9AAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YKDw0zFhZ9GfoAAAF3SURBVDjL bdPBzoMgDABgWPQOCndt0rsGd/+N7I5kvP+r/MWJcwDRg37SYqGMyXMIABjNos7H673sCLDb1ZqD JwA/KBvHDWIkpOsD1rJvJOQBK+BBbmsLwHOgb7dFYx0M87Bn8Acoe6NLeFH03jyhBsjNBDhWAN5z CRrgDYFgL6H3YiXOAcGIfi7hBWitmXwFoLEbQZOBgMEsvfCYgZIU3ViEIZ9B1W37CcEV0DmpplCB 1yibZ0BXbJT1oZnbkCpygbL0C4tsq7DbzQRbhIpbIc2cg6WacLuqNUuuqLo7bfrrnYRdVQ+OC+42 8zsjHsOdjo/qzXIHHUHSmuj+gccHJqRQ5g7xpCPfutb1JQRuB+3UATIBHNCNgSvKEd+sLPUGuBaQ wpl1vTpKHM2ERx5rbq0W4qKOQWBvzem0r4IIsgac6VE+KsCYHlR3ApVkuQGqNMOpbf6CQJZgV2m1 ETiE9kpxB/ZAV+Q+QAP6M/cvMMDwAToOCf4BMfmpy5zz/ZQAAAAldEVYdGRhdGU6Y3JlYXRlADIw MjItMTAtMTVUMTM6NTE6MjIrMDA6MDDRvt7xAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTEwLTE1 VDEzOjUxOjIyKzAwOjAwoONmTQAAAABJRU5ErkJggg== X-Now-Playing: Tess Parks's _Tess Parks an Those Who Were Seen Dancing_: "We Are The Music Makers And We Are The Dreamers Of Dreams" Date: Sat, 15 Oct 2022 15:56:35 +0200 Message-ID: <87wn912nsc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > Another idea could be to take inspiration from Guile's "Sandboxed > Evaluation"[0] and provide a "safe subset" of Elisp that can be > evaluated (with some additional checks). > > E.g. the following [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > Another idea could be to take inspiration from Guile's "Sandboxed > Evaluation"[0] and provide a "safe subset" of Elisp that can be > evaluated (with some additional checks). > > E.g. the following would allow evaluating `add-to-list' if the list if > safe and the value is self-evaluating: Oh, that's a good idea. I wonder whether anybody's written an interpreter for a "safe" version of Emacs Lisp -- then people could put `if' statements etc also into these files. We already mark functions as being side-effect-free, so it seems like code like (if (cl-oddp (% (random) 2)) (setq ...)) would be "safe" together with the safep markup for assignments we already have. We could make a safe restricted language subset for use both here and in similar circumstances. > No, what I had in mind was not to trigger warnings but either to > highlight unused variables or provide a command that would check it for > you. Oh, right. That's another good idea. =F0=9F=98=80 From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 15:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Robert Pluim , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16658467476815 (code B ref 58506); Sat, 15 Oct 2022 15:13:01 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 15:12:27 +0000 Received: from localhost ([127.0.0.1]:42460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojipu-0001lq-JH for submit@debbugs.gnu.org; Sat, 15 Oct 2022 11:12:27 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojipq-0001la-7s for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 11:12:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2DD73240026 for <58506@debbugs.gnu.org>; Sat, 15 Oct 2022 17:12:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665846736; bh=FDdyPlrOHNzwnS4ZjyoJpHYrakHcnyCvosKo/H+nkdQ=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=lwukuOMPyx2cSUhlX5jL9b9ottII4Ygv2JfgDbkFyrnbtcE1zYklg7xaDxTTZOKdt UdpM/yYLbVfe20h2WIbmldLMY69NOAt9Rn6OoAeB24SeD0EKrn0D1jRAMrOw/1gf5V MgDajrn3vTMsoVsZeRPXWr2Cc5cW/R+f8k7I5fg6P3RXUxoGSS/gwQqxR/OLDga4Iz 0Bp7+12KnZ0sid7OUJJCwqjKki/NNHrTuuY9m5rZeMzshdxxy5Wlr+d2eIpbHzzWgV Xr2Pvr9vXTgbcMlwnmUVIzCEIP5VGTsMWR/AO/o2TsvkbSgjzczYwyr/rfILMtCqQ6 iJqza/iN4Xhfg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MqRZ455yRz6tmH; Sat, 15 Oct 2022 17:12:12 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87wn912nsc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 15 Oct 2022 15:56:35 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> <87ilkl5sow.fsf@gnus.org> <87v8ol5ngw.fsf@posteo.net> <87wn912nsc.fsf@gnus.org> 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 Date: Sat, 15 Oct 2022 15:12:12 +0000 Message-ID: <877d115df7.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> Another idea could be to take inspiration from Guile's "Sandboxed >> Evaluation"[0] and provide a "safe subset" of Elisp that can be >> evaluated (with some additional checks). >> >> E.g. the following would allow evaluating `add-to-list' if the list if >> safe and the value is self-evaluating: > > Oh, that's a good idea. I wonder whether anybody's written an > interpreter for a "safe" version of Emacs Lisp -- then people could put > `if' statements etc also into these files. There is unsafep, but that is too strict for what we want. E.g. (unsafep '(setq tab-width 3)) ;; => (global-variable tab-width) even though we would want this to work. I've attached an incomplete sketch of how this could look like --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=safe-eval.el ;;; safe-eval.el --- Evaluation of Safe Emacs Lisp -*- lexical-binding: t; -*- ;; Copyright (C) 2022 Philip Kaludercic ;; Author: Philip Kaludercic ;; Created: 15Oct22 ;; Keywords: lisp ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; An evaluator for safe Emacs Lisp code. ;;; Code: (eval-when-compile (require 'pcase)) (require 'cl-lib) (require 'seq) (require 'macroexp) (cl-defgeneric safe-eval-p (form) "Return non-nil if it is safe to evaluate FORM. A FORM is safe if it is not a function call, has no side-effects or a method has been defined to verify its safety." (:method :around (form) "Macroexpand FORM before testing for safety." (cl-call-next-method (macroexpand-all form))) ;; Some basic logic (:method ((form (head if))) "A `if' FORM is safe if all arguments are safe." (pcase-let ((`(if ,(pred safe-eval-p) ,(pred safe-eval-p) . ,else) form)) (seq-every-p #'safe-eval-p else))) (:method ((form (head when))) "A `when' FORM is safe if all arguments are safe." (pcase-let ((`(when ,(pred safe-eval-p) . ,body) form)) (seq-every-p #'safe-eval-p body))) (:method ((form (head unless))) "A `unless' FORM is safe if all arguments are safe." (pcase-let ((`(unless ,(pred safe-eval-p) . ,body) form)) (seq-every-p #'safe-eval-p body))) ;; Common state modifiers (:method ((form (head setq))) "A `setq' FORM is safe the new value is a safe value." (pcase-let ((`(setq ,var ,val) form)) (and (safe-eval-p val) (safe-local-variable-p var val)))) (:method ((form (head add-hook))) "A form with `add-hook' must modify a hook locally." (pcase-let* ((`(add-hook ',hook ,(or `#',func `',func) ,(pred macroexp-const-p) ,(and (pred macroexp-const-p) (pred identity))) form) (new-hook (cons func (symbol-value hook)))) (and (safe-local-variable-p hook new-hook) (macroexp-const-p func)))) (:method ((form (head add-to-list))) "A `add-to-hook' FORM is safe the new list is has a safe value." (pcase-let* ((`(add-to-list ',list-var ,element ,append) form) (old-list (symbol-value list-var)) (new-list (if append (append old-list (list element)) (cons element old-list)))) ;; FIXME: `new-list' contains `element' before evaluation. (and (safe-local-variable-p list-var new-list) (safe-eval-p element) (macroexp-const-p append)))) ;; ;; Fallback (:method ((form t)) "A fallback handler to check if FORM is side-effect free." (or (not (consp form)) (and (get (car form) 'side-effect-free) (seq-every-p #'safe-eval-p (cdr form)))))) ;;;###autoload (defun safe-eval (form) "Evaluate FORM is it is safe per `safe-eval-p'. If it is not safe, it will be silently ignored." (when (safe-eval-p form) (eval form t))) ;;;###autoload (defun safe-eval-file (filename) "Evaluate the safe contents of FILENAME. All files deemed unsafe by `safe-eval-p' are silently ignored.'" (with-temp-buffer (insert-file-contents filename) (while (not (eobp)) (safe-eval (read (current-buffer)))))) (provide 'safe-eval) ;;; safe-eval.el ends here --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > We already mark functions as being side-effect-free, so it seems like > code like > > (if (cl-oddp (% (random) 2)) > (setq ...)) > > would be "safe" together with the safep markup for assignments we > already have. We could make a safe restricted language subset for use > both here and in similar circumstances. That is a good point, but I think more tagging should be done. Ideally this would read as regular elisp (which is kind of ironic considering that we are discussing an .eld file), so it would be nice if mode-specific modifications could be done by just writing --8<---------------cut here---------------start------------->8--- (when (derived-mode-p 'c-mode) (setq tab-width 8)) --8<---------------cut here---------------end--------------->8--- or something like that. >> No, what I had in mind was not to trigger warnings but either to >> highlight unused variables or provide a command that would check it for >> you. > > Oh, right. That's another good idea. =F0=9F=98=80 One idea would be to use Flymake. --=-=-=-- From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Kangas , Robert Pluim , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16658471617548 (code B ref 58506); Sat, 15 Oct 2022 15:20:01 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 15:19:21 +0000 Received: from localhost ([127.0.0.1]:42478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojiwb-0001xg-Cq for submit@debbugs.gnu.org; Sat, 15 Oct 2022 11:19:21 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojiwY-0001xR-9L for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 11:19:20 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6F06C100130; Sat, 15 Oct 2022 11:19:12 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C8AA9100084; Sat, 15 Oct 2022 11:19:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665847150; bh=KLvd9zC3TcPwgEiCqvLdnJNS8vSfRYLh45zTUMOO98U=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IQZOwy7o3axrWxryok3lVzE6nYnYsZJaFnjtmzMSOvjqa+gBlY0mqIsne2UTCeVS3 HQ2vMpfKPcILaIDT+MqrWsaZ8K+xrw1zWPr/EOf7abQ8sdHF5mb554g3B1h3Y6uaPG RlECzznLnObvQdj2z/Zt4fueE4kFsspH3V4vnbb7ljGGON+pj54STbTO3JCPyEeZlh Yl9PyjEdO0d78jTV5AExlbICOrUCejmWOIXCnb/xme4xmqASXaIhw+ewD4LZlHi2XJ O3ITcrmmB9VpTThkaBTCnngUHVkrRr5ZiCePVMJz8s2ssYM8m0647u1HxLFNw1qJPK DWywnMegpHgxA== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7C3FD120F16; Sat, 15 Oct 2022 11:19:10 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87ilkl78cd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 15 Oct 2022 11:18:58 +0200") Message-ID: References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> Date: Sat, 15 Oct 2022 11:19:09 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I don't know what the new syntax would look like -- the current syntax > is, er, very implementation-friendly and user-hostile. I.e., it's easy > for Emacs to parse, and difficult for people to write: As Philip points out, "hard to write" is circumvented by `add-dir-local-variable`. The more serious problem IMO is that it's hard for humans to read. [ Also, while it's not ELisp code, I think it's code more than it's data. And indeed this discussion is about making it more like code. ] > ((nil . ((tab-width . 8) > (sentence-end-double-space . t) > (fill-column . 70) > (emacs-lisp-docstring-fill-column . 65) > (vc-git-annotate-switches . "-w") > (bug-reference-url-format . "https://debbugs.gnu.org/%s") > (diff-add-log-use-relative-names . t))) > (c-mode . ((c-file-style . "GNU") > (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK")) > (electric-quote-comment . nil) > (electric-quote-string . nil) > (indent-tabs-mode . t) > (mode . bug-reference-prog)))) I think the above is better written: ((nil (tab-width . 8) (sentence-end-double-space . t) (fill-column . 70) (emacs-lisp-docstring-fill-column . 65) (vc-git-annotate-switches . "-w") (bug-reference-url-format . "https://debbugs.gnu.org/%s") (diff-add-log-use-relative-names . t)) (c-mode (c-file-style . "GNU") (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK")) (electric-quote-comment . nil) (electric-quote-string . nil) (indent-tabs-mode . t) (mode . bug-reference-prog))) > Perhaps a more imperative style would be nice. Err... something > like... > > (in-mode c-mode > (set c-file-style "GNU") > (set-early treesit-thing t) > (add-to-list odd-list 3) > (minor-mode indent-tabs-mode) > (minor-mode blink-parentheses-mode)) I fully agree with Philip here that it looks too much like ELisp. We should either make it use a proper subset of ELisp, or make it use a syntax that's sufficiently different. Maybe something like: (c-mode (:set c-file-style "GNU") (:set treesit-thing t) (:set odd-list (cons 3 odd-list)) (:minor-mode indent-tabs-mode -1) ;; Disable (:minor-mode blink-parentheses-mode)) [ I dropped the "set-early" because I still haven't heard any good reason why we'd need that nor what that would really mean (e.g. how it could be implemented). ] > `safep' would have to be a bit adjusted -- a `safep' for `odd-list' > would be (cl-every #'oddp) etc. Sorry, I don't know what problem you're alluding to. Why would `safep` need to be adjusted? Stefan From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: 58506@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Kangas , Robert Pluim , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166585096514276 (code B ref 58506); Sat, 15 Oct 2022 16:23:02 +0000 Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 16:22:45 +0000 Received: from localhost ([127.0.0.1]:42572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojjvw-0003iC-NJ for submit@debbugs.gnu.org; Sat, 15 Oct 2022 12:22:44 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojjvt-0003hy-8v for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 12:22:43 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B6E34807C3; Sat, 15 Oct 2022 12:22:35 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3880480011; Sat, 15 Oct 2022 12:22:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665850954; bh=IIMm3DtocwAaACOawnrYwO5szomSQOmMxR7nrcwUgzk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Su1ZhpP2ZJHyX7iWyAJ1qQzBZBEWOSBvebCo8XjRIO+IgeHM/KaO76mUlCnaZYafZ XU6fonm0PCeuVwi0WJuWUM6RsWKUzv3cFtzDyw/nPwklPCLKxhR9R9Bz684MiN5/qf 0tjbjFQ7tQqGLsBfGRHYWUho7E+Zkx4ULQA/I4D/LUO42HnvxA244pjmM9dEMzY+Dk p48RlgMZYy+D2wBdxH0Jy9g6vvwKe+ijFHKKHNLM7uO1f1Nv9VUdYKIuM1/HDoAu9f Fy3VwdK+FsNcj64EKdK4C8F766qTzvX8aUOLUPsbvaREdd5RKJtDSx9eWYL6Vyumfs CL4JUaHCtPlfA== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A088612098D; Sat, 15 Oct 2022 12:22:33 -0400 (EDT) From: Stefan Monnier In-Reply-To: <877d115df7.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 15 Oct 2022 15:12:12 +0000") Message-ID: References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> <87ilkl5sow.fsf@gnus.org> <87v8ol5ngw.fsf@posteo.net> <87wn912nsc.fsf@gnus.org> <877d115df7.fsf@posteo.net> Date: Sat, 15 Oct 2022 12:22:32 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.126 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > There is unsafep, but that is too strict for what we want. E.g. > > (unsafep '(setq tab-width 3)) ;; => (global-variable tab-width) We have our own safety predicates for setting variables, so the `unsafep` test should only be applied to the computation of the value to which we want to set the variable. After checking it's safe, we can run that code to get the value, and then we can call the variable's own safety predicate to check that the computed value is safe. Sefan From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 08:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: 58506@debbugs.gnu.org, Robert Pluim , Juri Linkov , Stefan Kangas , Stefan Monnier Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166590959721226 (code B ref 58506); Sun, 16 Oct 2022 08:40:02 +0000 Received: (at 58506) by debbugs.gnu.org; 16 Oct 2022 08:39:57 +0000 Received: from localhost ([127.0.0.1]:43289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojzBc-0005WH-Hi for submit@debbugs.gnu.org; Sun, 16 Oct 2022 04:39:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojzBa-0005W3-CM for 58506@debbugs.gnu.org; Sun, 16 Oct 2022 04:39:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HdYG2s2LoX4zoIJIb+Z6X68WLSRe5wjL8l1evhCuGRw=; b=AUH/t3H7Z9Q0FfR3pi2JpCOorx BbjyV+qf+XnKeuYdwz4vBTc1orwMceu80cpdoppi4Acm8cxffDlUoqrP081A7MFt3w7oOe2WSHV6a PpgFiD6ip/Q+hBxI7m/TQkPhEA1x4U6PqY4IIMmKYbkz5mpCdEBj9Yq/ARJP3cP6VC5I=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojzBO-0004AY-PS; Sun, 16 Oct 2022 10:39:45 +0200 From: Lars Ingebrigtsen In-Reply-To: <877d115df7.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 15 Oct 2022 15:12:12 +0000") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> <87ilkl5sow.fsf@gnus.org> <87v8ol5ngw.fsf@posteo.net> <87wn912nsc.fsf@gnus.org> <877d115df7.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEX9/f3duqakYVKt invZ1M8ZFhRfS0apoZn///8B22NGAAAAAWJLR0QIht6VegAAAAd0SU1FB+YKEAggEJBAeH8AAAGu SURBVDjL3ZJNV+owEIaLRrpt2mq3CBfdWlC7bTHndnulTtgqknRbpDR/33xCFX7BnUV6Ok/ed2aS eN7/E+EkP5sfjKfVWXAxnjy/n3fCYeWhNiYFQQXBZVwY63E6D3nucxV/acbr2a5ReTROw3AdIKIC EYFbbBQva4zD9cgZ4yhOcaAEd5UEdHOm2WqOI/Z62tRsGeEbzkcnIKQY/3lmHydgwSivp0BPjqVj sJwCwG/JgAP9VIA1PwGacegoAw5LlyrMh7BVJwWcQW12ckiN19NowpQVwKP6vwR2ayT7XCggQ3c2 BLDVrh+SjhpSSTKkYG9nMSqzNRw0UvHm2ih3O5uHlXcNcrHh7yJThXKoWU+BtvOp81LLynPnU6YO gJY2DvjpPYOjxs0qvb6y0mmYcqOtBeFXcwm9qGMLokkz7IPWFkFCKEBlv6aWK47w1igCD+01sKQQ IlCAqk09BYqFaH0LvL39KkBKA+BBDQWw6YGttnjTXq+H2nHSCQ0qfYX/joeYiCwHW8Snx/ci2jxL DmBzfHsk8MpEjkbV4V38esZ6QKJqvP8EV26wgX5F342HlaYHMLL1AAAAJXRFWHRkYXRlOmNyZWF0 ZQAyMDIyLTEwLTE2VDA4OjMyOjE2KzAwOjAw+/JmZgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0x MC0xNlQwODozMjoxNiswMDowMIqv3toAAAAASUVORK5CYII= X-Now-Playing: =?UTF-8?Q?R=C3=B3is=C3=ADn?= Murphy's _Ruby Blue_: "Sinking Feeling" Date: Sun, 16 Oct 2022 10:39:40 +0200 Message-ID: <87a65w2mcz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > There is unsafep, but that is too strict for what we want. E.g. > > (unsafep '(setq tab-width 3)) ;; => (global-variable tab-width) > > even though we would want this to work. I've attached an incom [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > There is unsafep, but that is too strict for what we want. E.g. > > (unsafep '(setq tab-width 3)) ;; =3D> (global-variable tab-width) > > even though we would want this to work. I've attached an incomplete > sketch of how this could look like Cool; looks very promising. >> We already mark functions as being side-effect-free, so it seems like >> code like >> >> (if (cl-oddp (% (random) 2)) >> (setq ...)) >> >> would be "safe" together with the safep markup for assignments we >> already have. We could make a safe restricted language subset for use >> both here and in similar circumstances. > > That is a good point, but I think more tagging should be done. Ideally > this would read as regular elisp (which is kind of ironic considering > that we are discussing an .eld file), Yes, so perhaps we should come up with a new extension for this "new language", i.e., "safe Lisp". Err... ".dir-locals.els"? > so it would be nice if > mode-specific modifications could be done by just writing > > (when (derived-mode-p 'c-mode) > (setq tab-width 8)) > > or something like that. Yes, our side-effect-free tagging isn't very complete at present --=20 probably because it's not used that much (in a visible way). I mean, the byte compiler uses the data to warn, for instance. But this would give people an impetus to do further tagging. It looks like `derived-mode-p' is side-effect-free, for instance. >>> No, what I had in mind was not to trigger warnings but either to >>> highlight unused variables or provide a command that would check it for >>> you. >> >> Oh, right. That's another good idea. =F0=9F=98=80 > > One idea would be to use Flymake. That's possible, but I think it should be possible to just use font locking, too. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 08:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Kangas , Robert Pluim , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166591006322079 (code B ref 58506); Sun, 16 Oct 2022 08:48:02 +0000 Received: (at 58506) by debbugs.gnu.org; 16 Oct 2022 08:47:43 +0000 Received: from localhost ([127.0.0.1]:43293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojzJ9-0005k2-JC for submit@debbugs.gnu.org; Sun, 16 Oct 2022 04:47:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojzJ7-0005jK-GD for 58506@debbugs.gnu.org; Sun, 16 Oct 2022 04:47:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7O63Hs1foictWoX4xsCtj7VU/XfVWCYt6tgV2VY7BcE=; b=C+Wqy7dley+vfBBqss+6TiNQTt 9C3xlYgXvRi9JUx9rMDrJ1aBJDVgkifJJDuflSCC8aPF64Y6ZbbWel7GqkivIpcot17MWhpWA7r81 LX+Dpt+e85L/cAdjG15wVkJ9hgRAUc6pwfzivLzOi5gaGrev3sQT5cR/ncVQ0jON0AFg=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojzIw-0004FO-G5; Sun, 16 Oct 2022 10:47:32 +0200 From: Lars Ingebrigtsen In-Reply-To: (Stefan Monnier's message of "Sat, 15 Oct 2022 11:19:09 -0400") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEX9/f3duqakYVKt invZ1M8ZFhRfS0apoZn///8B22NGAAAAAWJLR0QIht6VegAAAAd0SU1FB+YKEAggEJBAeH8AAAGu SURBVDjL3ZJNV+owEIaLRrpt2mq3CBfdWlC7bTHndnulTtgqknRbpDR/33xCFX7BnUV6Ok/ed2aS eN7/E+EkP5sfjKfVWXAxnjy/n3fCYeWhNiYFQQXBZVwY63E6D3nucxV/acbr2a5ReTROw3AdIKIC EYFbbBQva4zD9cgZ4yhOcaAEd5UEdHOm2WqOI/Z62tRsGeEbzkcnIKQY/3lmHydgwSivp0BPjqVj sJwCwG/JgAP9VIA1PwGacegoAw5LlyrMh7BVJwWcQW12ckiN19NowpQVwKP6vwR2ayT7XCggQ3c2 BLDVrh+SjhpSSTKkYG9nMSqzNRw0UvHm2ih3O5uHlXcNcrHh7yJThXKoWU+BtvOp81LLynPnU6YO gJY2DvjpPYOjxs0qvb6y0mmYcqOtBeFXcwm9qGMLokkz7IPWFkFCKEBlv6aWK47w1igCD+01sKQQ IlCAqk09BYqFaH0LvL39KkBKA+BBDQWw6YGttnjTXq+H2nHSCQ0qfYX/joeYiCwHW8Snx/ci2jxL DmBzfHsk8MpEjkbV4V38esZ6QKJqvP8EV26wgX5F342HlaYHMLL1AAAAJXRFWHRkYXRlOmNyZWF0 ZQAyMDIyLTEwLTE2VDA4OjMyOjE2KzAwOjAw+/JmZgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0x MC0xNlQwODozMjoxNiswMDowMIqv3toAAAAASUVORK5CYII= X-Now-Playing: =?UTF-8?Q?R=C3=B3is=C3=ADn?= Murphy's _Ruby Blue_: "Through Time" Date: Sun, 16 Oct 2022 10:47:28 +0200 Message-ID: <875ygk2lzz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > As Philip points out, "hard to write" is circumvented by > `add-dir-local-variable`. My ever-reliable statistics team is informing me that 99.74% of .dir-locals files are written by hand. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: > As Philip points out, "hard to write" is circumvented by > `add-dir-local-variable`. My ever-reliable statistics team is informing me that 99.74% of .dir-locals files are written by hand. > We should either make it use a proper subset of ELisp, or make it use > a syntax that's sufficiently different. > > Maybe something like: > > (c-mode > (:set c-file-style "GNU") > (:set treesit-thing t) > (:set odd-list (cons 3 odd-list)) > (:minor-mode indent-tabs-mode -1) ;; Disable > (:minor-mode blink-parentheses-mode)) Yes, that's much better than my initial suggestion. But I like the safe-lisp approach better. > [ I dropped the "set-early" because I still haven't heard any good > reason why we'd need that nor what that would really mean (e.g. how it > could be implemented). ] Some major modes react to variables to change how they work. So you'd say (setq org-thingamabob-syntax-version 2) (org-thingamabob-mode) And this has to be set before the mode is called, because the mode is very expensive and re-interpreting the file afterwards is ungood. >> `safep' would have to be a bit adjusted -- a `safep' for `odd-list' >> would be (cl-every #'oddp) etc. > > Sorry, I don't know what problem you're alluding to. > Why would `safep` need to be adjusted? It's not necessary, but it'd be nice to be able to say "this element is safe to add to the list" instead of saying "after adding this element to the list, the resulting list is safe". From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 09:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Robert Pluim , Stefan Kangas , Stefan Monnier , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16659128983547 (code B ref 58506); Sun, 16 Oct 2022 09:35:02 +0000 Received: (at 58506) by debbugs.gnu.org; 16 Oct 2022 09:34:58 +0000 Received: from localhost ([127.0.0.1]:43409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok02s-0000v8-6a for submit@debbugs.gnu.org; Sun, 16 Oct 2022 05:34:58 -0400 Received: from mout02.posteo.de ([185.67.36.66]:51945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok02o-0000us-Vr for 58506@debbugs.gnu.org; Sun, 16 Oct 2022 05:34:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7BA81240103 for <58506@debbugs.gnu.org>; Sun, 16 Oct 2022 11:34:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665912889; bh=ZmLklNrGNjAE3Hs2GwUNWKbm6lVEpijVJptNKNS62wA=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=SbXpak4UVvdReOYIk19nIp6VTrrEKCE8kxdK1OAmi7R4upEGFRFr2jqIfjjEwzLd3 QwxvsT1bIFguHrVWwhs+FAy7kWn/ke5I1jEIQgLe2GyTgYst1Toq8FMHmXIvkJcDo3 fRCR7o9PMnGzfgQnaIWchICFGPj1Mzn8FotD/l+I3UAkdcV9yDcTg2UZJWJRa+3lt3 bY/8uRY+vdDErOv4Z/TilJrgd2o/TgUkSdTqMP8/e37aZ8dxVCdz2bwtWAHZyPkQfi wRaBbvJGds5S5z1tkIvvDRpR3jOkMNJU2mko0r8AAUdlSLBlZS+JxA9vNYN8Oea9aI IX4LE9IX1Vt5A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mqw2J4xzvz9rxF; Sun, 16 Oct 2022 11:34:48 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <875ygk2lzz.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 16 Oct 2022 10:47:28 +0200") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <875ygk2lzz.fsf@gnus.org> 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 Date: Sun, 16 Oct 2022 09:34:48 +0000 Message-ID: <87czas5cxz.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Stefan Monnier writes: > >> As Philip points out, "hard to write" is circumvented by >> `add-dir-local-variable`. > > My ever-reliable statistics team is informing me that 99.74% of > .dir-locals files are written by hand. Really? I guess by virtue of participating in this very discussion I'm not the average Emacs user, but I'd be surprised if `add-dir-local-variable' is that unknown. >> We should either make it use a proper subset of ELisp, or make it use >> a syntax that's sufficiently different. >> >> Maybe something like: >> >> (c-mode >> (:set c-file-style "GNU") >> (:set treesit-thing t) >> (:set odd-list (cons 3 odd-list)) >> (:minor-mode indent-tabs-mode -1) ;; Disable >> (:minor-mode blink-parentheses-mode)) And I assume that if you don't wrap the block in a (foo-mode ...) construct, that the settings will apply to all modes, right? > Yes, that's much better than my initial suggestion. But I like the > safe-lisp approach better. ... why not both? I can imagine that safe-lisp will take a while before it becomes usable, just because something like `safe-eval-p' has to be quite exhaustive, and at the very least handle all special forms. Elisp isn't a Scheme so that means that a number of methods have to be implemented... Meanwhile .dir-locals.eld with Stefan's syntax seems like a good improvement over the current syntax -- especially if you are right about how many people write these files from hand. >> [ I dropped the "set-early" because I still haven't heard any good >> reason why we'd need that nor what that would really mean (e.g. how it >> could be implemented). ] > > Some major modes react to variables to change how they work. So > you'd say > > (setq org-thingamabob-syntax-version 2) > (org-thingamabob-mode) > > And this has to be set before the mode is called, because the mode is > very expensive and re-interpreting the file afterwards is ungood. > >>> `safep' would have to be a bit adjusted -- a `safep' for `odd-list' >>> would be (cl-every #'oddp) etc. >> >> Sorry, I don't know what problem you're alluding to. >> Why would `safep` need to be adjusted? > > It's not necessary, but it'd be nice to be able to say "this element is > safe to add to the list" instead of saying "after adding this element to > the list, the resulting list is safe". I have seen a lot of packages that either forget or don't bother to specify safe values even if they are applicable. Making it easier to do so could help motivate maintainers to specify these. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 09:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philip Kaludercic Cc: 58506@debbugs.gnu.org, Robert Pluim , Stefan Kangas , Stefan Monnier , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16659134144421 (code B ref 58506); Sun, 16 Oct 2022 09:44:01 +0000 Received: (at 58506) by debbugs.gnu.org; 16 Oct 2022 09:43:34 +0000 Received: from localhost ([127.0.0.1]:43423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok0BB-00019F-U3 for submit@debbugs.gnu.org; Sun, 16 Oct 2022 05:43:34 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok0B9-000190-1q for 58506@debbugs.gnu.org; Sun, 16 Oct 2022 05:43:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bMzlL4XOU+PPGS8/4e1d68OW/5lOplZyKl9/PBJARkw=; b=X7120+RmrxYX4fr1TS666rBLDI UKSd5iyxVVB8QF0TKgRF7xjF40hwMH7GYAvGvkNcYyeh0PyqjHpqi/+aZfRrKu/DHYINdaib/bqci 2ON6m0PBljksxvrRKt5JhqyTT1WkGp9cG8yEX42mu3nOF7B3GJkGwlPG5YQUnKlghsdM=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ok0Ay-0004hZ-Go; Sun, 16 Oct 2022 11:43:22 +0200 From: Lars Ingebrigtsen In-Reply-To: <87czas5cxz.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 16 Oct 2022 09:34:48 +0000") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <875ygk2lzz.fsf@gnus.org> <87czas5cxz.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUiGBFINiJfTS9Z U0OVfVr////xyjrFAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YKEAkfBj2IjSUAAAGlSURBVDjLhVQL ksMgCAV7ASA9QCQeYI09wDb1/mda0DbNb2adzmjeEx4gFAAA2ZZq8RXtCOtyQnQqqsonwhjVyHui O1sXHJjhAm/+7g2mA/xxRidwnjzarBuy37zWBqBut/WEnThr7ImNI6R/iaGUs7Qj6MkfCAvJLW+5 ZNjXKnpAfLMUdzrU0rwgDDcAoxFdbk2EJyQGupmExbASAVSBzB8O5JGvfoQkYpPx0PBLsFmZXYzy 0772L0Ws3AjaButK1lri2hrjtljtpHM0j7R8Cf4QaXSxras3kQ3UvEu9EXm07fHcxQShqBUSlR6/ Dt2aRiAoBRacMVTtBH50hkJVnoh539VmIUuV3x7LPb6rKEYwaLJBsBNa6RoR2juJZV5Z55lE3+0l AhDLnBYbHCKUoQ5jt7CNx5BqzexjJfNbORARl0etdZRUNUuU7ipAeqLdr3XRWv2n3RUFe1k2JjVO lyjcCuuOQTQ+7KqvqL2FsG3Ekl4OaiRpCFqDup1o1aLzZ9q/RWGe7KYexqd9ptfxn6GPjEyvfDE6 Vvdcn1fjaSrWgyv+B4kPPMqT/iDoAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTEwLTE2VDA5OjMx OjA1KzAwOjAwMBEe4wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0xMC0xNlQwOTozMTowNSswMDow MEFMpl8AAAAASUVORK5CYII= X-Now-Playing: Tracey Thorn's _Out Of The Woods_: "Easy" Date: Sun, 16 Oct 2022 11:43:19 +0200 Message-ID: <87r0z8je88.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: >> Yes, that's much better than my initial suggestion. But I like the >> safe-lisp approach better. > > ... why not both? I can imagine that safe-lisp will take a while before > it becomes usable, jus [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: >> Yes, that's much better than my initial suggestion. But I like the >> safe-lisp approach better. > > ... why not both? I can imagine that safe-lisp will take a while before > it becomes usable, just because something like `safe-eval-p' has to be > quite exhaustive, and at the very least handle all special forms. Elisp > isn't a Scheme so that means that a number of methods have to be > implemented... We're not in a hurry here. =F0=9F=98=80 If we're aiming for a `safe-eval-= p' solution, then adding another syntax that will then be deprecated again seems counter-productive. But Stefan's syntax does look attractive, and allows both manual editing and automatic editing, which a safe-lisp approach doesn't. And the safe-list approach also makes backwards compatibility more iffy -- if we introduce `cond' in safe-lisp in Emacs 33, we'd still want the file to not bug out in Emacs 32. So safe-lisp would just have to ignore forms that are unknown to it, which is less attractive than just ignoring (:some-new-thing ...) in Stefan's syntax. Uhm uhm hm. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 13:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Kangas , Robert Pluim , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16659275477551 (code B ref 58506); Sun, 16 Oct 2022 13:40:02 +0000 Received: (at 58506) by debbugs.gnu.org; 16 Oct 2022 13:39:07 +0000 Received: from localhost ([127.0.0.1]:43694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok3r9-0001xj-55 for submit@debbugs.gnu.org; Sun, 16 Oct 2022 09:39:07 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok3r0-0001x3-5R for 58506@debbugs.gnu.org; Sun, 16 Oct 2022 09:39:06 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 72A8B4408B6; Sun, 16 Oct 2022 09:38:52 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D604F440897; Sun, 16 Oct 2022 09:38:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665927530; bh=SNmtsjamp8mtABTA21cDkQkZWsnQ+Ie0b5bOUjsjwNM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GdFOKg0GSxul5TCdHwfVBA3Hp0NHCnbBDc4TxSjip15ow/7gr52Yr8uiwrQsz4J4i I/q2W6KlYdN8l/ZENTR1NZEzzObhTkdAC/P/dVyGFn7UiBtN9YKs1S3NZiVOOnhSem teHLrMB3//sChgOVS9umhWgHrWnWjLvAQaMfgfx8tGJkMmSt0Ijzh38Fk+M+skEqvC 8iEnpRHg+9FwZkXc69I1FpNX7t/yCZo372sFqTexjak10+mmbm92q574l2ni+JVITU M+eOFPx/lOE3yWwh6wyNDtwcEUC7oOcr5FAxFSInLBqDfI/QRAyuwBo0X/6Jp/+EQ9 iYY1dhpyDXg1Q== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9047412047D; Sun, 16 Oct 2022 09:38:50 -0400 (EDT) From: Stefan Monnier In-Reply-To: <875ygk2lzz.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 16 Oct 2022 10:47:28 +0200") Message-ID: References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <875ygk2lzz.fsf@gnus.org> Date: Sun, 16 Oct 2022 09:38:48 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.053 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> [ I dropped the "set-early" because I still haven't heard any good >> reason why we'd need that nor what that would really mean (e.g. how it >> could be implemented). ] > > Some major modes react to variables to change how they work. So > you'd say > > (setq org-thingamabob-syntax-version 2) > (org-thingamabob-mode) We've been solving this problem for the last 30 years without introducing a new kind of "set before mode", so I don't understand your example. If `org-thingamabob-mode` is a major mode, then it starts with `kill-all-local-variables`, so either you mark `org-thingamabob-syntax-version` as persistent-local or you're screwed from the outset (you can try some convoluted hack using `change-major-mode-hook` but it's gonna be ugly). OTOH using `:after-hook` or `hack-local-variables-hook` works right now without very much effort. > And this has to be set before the mode is called, because the mode is > very expensive and re-interpreting the file afterwards is ungood. So: delay the expensive part. It's usually pretty easy, and most of the time it's a good idea for all kinds of other reasons. >>> `safep' would have to be a bit adjusted -- a `safep' for `odd-list' >>> would be (cl-every #'oddp) etc. >> Sorry, I don't know what problem you're alluding to. >> Why would `safep` need to be adjusted? > It's not necessary, but it'd be nice to be able to say "this element is > safe to add to the list" instead of saying "after adding this element to > the list, the resulting list is safe". Ah, I see. My intuition is YAGNI but I haven't thought too much about it. Stefan From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 13:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Kangas , Robert Pluim , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.16659278998135 (code B ref 58506); Sun, 16 Oct 2022 13:45:01 +0000 Received: (at 58506) by debbugs.gnu.org; 16 Oct 2022 13:44:59 +0000 Received: from localhost ([127.0.0.1]:43705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok3wp-000278-08 for submit@debbugs.gnu.org; Sun, 16 Oct 2022 09:44:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok3wm-00026d-EN for 58506@debbugs.gnu.org; Sun, 16 Oct 2022 09:44:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zpjqmk1sJqRnLmk6FM22bkiiGw3ogXB4lHuWhjQZ4r0=; b=Acw9dK1XKJua580RpdkCguPxtF j+0yGSBmmgHwW9NMTZu6Xh2KWMMGZ86XAdh6Wj1Rdx5DV4KSh/nknrMXqlZCS3tiGOeE29Ituc58/ tnNVcm2ARv8riERCS2h1hDrldHYwnOGLF+VsCy7B5Fzp/ZK03ncxthH/ekZUuh8Gz1/k=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ok3wb-0006l8-Gi; Sun, 16 Oct 2022 15:44:47 +0200 From: Lars Ingebrigtsen In-Reply-To: (Stefan Monnier's message of "Sun, 16 Oct 2022 09:38:48 -0400") References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <875ygk2lzz.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUAAAA1OyE8RCc9 RjFDSipMUzFJUS5YXktuZx6JexqtlhX4zwrYtRDDxL////9f4clqAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+YKEA0sBs7qQMkAAAF0SURBVDjLfZS9TsMwEMfTqC/QjmxYlvgQWxmYLTdCqBuNy1wSv0HF jphg68Yz0AcAnIkJlOxMfRfufPmokjN/KUp8P//v/JloNJlMxWyep6vN6qHTJoqN1Tqx1tjMvzOt BCoaQRuaQEESHuwAHwAsSHdKoKEkOIy1vlMtVb8J6KEQ5MsAMKwjNrnJeJByBgIDR4IgNZZPlbJx TDWchgoBXDMP6lxCyF4qArO71yfJAPXsXLFlwJVzriyaeNYC9eKKqnRfdTnZOcqqAs8HVaE99+Cs KB0QypXs9+08zqECONwjNuYEfKYFBHfwbDlw04CT3w5cONJhKqyRHhUEbntgfu3D1Wc73DEOF5Ld v2G8fJf1enqHr7Lw420Xy28tbQhaviUDTnfVz/pwz9MaKKFF7/jwJ9GaELCBcxW6BrHhLf+BLFBj qVlFMdNdBoACIFkHLg8D8BKoSwLKH3QlmgJNDUE6ntL/xfNoDLPA4AQk8BeFAtcfLtlmuuwisSAA AAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMTAtMTZUMTM6NDQ6MDYrMDA6MDBpu13pAAAAJXRFWHRk YXRlOm1vZGlmeQAyMDIyLTEwLTE2VDEzOjQ0OjA2KzAwOjAwGOblVQAAAABJRU5ErkJggg== X-Now-Playing: =?UTF-8?Q?R=C3=B3is=C3=ADn?= Murphy's _Simulation_: "Simulation" Date: Sun, 16 Oct 2022 15:44:44 +0200 Message-ID: <87lepfj31v.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > We've been solving this problem for the last 30 years without > introducing a new kind of "set before mode", so I don't understand > your example. See bug#57003. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: > We've been solving this problem for the last 30 years without > introducing a new kind of "set before mode", so I don't understand > your example. See bug#57003. From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2022 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 58506@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Kangas , Philip Kaludercic , Robert Pluim Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166607854720363 (code B ref 58506); Tue, 18 Oct 2022 07:36:02 +0000 Received: (at 58506) by debbugs.gnu.org; 18 Oct 2022 07:35:47 +0000 Received: from localhost ([127.0.0.1]:51035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okh8c-0005IL-PD for submit@debbugs.gnu.org; Tue, 18 Oct 2022 03:35:47 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:47419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okh8a-0005I6-Lh for 58506@debbugs.gnu.org; Tue, 18 Oct 2022 03:35:45 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 7562D2000F; Tue, 18 Oct 2022 07:35:34 +0000 (UTC) From: Juri Linkov In-Reply-To: (Stefan Monnier's message of "Sat, 15 Oct 2022 11:19:09 -0400") Organization: LINKOV.NET References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> Date: Tue, 18 Oct 2022 10:28:27 +0300 Message-ID: <86h701pp45.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I think the above is better written: > > ((nil > (tab-width . 8) > (sentence-end-double-space . t) > (fill-column . 70) > (emacs-lisp-docstring-fill-column . 65) > (vc-git-annotate-switches . "-w") > (bug-reference-url-format . "https://debbugs.gnu.org/%s") > (diff-add-log-use-relative-names . t)) > (c-mode > (c-file-style . "GNU") > (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK")) > (electric-quote-comment . nil) > (electric-quote-string . nil) > (indent-tabs-mode . t) > (mode . bug-reference-prog))) So the dotted pair notation should be avoided only at the first level. Then what about making it closer to the syntax of display-buffer-alist rules where CONDITION is passed to buffer-match-p that can match not only major-mode, but also a regular expression of a buffer name. And display-buffer-alist's ACTION alist already looks like dir-locals's alist. > Maybe something like: > > (c-mode > (:set c-file-style "GNU") > (:set treesit-thing t) > (:set odd-list (cons 3 odd-list)) > (:minor-mode indent-tabs-mode -1) ;; Disable > (:minor-mode blink-parentheses-mode)) The drawback of the current syntax is that `mode` and `eval` are used like variables, but really are keywords. Using the keyword syntax `:` will help to resolve this ambiguity. Then for backwards-compatibility dir-locals could support both the current dotted pairs and new :keyword syntax, where unrecognized keywords are simply ignored in older versions. Also should file-local variables support the same :keyword syntax? From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2022 13:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 58506@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Kangas , Philip Kaludercic , Robert Pluim Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166609954016034 (code B ref 58506); Tue, 18 Oct 2022 13:26:02 +0000 Received: (at 58506) by debbugs.gnu.org; 18 Oct 2022 13:25:40 +0000 Received: from localhost ([127.0.0.1]:51582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okmbD-0004AX-VC for submit@debbugs.gnu.org; Tue, 18 Oct 2022 09:25:40 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okmbA-0004AF-5E for 58506@debbugs.gnu.org; Tue, 18 Oct 2022 09:25:38 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4945F80814; Tue, 18 Oct 2022 09:25:29 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A5BFE805DB; Tue, 18 Oct 2022 09:25:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666099527; bh=0YCugoi/AtS9uFs1M5mzU/+O/R1pfpnImjapb+9x/Z8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LULXKwsME6FFdvc9UMty1ZVBhdVNiQsbtZMkKzSaHX0Vr4FUIVPcluktvpXlcv1aJ iCbMOjtMk7+FX+Q9lyF0it+Gv5DblhHj7btkMUo6UMQMyrzHdZze1nBw01Jj9IqMIZ Yy17+mR2tJ9RQ8hiLjJtVp9BkjQVTvcxo3SuuwWYnP55TcXb16L5nigbDYiD5+VQ6N DszBQ9oTQA/0OfkNoCSUbnMx00tbjUZIH1WhhVswzDcr4jAqnPT0X5jEG1yjzjsiWl qXfUPeYEYPyAg7dAgl795lD/2bjKj6N5xBusWPUQovCUODzWiEafuwkroo3D+tWPy5 I9clibFHlpFNw== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 663EB120F20; Tue, 18 Oct 2022 09:25:27 -0400 (EDT) From: Stefan Monnier In-Reply-To: <86h701pp45.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 18 Oct 2022 10:28:27 +0300") Message-ID: References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <86h701pp45.fsf@mail.linkov.net> Date: Tue, 18 Oct 2022 09:25:26 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.118 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I think the above is better written: >> >> ((nil >> (tab-width . 8) >> (sentence-end-double-space . t) >> (fill-column . 70) >> (emacs-lisp-docstring-fill-column . 65) >> (vc-git-annotate-switches . "-w") >> (bug-reference-url-format . "https://debbugs.gnu.org/%s") >> (diff-add-log-use-relative-names . t)) >> (c-mode >> (c-file-style . "GNU") >> (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK")) >> (electric-quote-comment . nil) >> (electric-quote-string . nil) >> (indent-tabs-mode . t) >> (mode . bug-reference-prog))) > > So the dotted pair notation should be avoided only at the first level. That's one way to look at it. The other is that the dotted syntax doesn't make much sense when what you have after the `.` is always a list. > Then what about making it closer to the syntax of display-buffer-alist rules > where CONDITION is passed to buffer-match-p that can match not only major-mode, > but also a regular expression of a buffer name. No opinion on that. But indeed, it could be useful to specify a kind of local `auto-mode-alist` additions. > >> Maybe something like: >> >> (c-mode >> (:set c-file-style "GNU") >> (:set treesit-thing t) >> (:set odd-list (cons 3 odd-list)) >> (:minor-mode indent-tabs-mode -1) ;; Disable >> (:minor-mode blink-parentheses-mode)) > > The drawback of the current syntax is that `mode` and `eval` > are used like variables, but really are keywords. Using the > keyword syntax `:` will help to resolve this ambiguity. I think that's minor. The fact that it only contains values rather than (safely computable) expressions is the more problematic part. > Also should file-local variables support the same :keyword syntax? I don't think there's as much need for changes there, so I'd rather wait for the dir-locals part to stabilize before trying to see if/how to move it over to file-local variables. Stefan From unknown Tue Jun 17 22:29:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2022 13:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 58506@debbugs.gnu.org, Philip Kaludercic , Stefan Kangas , Robert Pluim , Juri Linkov Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166609983516602 (code B ref 58506); Tue, 18 Oct 2022 13:31:01 +0000 Received: (at 58506) by debbugs.gnu.org; 18 Oct 2022 13:30:35 +0000 Received: from localhost ([127.0.0.1]:51605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okmfy-0004Ji-HX for submit@debbugs.gnu.org; Tue, 18 Oct 2022 09:30:34 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okmfx-0004JN-2o for 58506@debbugs.gnu.org; Tue, 18 Oct 2022 09:30:33 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CA9B9442865; Tue, 18 Oct 2022 09:30:27 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7DC27442868; Tue, 18 Oct 2022 09:30:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666099826; bh=KcDlgrkguidlKL4OI5s+kLQAtNh1pW6fOwl7urRgQ1w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=PyoUtNiVuAnnS1YB5S1PbBRp8bIZ+Z5Hkk/SRCYH6l4jbjKUmsI97eg23f2uQ4gaw OrI1+RrKNudkmmKvcL20d+O+dhyMt05g3pcXeZMwDQzXkWEJRt6k2dcDMv3Rjzup3E XsySxPmxWtZFm2mPSzpGEVh/QD/XiCnHd3645Zy9MOHEPe5HIhqxntWN/dGKKuCASb wG+ogkNnwEaS90U9CJi/XnEtbWRxlnXY+ey93+ogm0sr+KkaO7rlSRE97yXvW4BSlQ ElzpXqkXjK5lmC9yW8MHnAeKB5Unl2ut/KZc7RQyArrq96qbcqVcAdp5hhyKgkf2Ke q+8NMhooQ0gCw== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 45F90120623; Tue, 18 Oct 2022 09:30:26 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87lepfj31v.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 16 Oct 2022 15:44:44 +0200") Message-ID: References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <875ygk2lzz.fsf@gnus.org> <87lepfj31v.fsf@gnus.org> Date: Tue, 18 Oct 2022 09:30:24 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.066 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen [2022-10-16 15:44:44] wrote: > Stefan Monnier writes: >> We've been solving this problem for the last 30 years without >> introducing a new kind of "set before mode", so I don't understand >> your example. > See bug#57003. I don't see anything new there. We've been solving this problem for years. Ihor just wasn't aware of it. Stefan