From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#66663: 30.0.50; Allow dir locals file selection in *-dir-local-variable functions Date: Sun, 22 Oct 2023 20:55:14 +0300 Organization: LINKOV.NET Message-ID: <86pm16tud9.fsf@mail.linkov.net> References: <03e5c99d-f900-4c8f-88b3-e7b458c0c777@gmail.com> <83o7gsqh3i.fsf@gnu.org> <514ef416-843b-4b80-abcf-cb4621b4b58d@gmail.com> <86zg0bu99e.fsf@mail.linkov.net> <8b4f9985-6bde-40e8-bd89-e74084e823a5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14830"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , 66663@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 22 19:56:53 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1quch2-0003h1-SV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Oct 2023 19:56:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qucgl-0001ED-L8; Sun, 22 Oct 2023 13:56:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qucgj-0001D8-Rh for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2023 13:56:33 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qucgj-0005sb-HB for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2023 13:56:33 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quchC-0003f7-04 for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2023 13:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Oct 2023 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66663 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66663-submit@debbugs.gnu.org id=B66663.169799741914061 (code B ref 66663); Sun, 22 Oct 2023 17:57:01 +0000 Original-Received: (at 66663) by debbugs.gnu.org; 22 Oct 2023 17:56:59 +0000 Original-Received: from localhost ([127.0.0.1]:48048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quch9-0003ei-2c for submit@debbugs.gnu.org; Sun, 22 Oct 2023 13:56:59 -0400 Original-Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:41583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quch5-0003eQ-Nw; Sun, 22 Oct 2023 13:56:57 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 36DA5E0002; Sun, 22 Oct 2023 17:56:19 +0000 (UTC) In-Reply-To: <8b4f9985-6bde-40e8-bd89-e74084e823a5@gmail.com> (Mauro Aranda's message of "Sat, 21 Oct 2023 19:10:10 -0300") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272992 Archived-At: close 66663 30.0.50 thanks >> This needs to be run in the project's root directory >> where the dir-locals file is saved.  Probably it's not easy >> to find the root without using project.el.  But when one of the >> files already exists (either .dir-locals.el or .dir-locals-2.el), >> then better to use the directory of the existing file by default. > > In this new patch, I went for using it if already available and we > couldn't find an existing file by other means. Thanks, I've tested your patch, and it works nicely, so now pushed to master.