GNU bug report logs -
#57714
[PATCH] Fix project-remember-projects-under recursive
Previous Next
Reported by: ookami <mail <at> ookami.one>
Date: Sat, 10 Sep 2022 07:47:01 UTC
Severity: normal
Tags: patch
Fixed in version 29.1
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 57714 in the body.
You can then email your comments to 57714 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57714
; Package
emacs
.
(Sat, 10 Sep 2022 07:47:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ookami <mail <at> ookami.one>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 10 Sep 2022 07:47:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From 748928f579388b018f50265d0826075d5d12071c Mon Sep 17 00:00:00 2001
From: ookami <mail <at> ookami.one>
Date: Sat, 10 Sep 2022 15:43:23 +0800
Subject: [PATCH] Fix project-remember-projects-under recursive
---
lisp/progmodes/project.el | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 30f51704dc..d07acf361e 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1498,7 +1498,9 @@ project-remember-projects-under
projects."
(interactive "DDirectory: \nP")
(project--ensure-read-project-list)
- (let ((queue (directory-files dir t nil t)) (count 0)
+ (let ((queue (directory-files
+ dir t directory-files-no-dot-files-regexp t))
+ (count 0)
(known (make-hash-table
:size (* 2 (length project--list))
:test #'equal )))
@@ -1506,15 +1508,20 @@ project-remember-projects-under
(puthash project t known))
(while queue
(when-let ((subdir (pop queue))
- ((file-directory-p subdir))
- ((not (gethash subdir known))))
- (when-let (pr (project--find-in-directory subdir))
- (project-remember-project pr t)
- (message "Found %s..." (project-root pr))
+ ((file-directory-p subdir)))
+ (when-let ((project (project--find-in-directory subdir))
+ (project-root (project-root project))
+ ((not (gethash project-root known))))
+ (project-remember-project project t)
+ (puthash project-root t known)
+ (message "Found %s..." project-root)
(setq count (1+ count)))
- (when (and recursive (file-symlink-p subdir))
- (setq queue (nconc (directory-files subdir t nil t) queue))
- (puthash subdir t known))))
+ (when (and recursive (file-directory-p subdir))
+ (setq queue
+ (nconc
+ (directory-files
+ subdir t directory-files-no-dot-files-regexp t)
+ queue)))))
(unless (eq recursive 'in-progress)
(if (zerop count)
(message "No projects were found")
--
2.37.3
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57714
; Package
emacs
.
(Sat, 10 Sep 2022 12:58:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 57714 <at> debbugs.gnu.org (full text, mbox):
ookami <mail <at> ookami.one> writes:
> Subject: [PATCH] Fix project-remember-projects-under recursive
Thanks. The patch doesn't seem to be totally correct, though --
(project-remember-projects-under "~/src/emacs/trunk/" t)
would return 0. (I.e., when the directory given is a project.) So I've
fixed that condition and then pushed your patch to Emacs 29.
This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?
bug marked as fixed in version 29.1, send any further explanations to
57714 <at> debbugs.gnu.org and ookami <mail <at> ookami.one>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 10 Sep 2022 12:58: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
.
(Sun, 09 Oct 2022 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.