GNU bug report logs - #54281
29.0.50; project-try-vc not return the root

Previous Next

Package: emacs;

Reported by: Shuguang Sun <shuguang79 <at> qq.com>

Date: Mon, 7 Mar 2022 04:43:02 UTC

Severity: normal

Tags: notabug

Merged with 54282

Found in version 29.0.50

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54281 in the body.
You can then email your comments to 54281 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54281; Package emacs. (Mon, 07 Mar 2022 04:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Shuguang Sun <shuguang79 <at> qq.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 07 Mar 2022 04:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang79 <at> qq.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; project-try-vc not return the root
Date: Mon, 07 Mar 2022 12:41:11 +0800
Hi all,

The `project-current' and `project-try-vc' can't return the root but
just a list of `(vc Git)'. It is found that an `and' should be used in
the function `project-try-vc' instead of `or'.

The patch below fixs it.

```
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index daaf86f327..e8bd203979 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -418,7 +418,7 @@ project-vc-external-roots-function
 backend implementation of `project-external-roots'.")
 
 (defun project-try-vc (dir)
-  (or (vc-file-getprop dir 'project-vc)
+  (and (vc-file-getprop dir 'project-vc)
       (let* ((backend (ignore-errors (vc-responsible-backend dir)))
              (root
               (pcase backend
```

Best Regards,
Shuguang Sun



In GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32)
 of 2022-03-07 built on 
Repository revision: 36b31d38cd9bde7ad1ec18c136854cddba0d6bbe
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19044
System Description: Microsoft Windows 10 Pro (v10.0.2009.19044.1526)

Configured using:
 'configure --without-pop --with-native-image-api
 --with-native-compilation --without-compress-install
 '--program-transform-name=s/^ctags$/ctags.emacs/''

Configured features:
ACL DBUS GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES
NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP XPM ZLIB

Important settings:
  value of $LANG: CHS
  locale-coding-system: cp936





Forcibly Merged 54281 54282. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Mar 2022 14:42:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Mar 2022 14:43:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 54282 <at> debbugs.gnu.org and "Shuguang Sun" <shuguang79 <at> qq.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Mar 2022 14:43:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Apr 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 75 days ago.

Previous Next


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