From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Where does a dir-local variable come from? Date: Mon, 5 Sep 2022 05:58:12 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38818"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 05 11:00:05 2022 Return-path: Envelope-to: geh-help-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 1oV7xd-0009vd-7A for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Sep 2022 11:00:05 +0200 Original-Received: from localhost ([::1]:54182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oV7xb-0002uc-Uq for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Sep 2022 05:00:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oV7w4-0002sV-3G for help-gnu-emacs@gnu.org; Mon, 05 Sep 2022 04:58:28 -0400 Original-Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]:37450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oV7w2-0000ix-C5 for help-gnu-emacs@gnu.org; Mon, 05 Sep 2022 04:58:27 -0400 Original-Received: by mail-il1-x12a.google.com with SMTP id s3so2403916ilv.4 for ; Mon, 05 Sep 2022 01:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=y4Vk0DQvt6sHZ1oXVLtlXMpS5P7seG5jrko040jTlf8=; b=l1EE5gYhQBgTYDFcuSR0EOQgbLqinvEhbZ5/WDUlIV/V34r9lRQlIVatj4pb0jpkNy fnX6xxuLjwTX4dK3DDt5Wt78x/vsevjIjozA4oOEQe0iV+E5WS0LVmIxx+6PvfjfYh6h 4lIJjmP3U9r/gTLjgsuzYKNtoKB+xasYQwuu/5C/+g3Rc5MpuCcf3jMH8Z8x9XpCCQOV F0ZPOVun6Xf2XXQ89SPdBeKOemTJqbqJ3ff6jhHfoYSYnEaPFYwUzmeg+VDNUBEk5yk+ VAgKcq6t/Qby5WFHlwrEQvPQKb/HhaAgL+Ho3g7zNjReOyaqGAXMq5VAclRDrPl9xjmE YPrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=y4Vk0DQvt6sHZ1oXVLtlXMpS5P7seG5jrko040jTlf8=; b=AIWKGu2hYTEUTlxYOq2+fitr2+85LSlvDa4zxVfKBnPVnoGKLw7vnferu7Hz0hJUPr l1+yEwtjOcwiuvoUvahx0JREukkYIfFRMPaVAGIrrBoLOM8Gs2L6OwLB0WhnJvE4i3sb tsd5garZAoFMry4HUlqKrlwoSQir+deFKe8YSTip+yPFKt/rmns4diYYr+yHXM7nw3c+ VvNR7IDcceyY7fPza9ZhtMhSvULZnij3zQosQWUHBRzdvovcW69LYlktieHUV3HafEJ4 ZyCxwL77desYqkHTqaOEiEo5Lk+cHXkIKVYIo/XQfXU/4UO1tc4ZGxIrR9ZwHt0CfM2i Nv1A== X-Gm-Message-State: ACgBeo3EBm01gXclFMc8k/oxx41MJfMjCgFxluqwHtDyxELeXg/T7L11 4aUSNqMHOt/HXwNBTSrho3zmxPVs26oxwlkPXaN4mG7/CPU= X-Google-Smtp-Source: AA6agR4gfp9Z8p7f3JMtd0ifiF4EhVtV9gmhw4y7Zch1au+QSEdIqXyPc4MurYbmQVd+a+HL13lSk0dx72yM5lHjjI8= X-Received: by 2002:a92:6a0d:0:b0:2e5:afe7:8d95 with SMTP id f13-20020a926a0d000000b002e5afe78d95mr25706187ilc.262.1662368304228; Mon, 05 Sep 2022 01:58:24 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::12a; envelope-from=eduardoochs@gmail.com; helo=mail-il1-x12a.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139249 Archived-At: Hi list, is there a good low-level way to discover where a certain dir-local variable "comes from"? For example, in my machine these two files /home/edrx/.dir-locals.el /home/edrx/eev-current/.dir-locals.el specify different values for the variable `ee-preferred-c', and so I (usually) have at least two different entries in `dir-locals-class-alist' that mention `ee-preferred-c'. They can be accessed with: (alist-get '/home/edrx/ dir-locals-class-alist) (alist-get '/home/edrx/eev-current/ dir-locals-class-alist) I am looking for code that parses the value of `dir-locals-class-alist', and that can say things like "the dir-local variable `ee-preferred-c' appears in the entries for /home/edrx/eev-current/, /home/edrx/, and /home/edrx/dednat6/ of `dir-locals-class-alist'; as your current directory is /home/edrx/eev-current/experimental/ then the entries for /home/edrx/eev-current/ and /home/edrx/ are relevant here, and the one in /home/edrx/eev-current/ is the one that takes precedence"... Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev