From unknown Tue Aug 19 02:50:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8095 <8095@debbugs.gnu.org> To: bug#8095 <8095@debbugs.gnu.org> Subject: Status: dir-locals-directory-cache confusion Reply-To: bug#8095 <8095@debbugs.gnu.org> Date: Tue, 19 Aug 2025 09:50:46 +0000 retitle 8095 dir-locals-directory-cache confusion reassign 8095 emacs submitter 8095 Glenn Morris severity 8095 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 22 03:31:56 2011 Received: (at submit) by debbugs.gnu.org; 22 Feb 2011 08:31:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Prnf1-0004Ba-DT for submit@debbugs.gnu.org; Tue, 22 Feb 2011 03:31:55 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Prnez-0004BO-2N for submit@debbugs.gnu.org; Tue, 22 Feb 2011 03:31:53 -0500 Received: from localhost ([127.0.0.1]:58917) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Prnes-0000kw-MP; Tue, 22 Feb 2011 03:31:46 -0500 From: Glenn Morris To: submit@debbugs.gnu.org Subject: dir-locals-directory-cache confusion X-Spook: Forte mindwar Europol CNCIS lynch subversive Pine Gap X-Ran: ^8+DfX?U^Yli,5\ifyp".L5+SKp5wK[p83+ane2wT'YCe($ddE-(6!^-=XNIiVI*4|V=r4 X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 22 Feb 2011 03:31:45 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) Package: emacs Version: 23.2.94 There is some weirdness going on with caching of dir-locals files: mkdir foo cat < foo/.dir-locals.el ((nil . ((sentence-end-double-space . t)))) EOF emacs -q foo/.dir-locals.el C-h v sentence-end-double-space This variable is a directory local variable from the file "/home/gm/tmp/foo/". ^^^^^^^^^^^^^^^^^^^^^^^ That's a directory, not a file. Then do: M-: (setq dir-locals-directory-cache nil) and repeat: C-h v sentence-end-double-space This variable is a directory local variable from the file "/home/gm/tmp/foo/.dir-locals.el". ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OK, now it's a directory. Analysis: dir-locals-find-file is either going to return a file (if it did not find a matching entry in the cache), or a directory (if it did find an entry in the cache). Further comment: This line in dir-locals-find-file (equal (nth 2 dir-elt) (nth 5 (file-attributes (car dir-elt)))) compares the mtime element from the cache with the current mtime of the *directory*. The mtime element in the cache is set by dir-locals-read-from-file and is the mtime of the *file*. So in summary there is some confusion between directory and files that messes up the caching. The whole thing should be consistent about whether it wants to refer to directories or files. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 03:58:34 2011 Received: (at 8095-done) by debbugs.gnu.org; 24 Feb 2011 08:58:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PsX1t-0006Kh-4v for submit@debbugs.gnu.org; Thu, 24 Feb 2011 03:58:33 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PsX1s-0006KV-2u for 8095-done@debbugs.gnu.org; Thu, 24 Feb 2011 03:58:32 -0500 Received: from localhost ([127.0.0.1]:39308) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsX1l-0006XQ-7Y; Thu, 24 Feb 2011 03:58:25 -0500 From: Glenn Morris To: 8095-done@debbugs.gnu.org Subject: Re: bug#8095: dir-locals-directory-cache confusion References: X-Spook: Croatian Uzbekistan csim Merlin mania AGT. AMME PET Kosovo X-Ran: G8{C@`#a}}&-'N/Ql^<4rNf3|paJ<5-~Qb_JkJ+8m+&9Lk5TJS/]wMd*m%h6komf[D:d+4 X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 24 Feb 2011 03:58:24 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 8095-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) Version: 24.1 I believe I fixed this mess in the trunk. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 09:47:25 2011 Received: (at 8095) by debbugs.gnu.org; 24 Feb 2011 14:47:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PscTT-0007HT-Tp for submit@debbugs.gnu.org; Thu, 24 Feb 2011 09:47:24 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PscTS-0007HI-PZ for 8095@debbugs.gnu.org; Thu, 24 Feb 2011 09:47:23 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArEGAPb9ZU1FxIPF/2dsb2JhbACYFI4TdL1RhWAEhRCPWw X-IronPort-AV: E=Sophos;i="4.62,218,1297054800"; d="scan'208";a="93397035" Received: from 69-196-131-197.dsl.teksavvy.com (HELO pastel.home) ([69.196.131.197]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 24 Feb 2011 09:47:17 -0500 Received: by pastel.home (Postfix, from userid 20848) id 1561A4E050; Thu, 24 Feb 2011 09:47:17 -0500 (EST) From: Stefan Monnier To: 8095@debbugs.gnu.org Subject: Re: bug#8095: dir-locals-directory-cache confusion Message-ID: References: Date: Thu, 24 Feb 2011 09:47:16 -0500 In-Reply-To: (Glenn Morris's message of "Thu, 24 Feb 2011 03:58:24 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8095 Cc: rgm@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > I believe I fixed this mess in the trunk. Thank you, Stefan From unknown Tue Aug 19 02:50:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 25 Mar 2011 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator