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


Message #14 received at 76307 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76307 <at> debbugs.gnu.org
Subject: Re: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs',
 limit dir selection to relevant dirs
Date: Sat, 15 Feb 2025 23:09:26 +0100
Ship Mints <shipmints <at> gmail.com> writes:

> Thank you for your thoughtful feedback.
>
> A couple of things stand out. First, calling completing-read directly means we can reuse the project-file
> completion category (and if you use something like marginalia, you get nice metadata in your completion list),

In my suggested approach we get the "file" completion category, which
AFAICT marginalia picks up just as well and provides the same kind of
completion annotations.

> and which also now can inhibit sorting the completion candidate list, which I find can be annoying for this kind of
> use case.

Sorry, I'm not sure I understand the problem.

FWIW there are several ways to control sorting besides specifying
display-sort-function in the completion metadata, like completions-sort,
completion-category-overrides and completion-extra-properties.

> Second, since this is forget "under" directories, prompting with the common prefixes that allow one to forget
> under the whole shebang makes more sense to me. 

You could still select a common ancestor directory (prefix) to forget
all projects under it, if that's what you mean.

> Perhaps your ancestor list generator can be more efficient than the
> common-prefix code that I quickly wrote, and it would be helpful for
> it to show all common prefixes, don't you agree?

I don't see a lot of benefit in the flat list of all possible choices in
this case, but no strong objection either, just a personal preference.


Eshel




This bug report was last modified 174 days ago.

Previous Next


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