all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Spencer Baugh <sbaugh@janestreet.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 72019@debbugs.gnu.org
Subject: bug#72019: [PATCH] Add project argument to project-kill-buffers
Date: Wed, 10 Jul 2024 09:27:06 -0400	[thread overview]
Message-ID: <CAO=BR8P=LyNQePFpQNhcymiK4QT2ZGq800LP0PEnw_NhYixV5Q@mail.gmail.com> (raw)
In-Reply-To: <86ed81o5oc.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

On Wed, Jul 10, 2024, 7:19 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Spencer Baugh <sbaugh@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.

>

[-- Attachment #2: Type: text/html, Size: 2087 bytes --]

  reply	other threads:[~2024-07-10 13:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 18:31 bug#72019: [PATCH] Add project argument to project-kill-buffers Spencer Baugh
2024-07-09 19:59 ` Dmitry Gutov
2024-07-10 11:43   ` Eli Zaretskii
2024-07-10 11:19 ` Eli Zaretskii
2024-07-10 13:27   ` Spencer Baugh [this message]
2024-07-10 14:32     ` Eli Zaretskii
2024-07-10 15:47       ` Spencer Baugh
2024-07-10 17:32         ` Eli Zaretskii
2024-07-10 17:42           ` Spencer Baugh
2024-07-10 17:54             ` Eli Zaretskii
2024-07-10 18:30               ` Spencer Baugh
2024-07-10 19:00                 ` Eli Zaretskii
2024-07-11  0:18                   ` Dmitry Gutov
2024-07-11  4:52                     ` Eli Zaretskii
2024-07-11 19:47                       ` Dmitry Gutov
2024-07-12  5:48                         ` Eli Zaretskii
2024-07-16  2:00                           ` Dmitry Gutov
2024-07-11  0:11       ` Dmitry Gutov
2024-07-11  4:50         ` Eli Zaretskii
2024-07-11 19:44           ` Dmitry Gutov
2024-07-12  5:47             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO=BR8P=LyNQePFpQNhcymiK4QT2ZGq800LP0PEnw_NhYixV5Q@mail.gmail.com' \
    --to=sbaugh@janestreet.com \
    --cc=72019@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.