GNU bug report logs -
#72019
[PATCH] Add project argument to project-kill-buffers
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Tue, 9 Jul 2024 18:32:01 UTC
Severity: normal
Tags: patch
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 72019 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Jul 10, 2024, 7:19 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Spencer Baugh <sbaugh <at> janestreet.com>
> > Date: Tue, 09 Jul 2024 14:31:11 -0400
> >
> > Previously, project-kill-buffers always called (project-current t). A
> > Lisp program could change what project project-kill-buffers operated
> > on by binding project-current-directory-override. However, in some
> > edge cases (for example, if the project was deleted between looking it
> > up and calling project-kill-buffers) this might fail to detect a
> > project, and so (project-current t) would prompt the user.
> >
> > To avoid this, accept the project to kill buffers for as an argument.
>
> That sounds like sweeping some minor bug under the carpet, or worse.
> Why is it a good idea to silently second-guess what is TRT in these
> marginal cases? Up front, I'd say asking the user is a safer bet.
>
Suppose if some Lisp program runs (project-current t) to select a project
to operate on, then does some things, then runs project-kill-buffers. The
p-k-b call should never prompt for a project again - it's intended to
operate on the project that was already selected. If the project that was
already selected has disappeared, an error is better than a confusing
second prompt which might lead to the user selecting another different
project and killing all the buffers in that project. If the Lisp program
wants to catch that error, it can.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.