Subject: Re: bug#56311: [PATCH] new function: delete-visited-file

From: Eli Zaretskii <[email-masked]>
Date: Fri, 01 Jul 2022 08:57:58 +0300

> From: Zachary Kanfer <[email-masked]>
> Date: Thu, 30 Jun 2022 23:29:36 -0400
> Cc: Lars Ingebrigtsen <[email-masked]>, Visuwesh <[email-masked]>, Eli Zaretskii <[email-masked]>, 
> 	[email-masked]
> 
> It's interesting to see commentary about how one shouldn't want to kill buffers. There is a lot of functionality
> revolving around killing buffers.

Examples of such functionality?  I'm not sure I understand what you
have in mind here.

> > ...each time I see suggestions for features to kill unused buffers or
> > see people who are worried about such buffers, I raise a brow: in
> > Emacs, we generally don't care about that (because it does no harm to
> > have unused buffers)...
> 
> I use desktop-mode. So I currently have 267 buffers open in my Emacs. Perhaps you might think I'm "doing
> it wrong",

Why would I think so?  In the session in which I'm writing this, I
have 287 buffers.  Having around 300 buffers in my sessions is quite
normal, and I don't consider such numbers excessive.

> I find that the more buffers I have open, the longer it takes to
> find a given buffer.

"Find" in what way?  Please tell more about the problems you have in
sessions with many buffers, because I'm not aware of any significant
problems.

> The more open
> buffers I have open, the greater the chance I'll accidently switch
> to the wrong one.

Again, please tell more details.  How does the number of buffers
contribute to the chance of selecting a wrong one?  For that matter,
which commands do you use to switch between buffers?

> > And since deleting the visited file is currently very easy, as Eli
> > pointed out:
> >
> > >  M-x delete-file RET M-n RET
> >
> > I don't think this would be a command that people would use a lot.
> 
> Personally, I never want to delete a file and keep the buffer around. So I have replaced *all* my usages of
> `delete-file` with this new one.

That's fine: Emacs is great because it lets you do that to fit your
personal needs.  No one here is saying that it's wrong for you to do
that; the discussion is whether doing so is TRT for many/most Emacs
users (which could have different workflows).

> There are many ways to work with Emacs -- many workflows I don't know why this one is considered
> wrong.

Sure.  But there's no reason for Emacs to support all of the OOTB.