From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda 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 10:49:26 -0300 Message-ID: <514ef416-843b-4b80-abcf-cb4621b4b58d@gmail.com> References: <03e5c99d-f900-4c8f-88b3-e7b458c0c777@gmail.com> <83o7gsqh3i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38935"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 66663@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 21 15:50:59 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 1quCNW-0009sg-NV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Oct 2023 15:50:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quCNE-0005qP-SL; Sat, 21 Oct 2023 09:50:41 -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 1quCNA-0005Uh-H9 for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 09:50:36 -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 1quCN9-0001HU-3A for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 09:50:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quCNa-0001Ax-Fb for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 09:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Oct 2023 13:51:02 +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.16978962084439 (code B ref 66663); Sat, 21 Oct 2023 13:51:02 +0000 Original-Received: (at 66663) by debbugs.gnu.org; 21 Oct 2023 13:50:08 +0000 Original-Received: from localhost ([127.0.0.1]:42610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quCMi-00019X-7Y for submit@debbugs.gnu.org; Sat, 21 Oct 2023 09:50:08 -0400 Original-Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]:61937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quCMd-00018w-F7 for 66663@debbugs.gnu.org; Sat, 21 Oct 2023 09:50:06 -0400 Original-Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1e993765c1bso1288493fac.3 for <66663@debbugs.gnu.org>; Sat, 21 Oct 2023 06:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697896170; x=1698500970; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=e9vYSDvBWXbwJuEoTjiPAsVSM4pylH/5urVieQjPzzY=; b=bUJP6F+KL+U/SW7sYypLUTByJaA3RXYOu2dpnWWlOplHxKjYBmD17NayXrIzX0SXLI bS9r/+o1D001s37Wotn/x0+7gLVn5qV9tUpQM0WnPnMfFNG+pshSX7gD1Onww6hTqa5B E6lXKAdkXrGWFTMMixRDpyYFqCFKjXbnlwmN6MV/GyrS/6kweEDf0AHhc3h5L5rCf7bS X0vfq/g9LVKclzuLutBdsA1o8n7URPD2PbL2jSoU7Gt7y6e66Rw+pxSDASwTjP1ASQJN a7fT7EnUsh9b/T9vfUiDP2LwiYElaqQ0wpHKGkSrrmtC3UfJFLBttfiMiOU1o6Z3HEvf EI2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697896170; x=1698500970; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e9vYSDvBWXbwJuEoTjiPAsVSM4pylH/5urVieQjPzzY=; b=Srv9QpxpIOgYJMYXlnjJ9s9hmtfwN0/4Lw8Xlg0tb0YIWxk5qS0K/eQfxD3vHox3Hr 1BH4oe3qP6wo2caqlLyA06cIeVBO2c3EaLKFv2bCp/EffxKWc2MxImaGB5DONRwIeuMe 9dnoH9jkIYQWelaxMZyLdFoaCKIY7y08nlY+gYrIoeqcwQYKlfDPa8RbXVfgWmkX6oX7 FsZwpcAGemUWNuzP2820FH5V4hRdZtvBMxULE6+UiN+pyVsJAt0uz985/xWmI6u5DfKJ gq2XxSRqozw4J2k3gxIHgdKnQKDU/pUO+YOUnM8lFum55fhqZNMnuRFfP96wd+5yzRE1 XxDg== X-Gm-Message-State: AOJu0YzxR/3ARkwepQP2meYb8kUwGAv/ycg0YemLWlz+fqz5QClqZq7m n3k3+T15BgvHY7qlCXG/EUw= X-Google-Smtp-Source: AGHT+IFLvBMJAyTRKkzJTa7S4TqzqSNpZBisLk9iltEDeN6saumWNHA7klpap60QbTJE+GG6VL/gqw== X-Received: by 2002:a05:6870:9e4c:b0:1e9:c18b:b2da with SMTP id pt12-20020a0568709e4c00b001e9c18bb2damr5584108oab.18.1697896169759; Sat, 21 Oct 2023 06:49:29 -0700 (PDT) Original-Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id z20-20020aa79494000000b006926d199fdcsm3294805pfk.190.2023.10.21.06.49.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 Oct 2023 06:49:29 -0700 (PDT) Content-Language: en-US In-Reply-To: <83o7gsqh3i.fsf@gnu.org> 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:272905 Archived-At: On 21/10/23 09:45, Eli Zaretskii wrote: >> 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. Yes, that makes sense.  I'll try that approach.