From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#50297: 28.0.50; Aggregate project functions for project.el Date: Wed, 22 Sep 2021 07:15:00 +0000 Message-ID: <877df9qdxn.fsf@posteo.net> References: <87h7f5ok5l.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4641"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50297@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 22 09:16:47 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSwUn-0000wf-UG for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Sep 2021 09:16:45 +0200 Original-Received: from localhost ([::1]:59500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSwUm-0000Ax-Dg for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Sep 2021 03:16:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSwU7-0008OL-DX for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2021 03:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSwU7-00029n-2r for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2021 03:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSwU6-0001fn-VB for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2021 03:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Sep 2021 07:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50297 X-GNU-PR-Package: emacs Original-Received: via spool by 50297-submit@debbugs.gnu.org id=B50297.16322949146315 (code B ref 50297); Wed, 22 Sep 2021 07:16:02 +0000 Original-Received: (at 50297) by debbugs.gnu.org; 22 Sep 2021 07:15:14 +0000 Original-Received: from localhost ([127.0.0.1]:48710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSwTJ-0001dn-P9 for submit@debbugs.gnu.org; Wed, 22 Sep 2021 03:15:14 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:47665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSwTG-0001dL-RF for 50297@debbugs.gnu.org; Wed, 22 Sep 2021 03:15:12 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id B7CD6240026 for <50297@debbugs.gnu.org>; Wed, 22 Sep 2021 09:15:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1632294904; bh=zpdygopdnGziknu7wmv7LM7W6k/0ZqZzc3aZnumrR9E=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=rCc/Vz6Tp76Ot/EaHI7/ojtDNBWVE9/CplkOeUW7KR4Y5E0H3tDRsjAYwE8xifFu9 15qNEdmQQj2UiT1F3xt+QHKDBTlU5ijrf057G9DA1O96RqvgLgRwVkkbLzFXpYoJME 0p6ob5nr2YqbFEfBvfnn5yLzVe3/UVo6h3WCV8XPjf2E3s4e+nUtfvgP7m0A+ip01a yfW6QREVlzSwTJavkr59CmHiiPzsmgBRW3EsxVhgZKyv7FkofhRg7YZpSwk90W4a8o yzssyrWy+wv98iNR2aITkJFKxfmn3Of9h3Acmxzq7hrN1Jxs6DSwIbGhojZIXGXrT/ cwjCy3n+JuQQQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HDqLc09gPz9rxY; Wed, 22 Sep 2021 09:15:03 +0200 (CEST) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: (Dmitry Gutov's message of "Wed, 22 Sep 2021 03:31:42 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215067 Archived-At: Dmitry Gutov writes: > On 31.08.2021 15:47, Philip Kaludercic wrote: >> The following patch introduces a few functions for aggregate project >> maintenance: >> - project-find-projects-under >> Select a directory with projects to index all at once. >> - project-remove-zombie-projects >> Check if all known projects still exist and remove those >> that don't anymore >> - project-remove-projects-under >> Remove all projects in a directory (inverse of >> project-find-projects-under). >> Especially the last two are useful to maintain a clean project list >> without having to manually remove every project one by one. > > OK, so I have done the rename: we now have project-forget-project. > > While I'm not necessarily a fan of the tabulated list approach, the > above list looks sensible. Let's just name them to fit the current > scheme better: > > project-remember-projects-under > project-forget-projects-under > project-forget-zombie-projects It is also my impression that the tabulated list doesn't make too much sense (for now). > And whatever ambiguities about recursive search can be solved through > better descriptions in docstrings. Ok, I will update the patches and refine the documentation. My plan would be to be non-recursive by default, and recurse if a prefix argument is given. > We could also add a hook like project-after-read-list-hook, which > people would be able to use for cleanup, e.g. adding > project-forget-zombie-projects to it. Not sure whether to add it there > by default, though. The question is does it make sense to not always forget zombies? This depends on the real-world performance. If it is a noticeable burden (at least on some systems), users might prefer adding the function to kill-emacs-hook instead of a project-after-read-list-hook. -- Philip Kaludercic