GNU bug report logs - #76307
[PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Sat, 15 Feb 2025 17:51:02 UTC

Severity: wishlist

Tags: patch

Full log


View this message in rfc822 format

From: Ship Mints <shipmints <at> gmail.com>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 76307 <at> debbugs.gnu.org
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Date: Sun, 16 Feb 2025 12:34:43 -0500
[Message part 1 (text/plain, inline)]
I tried your code to do a side-by-side but:

Debugger entered--Lisp error: (wrong-number-of-arguments
read-directory-name 6)
  (read-directory-name prompt nil nil nil nil (let ((ps (mapcar #'(lambda
(p) (expand-file-name ...)) project--list))) #'(lambda (dir) (catch 'ball
(let ((tail ps)) (while tail (let ... ... ...)))))))

In any case, my approach produces all legitimate possibilities a user could
want to clear projects under any common prefix, including "/" (which means
forget everything), common prefixes for remote directories, common roots
for multiple projects at the same level and common roots up the tree for
projects that are in a deeper hierarchy.  This is effectively what I think
people would want, and I assume you agree.  If your code produces the same
and is more efficient, that's great.

-Stephane



On Sun, Feb 16, 2025 at 8:32 AM Eshel Yaron <me <at> eshelyaron.com> wrote:

> Hi,
>
> Ship Mints <shipmints <at> gmail.com> writes:
>
> > Not sure the common-prefix list is "flatter" than any other kind of
> list, but it is convenient when one wants to
> > forget projects on a remote host en masse, or in the root of a directory
> tree that has script-kiddie git repos
> > everywhere (one day, they'll all learn that monorepos are the way) and I
> want to forget everything I've seen
> > (for more than one reason!).
>
> I'm confused.  You can do those things in the current implementation,
> and in my proposal too.
>
> Could you perhaps spell out the benefit of your suggested implementation
> for a concrete use case?  That might help to clear the confusion.
>
>
> Thanks,
>
> Eshel
>
[Message part 2 (text/html, inline)]

This bug report was last modified 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.