From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66663: 30.0.50; Allow dir locals file selection in *-dir-local-variable functions Date: Sat, 21 Oct 2023 15:45:37 +0300 Message-ID: <83o7gsqh3i.fsf@gnu.org> References: <03e5c99d-f900-4c8f-88b3-e7b458c0c777@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16497"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66663@debbugs.gnu.org, juri@linkov.net To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 21 14:46:48 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 1quBNQ-00044w-1b for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Oct 2023 14:46:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quBNG-0007cO-R9; Sat, 21 Oct 2023 08:46:38 -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 1quBNF-0007cC-Du for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 08:46:37 -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 1quBNC-00054e-DY for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 08:46:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quBNd-0007LR-M1 for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 08:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Oct 2023 12:47: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.169789238228169 (code B ref 66663); Sat, 21 Oct 2023 12:47:01 +0000 Original-Received: (at 66663) by debbugs.gnu.org; 21 Oct 2023 12:46:22 +0000 Original-Received: from localhost ([127.0.0.1]:42519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quBMw-0007KB-9H for submit@debbugs.gnu.org; Sat, 21 Oct 2023 08:46:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quBMq-0007Jv-FB for 66663@debbugs.gnu.org; Sat, 21 Oct 2023 08:46:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quBMJ-0004lA-9Y; Sat, 21 Oct 2023 08:45:39 -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=fvuDqg2X3ytCh83fR8MyzbOghidHviWhlCzTZqIwkDo=; b=PKdHWG2USh+5 cspjqq+dgoE91GguhXvRqPjZFC2xa8xWeoJD4hibkXR0zl4YUdBlIEO7DwjQ88GXzWwNrOtTpzOn0 fqyQYD4faDEAnI1ihoMvd3X1iShSp232u5uoN1PGlWrgRImwA8/wFF8w73tOQprrrDIJvz5vvbYFy fZjnUdzbGgO2yrHU7SCeH/cbK62ZSf5TprEa0usFqZ3xGX5m9I6QLODMmO9E4KtmLjVOJO4S8Gliv ANTPFMTiO1Z+Os06hiYPxEJIN3T5hBm4TDNcHbhJp3fLOikuxFgse48fEY9IpwhW48B/q9lCw/0Dj QGkDGzs7H3owWUOMdPA38w==; In-Reply-To: (message from Mauro Aranda on Sat, 21 Oct 2023 09:16:28 -0300) 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:272889 Archived-At: > Cc: Juri Linkov > Date: Sat, 21 Oct 2023 09:16:28 -0300 > From: Mauro Aranda > > +Since both @file{.dir-locals.el} and @file{.dir-locals-2.el} file > +might exist in the same directory, there may be some clash about which > +file you want to modify when executing the above three commands. To > +solve that, all three of them take a prefix argument, to indicate > +which file you want to modify. When both files exist, a prefix > +argument means to prefer to modify @file{.dir-locals.el} instead of > +@file{.dir-locals-2.el}. When one of the files doesn't exist, and > +you're adding a variable or copying the file-local variables, a prefix > +argument means to modify (i.e., create) the file that doesn't yet > +exist. I think a better UI is to ask the user when the command is invoked with a prefix argument.