GNU bug report logs -
#74826
30.0.50; project-buffers not consistent with project-files
Previous Next
Reported by: Óscar Fuentes <oscarfv <at> telefonica.net>
Date: Thu, 12 Dec 2024 12:12:02 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Fixed in version 30.1
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi! Thanks for the report.
On 12/12/2024 14:11, Óscar Fuentes wrote:
> On a git repo there are several projects.
> `project-vc-extra-root-markers` is used to differentiate them.
>
> (setopt project-vc-extra-root-markers (list "client.lp0" "pubspec.yaml"))
>
> Although there are no submodules for now, I also have this setting:
>
> (setopt project-vc-merge-submodules nil)
>
> Evaluating the following expression while on a buffer that is visiting
> any given file of those projects:
>
> (project-files (project-current))
>
> gives the list of files of the project.
>
> However, evaluating this fails:
>
> (project-buffers (project-current))
This change should fix that.
Not sure if it should go to emacs-30 (this bug is there since 2022) -
but happy to install it there if approved.
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 2b0d508cc66..59a8832711a 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -858,7 +858,9 @@ project--value-in-dir
(cl-defmethod project-buffers ((project (head vc)))
(let* ((root (expand-file-name (file-name-as-directory (project-root
project))))
(modules (unless (or (project--vc-merge-submodules-p root)
- (project--submodule-p root))
+ (condition-case nil
+ (project--submodule-p root)
+ (file-missing nil)))
(mapcar
(lambda (m) (format "%s%s/" root m))
(project--git-submodules))))
This bug report was last modified 140 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.