GNU bug report logs - #31578
24.3; vc-ignore-root-dir resets locate-dominating-stop-dir-regexp

Previous Next

Package: emacs;

Reported by: u0138544 <rob.sargent <at> utah.edu>

Date: Thu, 24 May 2018 08:25:03 UTC

Severity: minor

Tags: moreinfo

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ROB SARGENT <rob.sargent <at> utah.edu>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "31578 <at> debbugs.gnu.org" <31578 <at> debbugs.gnu.org>
Subject: bug#31578: 24.3; vc-ignore-root-dir resets locate-dominating-stop-dir-regexp
Date: Sat, 22 Aug 2020 15:40:36 +0000

> On Aug 22, 2020, at 9:31 AM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> 
> u0138544 <rob.sargent <at> utah.edu> writes:
> 
>> I could not successfully override locate-domination-stop-dir-regexp via .emacs
>> because vc-find-root restores the default value.
>> 
>> STR:
>> override locate-dominating-stop-dir-regexp in .emacs with:
>>         (setq locate-dominating-stop-dir-regexp "\\`\\
>> (?:/uufs/chpc.utah.edu/common/home/[^\\/]+/\\|~/\\)\\'")
>> 
>> edebug-defun locate-dominating-file
>> stop at string-match, note value of locate-dominating-stop-dir-regexp
>> continue to next call to string-match (for a different dominating file)
>> re-check value of locate-dominating-stop-dir-regexp
>> 
>> You will find that for calls from vc-find-root the value of
>> locate-dominating-stop-dir-regexp will be the default (from files.el) as
>> opposed to the value in the .emacs setq
> 
> I think you're seeing the effect of this:
> 
> (defun vc-find-root (file witness)
>  "Find the root of a checked out project.
> The function walks up the directory tree from FILE looking for WITNESS.
> If WITNESS if not found, return nil, otherwise return the root."
>  (let ((locate-dominating-stop-dir-regexp
>         (or vc-ignore-dir-regexp locate-dominating-stop-dir-regexp)))
>    (locate-dominating-file file witness)))
> 
> vc-ignore-dir-regexp defaults to locate-dominating-stop-dir-regexp,
> though, so could it be that you're setting
> locate-dominating-stop-dir-regexp after you've loaded vc.el?
> 

I think this has been taken care of. Thanks
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>   bloggy blog: http://lars.ingebrigtsen.no

This bug report was last modified 4 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.