From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 10 03:46:50 2022 Received: (at submit) by debbugs.gnu.org; 10 Sep 2022 07:46:50 +0000 Received: from localhost ([127.0.0.1]:36514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWvCU-0002xp-1p for submit@debbugs.gnu.org; Sat, 10 Sep 2022 03:46:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:38398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWvCR-0002xh-PO for submit@debbugs.gnu.org; Sat, 10 Sep 2022 03:46:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWvCR-00042C-KK for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 03:46:47 -0400 Received: from ookami.one ([107.191.58.109]:44666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWvCP-0007jS-V2 for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 03:46:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ookami.one; s=main; t=1662796000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=8h4z7yBWI9ux9OqCFxTszK/ZVZajV/LHdCvMDT0M3Iw=; b=jg2KCslJi0CyVrTl3SnZpyZ/ufsZZg7l6+quJMX51G1uy9ovJi9UOYWzJUuNy6S3Ldiwc/ HuJieEoxMixArFfIt+fXSE+8HQs3+zReuwB5Ux+J+faH50CP4HWo2rF4AQgXLt6oQTCkTo E0J79Eg08f+RgNs6dtxF3WfoTToOaS+4/Nxzvf+KRPCpgnqXR4lBAGJ9318eSRnxD5gpAQ Iv2Gn3gA4tU69RIrRw9N99/nBovaQBELofpZzYnb4MBYt7zAfLxLXL76CK2QUOcI8jWGoB CY4kTBlJb4NdW+l6A5RLHVI59cqIoUmyMX3SpGEXu08vh/OTylPmC4f/WTo5nA== Received: from localhost ( [219.140.34.221]) by ookami.one (OpenSMTPD) with ESMTPSA id 5d2df280 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sat, 10 Sep 2022 07:46:39 +0000 (UTC) From: ookami To: bug-gnu-emacs@gnu.org Subject: [PATCH] Fix project-remember-projects-under recursive Date: Sat, 10 Sep 2022 15:46:35 +0800 Message-ID: <87a677fz8k.fsf@ookami.one> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=107.191.58.109; envelope-from=mail@ookami.one; helo=ookami.one X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) >From 748928f579388b018f50265d0826075d5d12071c Mon Sep 17 00:00:00 2001 From: ookami 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 10 08:57:44 2022 Received: (at 57714) by debbugs.gnu.org; 10 Sep 2022 12:57:44 +0000 Received: from localhost ([127.0.0.1]:36795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX03L-0004do-NN for submit@debbugs.gnu.org; Sat, 10 Sep 2022 08:57:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX03K-0004dX-Ax for 57714@debbugs.gnu.org; Sat, 10 Sep 2022 08:57:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=x8z4nmRmIuBhabhp8aoSXg3WZwFRiHjntlP+ikh1+iQ=; b=aJA9TbpoLY9jCVK1aJyAxkBmuL Bl0SifeM89xC3J+1SGZyqtOTvyaJO4gYCmNm7C3I+6BC03ywkEz/ZXKVNZYfWAfkWejl1rXwgCR4y sWMTmMZ+hlJhbP3XHVFTXrA21hry6c4YP3rhpX5VAIvVaj8wen8tj17Ip6N3BhKI5Qm8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oX03A-0001Im-L7; Sat, 10 Sep 2022 14:57:35 +0200 From: Lars Ingebrigtsen To: ookami Subject: Re: bug#57714: [PATCH] Fix project-remember-projects-under recursive In-Reply-To: <87a677fz8k.fsf@ookami.one> (ookami's message of "Sat, 10 Sep 2022 15:46:35 +0800") References: <87a677fz8k.fsf@ookami.one> X-Now-Playing: The Clash's _Sandinista!_: "Police On My Back" Date: Sat, 10 Sep 2022 14:57:30 +0200 Message-ID: <87leqridz9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: ookami writes: > Subject: [PATCH] Fix project-remember-projects-under recursive Thanks. The patch doesn't seem to be totally correct, though -- Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57714 Cc: 57714@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) ookami 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? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 10 08:57:48 2022 Received: (at control) by debbugs.gnu.org; 10 Sep 2022 12:57:48 +0000 Received: from localhost ([127.0.0.1]:36798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX03Q-0004e4-0j for submit@debbugs.gnu.org; Sat, 10 Sep 2022 08:57:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX03N-0004df-Us for control@debbugs.gnu.org; Sat, 10 Sep 2022 08:57:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cjGSutIK1TMnXITqednrzTLEgHBztoZ9Db00pTN986c=; b=D/YhHsGEUu+P4Zk7p6mFx5WAcD HvegmmmyOcRefNci0k6N4JcbXCyReEJV3AggBGFV64PjO1DJ0gCe88T5L5oqAt/qCp7SOpe/4CecZ 9c50VClq7saTleyRXk6xus7TIK7ooFYpACoJ0yi1oORCjNZcTu6M8mhS9Pe5uTcQhgIc=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oX03G-0001It-2W for control@debbugs.gnu.org; Sat, 10 Sep 2022 14:57:40 +0200 Date: Sat, 10 Sep 2022 14:57:37 +0200 Message-Id: <87k06bidz2.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #57714 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 57714 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 57714 29.1 quit From unknown Thu Aug 14 21:46:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 09 Oct 2022 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