From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: sbaugh@janestreet.com, 72019@debbugs.gnu.org
Subject: bug#72019: [PATCH] Add project argument to project-kill-buffers
Date: Thu, 11 Jul 2024 07:52:56 +0300 [thread overview]
Message-ID: <86jzhsmswn.fsf@gnu.org> (raw)
In-Reply-To: <5c12905c-370e-419b-8ff1-657341da68cf@gutov.dev> (message from Dmitry Gutov on Thu, 11 Jul 2024 03:18:46 +0300)
> Date: Thu, 11 Jul 2024 03:18:46 +0300
> Cc: 72019@debbugs.gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> On 10/07/2024 22:00, Eli Zaretskii wrote:
> >> Because it is also nicer to explicitly indicate what project the Lisp
> >> program is operating on. Going through project-current means there are
> >> a number of possible bugs. Lisp programs should pass in the project
> >> instance; this is preferred for new project.el-using code.
> > If this is the current trend in project.el development, then I have no
> > objections to it. I find it a bit surprising that the original
> > motivation for this was something completely different, though.
>
> I don't know if it's going to be a big direction, but the logic seems
> sound for a command like this.
>
> The original choice was more or less arbitrary. The change in the patch
> is backward-compatible, so it shouldn't hurt.
>
> The particular benefit scenario that I can see is this:
>
> * The project directory has been deleted, but a number of its buffers it
> still around.
> * So it doesn't seem feasible to compute the project instance
> automatically (the project markers are gone, etc).
> * But if something has held onto a project object, its method
> (project-buffers) might feasibly complete without errors.
>
> For project-kill-buffers in particular it seems like a real advantage -
> getting to clean up buffers belonging to an already deleted project. And
> if one step 2 or 3 fails with an error, oh well, it doesn't seem like we
> could have done better.
My question for this scenario would be: does project.el support it in
general? I'd expect quite a few of the functions to rely on the fact
that the project directory is there, in which case this is the tip of
a very large iceberg.
But you know the code and the design much better than I do, so if it
makes sense to you, fine.
next prev parent reply other threads:[~2024-07-11 4:52 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86jzhsmswn.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=72019@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=sbaugh@janestreet.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).