GNU bug report logs - #56311
[PATCH] new function: delete-visited-file

Previous Next

Package: emacs;

Reported by: Zachary Kanfer <zkanfer <at> gmail.com>

Date: Thu, 30 Jun 2022 04:27:02 UTC

Severity: wishlist

Tags: moreinfo, patch, wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Zachary Kanfer <zkanfer <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>,
 56311 <at> debbugs.gnu.org, Visuwesh <visuweshm <at> gmail.com>
Subject: Re: bug#56311: [PATCH] new function: delete-visited-file
Date: Thu, 30 Jun 2022 23:29:36 -0400
[Message part 1 (text/plain, inline)]
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.

> ...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", but I find that the more
buffers I have open, the longer it takes to find a given buffer. The more
open buffers I have open, the greater the chance I'll accidently switch to
the wrong one. Sometimes I know that I want a file to go away -- why keep
the buffer around?

> 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.

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

On Thu, Jun 30, 2022 at 12:29 PM Sean Whitton <spwhitton <at> spwhitton.name>
wrote:

> Hello,
>
> On Thu 30 Jun 2022 at 12:27pm +02, Lars Ingebrigtsen wrote:
>
> > And since deleting the visited file is currently very easy, as Eli
> > pointed out:
> >
> >   M-x delete-file RET M-n RET
>
> There's also C-x C-j D.
>
> > I don't think this would be a command that people would use a lot.
>
> They shouldn't be using it a lot, and I agree that it probably shouldn't
> be added, but it does seem worth noting that a lot of users have
> something like this in their init, and use it a lot.  I did until today,
> and used it almost daily.  (After reading this thread, I've replaced it
> with something calling bury-buffer.)  It's also to be found in Spacemacs
> and Doom Emacs.
>
> --
> Sean Whitton
>
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 294 days ago.

Previous Next


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