From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#50297: 28.0.50; Aggregate project functions for project.el Date: Wed, 22 Sep 2021 03:31:42 +0300 Message-ID: References: <87h7f5ok5l.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28713"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: Philip Kaludercic , 50297@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 22 02:32:17 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 1mSqBM-0007H5-Lj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Sep 2021 02:32:16 +0200 Original-Received: from localhost ([::1]:39328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSqBK-00086e-Ob for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Sep 2021 20:32:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSqB8-00086G-GE for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 20:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSqB8-0001GW-8M for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 20:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSqB7-0004kX-V4 for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 20:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Sep 2021 00:32:01 +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.163227071218237 (code B ref 50297); Wed, 22 Sep 2021 00:32:01 +0000 Original-Received: (at 50297) by debbugs.gnu.org; 22 Sep 2021 00:31:52 +0000 Original-Received: from localhost ([127.0.0.1]:48298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSqAy-0004k5-CM for submit@debbugs.gnu.org; Tue, 21 Sep 2021 20:31:52 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:38463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSqAx-0004jq-4q for 50297@debbugs.gnu.org; Tue, 21 Sep 2021 20:31:51 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id u18so1730179wrg.5 for <50297@debbugs.gnu.org>; Tue, 21 Sep 2021 17:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=F1OOeZ0yQB1O6Yuw0s66IzCwMCibbC+ef2aIIM2bz6U=; b=K4+i1RNq37eJFIG1idbVJmC81aCXD0UAtP8esgqZw30MDhs1O8UNjSmP38OeondQq6 HspDMtxiX5Lal13GcqOM622+2rtJ6RWTNlgcCIk/9TWH9QiM/L5iylDXo2e3mL/84LFd zB21Ou34SwHgG17GEwF8yO2obp4szzjmf/4XBhkNqbuOqT1g9CvTrt1c7yNiOblzo/B+ WvwIpuCB8oWP94PtJHCd/iH8j3T/b4R/bmSGAc+leimmaGQPORdZtJoQguBpREK4XUij gIGN9I/t56x+NEPkdwj8yigppsemum7947dpOhN69ikvNuKBrg/0uk3TRNUenrZJUdNp JEzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=F1OOeZ0yQB1O6Yuw0s66IzCwMCibbC+ef2aIIM2bz6U=; b=3kHPpzaHAW4CBs3cRPVvh6tyjuJcmvjMke74VPJrpyJPvS+U0YbIikJyCyoTBV/Ged YqcF19qoRz2ELmG6Zipjy9P4T/GPoDddfpIta6+bshlpHFwiqR5IFZzQCUQXUtCZungr WP8VCp9GXGklA8aESHxF20azYmUYud1sL5LDIMxKQbwWiCFDwGqbnWt8yumGXdWQ3unY mcyCPriFSM5Ywmn/sLS8862tn8A/m/dto3af6V+E2okvZyyxkcbtclruEAl1sHnd/qrt gamH+w4pIB60WR2/+yvUR3gEwkEXSIv+LFgsTcAHmU1NKCapwXDANRKavj4r+agNyXl0 ZmQQ== X-Gm-Message-State: AOAM530M2ZA7babukNZDXpOJnkvb9F/4xiocqX0fBm863X8jc0dC0O9n vJ/DPnKOIe/Bu9Bl/2Z94L3jUzJvJn4= X-Google-Smtp-Source: ABdhPJzEB0kUtTxDlY0E2tFKZX/qmLQzzaQ9RQvwtw5iXOkmTK9DUYp6uiKshLdaP2W/JnC3dKOxPQ== X-Received: by 2002:a7b:c4d5:: with SMTP id g21mr7288106wmk.47.1632270705276; Tue, 21 Sep 2021 17:31:45 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q11sm503216wrn.65.2021.09.21.17.31.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Sep 2021 17:31:44 -0700 (PDT) In-Reply-To: <87h7f5ok5l.fsf@posteo.net> Content-Language: en-US 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:215053 Archived-At: 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 And whatever ambiguities about recursive search can be solved through better descriptions in docstrings. 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.