From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jacob First Newsgroups: gmane.emacs.bugs Subject: bug#44066: 27.1; Values ignored when using .dir-locals.el and .dir-locals-2.el together Date: Sun, 18 Oct 2020 00:55:08 -0400 Message-ID: <87sgacdtg3.fsf@pebbles.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14041"; mail-complaints-to="usenet@ciao.gmane.io" To: 44066@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 18 17:08:17 2020 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 1kUAID-0003Yg-3S for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 17:08:17 +0200 Original-Received: from localhost ([::1]:50544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUAIC-00019V-4S for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 11:08:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUAI0-00017P-5E for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 11:08:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUAHz-0006Ru-SJ for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 11:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kUAHz-0006WV-Nt for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 11:08:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jacob First Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Oct 2020 15:08:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44066 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160303365824982 (code B ref -1); Sun, 18 Oct 2020 15:08:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2020 15:07:38 +0000 Original-Received: from localhost ([127.0.0.1]:38854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUAHY-0006Uk-Cv for submit@debbugs.gnu.org; Sun, 18 Oct 2020 11:07:38 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kU0jR-0007U2-I4 for submit@debbugs.gnu.org; Sun, 18 Oct 2020 00:55:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kU0jR-0004mW-8h for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 00:55:45 -0400 Original-Received: from mail-io1-f49.google.com ([209.85.166.49]:34636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kU0jO-0006pS-DD for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 00:55:43 -0400 Original-Received: by mail-io1-f49.google.com with SMTP id z5so564132iob.1 for ; Sat, 17 Oct 2020 21:55:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UujgFELoEI66hdTw0wssPSHO7tZOvKXu9ku3xN0C7CA=; b=YXnR3p10o05OEHqddx2ycgOCX7gSqKXjHJ67mkQPz2ArOAAcw906CbPZhOjjCfmoV0 EAZ2jLnTh2afRVHahKLsQATHSt2boS8xz/3SSTy+r82Larch2Ca+eZfKe7OFo5bB6orq 8/oso0PbiILAohpZhYTIFYa6Jz+o5xDgEQt3G6RtyMy2zG6E3RLSEDDctIyARGgHb6SG NR1iYn6yzW7wgnmTKzGsaM7jvnYrpWaD4mBnNVeFdWBLy7kUg3z9/4m+oxt1NIZoToQM tUQrd5XUkUNFxtNQn0thBlRD/jP28gQoGPxrxJ9hunWsbPC9mJ5c5SAx+8xJaPQTyGzy iVgQ== X-Gm-Message-State: AOAM533c4hJn8px2pQTsvGjCO075k7t7AxNBuBbIwXvzcdEYmWIUDD4K VWtWtYG6KpYKceczUo67zQyqnMvm6Ng= X-Google-Smtp-Source: ABdhPJxeCii8U6txzeF7FibYIja4tQsLj95u+UoN/QGtFMfr7zLCJUu+A0xDpdwvqsuCOWqsx73UYg== X-Received: by 2002:a02:8794:: with SMTP id t20mr7634122jai.70.1602996939686; Sat, 17 Oct 2020 21:55:39 -0700 (PDT) Original-Received: from pebbles (205-201-19-136.starry-inc.net. [205.201.19.136]) by smtp.gmail.com with ESMTPSA id p86sm7548036ilb.5.2020.10.17.21.55.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 21:55:39 -0700 (PDT) Received-SPF: pass client-ip=209.85.166.49; envelope-from=first.jacob@gmail.com; helo=mail-io1-f49.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/18 00:55:40 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 18 Oct 2020 11:07:35 -0400 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" Xref: news.gmane.io gmane.emacs.bugs:190889 Archived-At: Hello, I've experienced a case where some directory local variable values are ignored when .dir-locals.el and .dir-locals-2.el are both present in a directory. As Emacs normally sets all the variable values when only one of the files is present, and I can find nothing in the manual to suggest that the behavior should be different when both are present, I believe this behavior is erroneous. To reproduce, first create a directory with 3 files with the filenames and the contents listed below: =3D file.txt =3D test file =3D .dir-locals.el =3D ((nil . ((eval . (setq var1 'foo)) (eval . (setq var2 'bar))))) =3D .dir-locals-2.el =3D ((nil . ((eval . (setq var3 'baz)) (eval . (setq var4 'qux))))) Then run: emacs -Q file.txt Emacs should display a prompt with a message beginning "The local variables list in /path/to/the/dir/ contains values that may not be safe (*)" with a list of potentially unsafe values at the bottom. I expect to see the following values listed in some order: * eval : (setq var1 'foo) * eval : (setq var2 'bar) * eval : (setq var3 'baz) * eval : (setq var4 'qux) Instead, only the following values are listed: * eval : (setq var4 'qux) * eval : (setq var2 'bar) If I then type ! to accept the values, evaluating each variable via M-: will confirm that only var2 and var4 have been set and that var1 and var3 are unbound. If I quit Emacs, delete .dir-locals-2.el, and follow the above steps again, the prompt now lists all the values from .dir-locals.el as expected: * eval : (setq var1 'foo) * eval : (setq var2 'bar) Similarly if I delete .dir-locals.el but keep .dir-locals-2.el intact, the prompt lists all the values from .dir-locals-2.el as expected: * eval : (setq var3 'baz) * eval : (setq var4 'qux) Autogenerated system info follows. Thank you. *** In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cair= o version 1.16.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12009000 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. End of buffer [3 times] Please type y, n, or !, or C-v/M-v to scroll: ! Setting =E2=80=98safe-local-variable-values=E2=80=99 temporarily since "ema= cs -q" would overwrite customizations Configured using: 'configure CONFIG_SHELL=3D/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.= 0.16/bin/bash SHELL=3D/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bi= n/bash --prefix=3D/gnu/store/zcrrjwkzzlx96szsxmacflrl3bybm413-emacs-27.1 --enable-fast-install --with-modules --with-cairo --disable-build-details' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER GMP Important settings: value of $EMACSLOADPATH: /home/jfirst/.local/share/guix/extra-profiles/gu= i/gui/share/emacs/27.1/lisp:/home/jfirst/.local/share/guix/extra-profiles/g= ui/gui/share/emacs/site-lisp value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cus-edit easymenu cus-start cus-load wid-edit cl-loaddefs cl-lib map seq byte-opt gv bytecomp byte-compile cconv tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 66357 9862) (symbols 48 7546 1) (strings 32 20201 1623) (string-bytes 1 628515) (vectors 16 10568) (vector-slots 8 138494 9480) (floats 8 29 23) (intervals 56 194 0) (buffers 1000 13))