From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zachary Kanfer Newsgroups: gmane.emacs.bugs Subject: bug#56311: [PATCH] new function: delete-visited-file Date: Thu, 30 Jun 2022 23:29:36 -0400 Message-ID: References: <83k08y67ml.fsf@gnu.org> <87wncyr7st.fsf@gmail.com> <87wncybg4z.fsf@gnus.org> <87r136aze3.fsf@athena.silentflame.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008904d405e2b5ff98" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23303"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Eli Zaretskii , 56311@debbugs.gnu.org, Visuwesh To: Sean Whitton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 01 05:30:47 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o77Ml-0005sZ-Ex for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Jul 2022 05:30:47 +0200 Original-Received: from localhost ([::1]:53566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o77Mk-0003fH-1H for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jun 2022 23:30:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o77M2-0003cy-Ia for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 23:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o77M2-0006dR-9x for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 23:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o77M2-0001Km-43 for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2022 23:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zachary Kanfer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Jul 2022 03:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56311 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo patch Original-Received: via spool by 56311-submit@debbugs.gnu.org id=B56311.16566461955088 (code B ref 56311); Fri, 01 Jul 2022 03:30:02 +0000 Original-Received: (at 56311) by debbugs.gnu.org; 1 Jul 2022 03:29:55 +0000 Original-Received: from localhost ([127.0.0.1]:36006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o77Lv-0001K0-DE for submit@debbugs.gnu.org; Thu, 30 Jun 2022 23:29:55 -0400 Original-Received: from mail-yb1-f170.google.com ([209.85.219.170]:43975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o77Lt-0001Jk-9H for 56311@debbugs.gnu.org; Thu, 30 Jun 2022 23:29:54 -0400 Original-Received: by mail-yb1-f170.google.com with SMTP id q132so1833752ybg.10 for <56311@debbugs.gnu.org>; Thu, 30 Jun 2022 20:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1a7FTtbKOOg18BrHnoTHvtEtePZ2oWxlIZ+TyOL1vxg=; b=YJ6BdVZjywPNaonMrP5eL2E1j4mg5bSkhyxXdGaTyH6d2TceoDSqpgrOS9RRTbPqy7 axRJDfotW9aUPyQ0AsoVO73zctTpxb1G1T7LTEnxsSfnoB6Ro6gUrGU6HUqBzxSH1m8c Pb7iXW2SDvabqn4f6MAndV/rb4Z1cv1ZO4ToLm6dEy0pxODUlR6dD2DPdFs4yo8q0jY6 lYpZOf4KqOsAOoqzCYl6qnLRZ5ezdbgr9OCi+XUKo2JXs0PBGD0j8Hp0UpHxWFqGt8+6 RgT6MFcdxoE4MBMnhUvManSaNgNq5cptvlPJ+uR5pC+YxlbHjW21mdfLzWuLjLDsua2h DuoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1a7FTtbKOOg18BrHnoTHvtEtePZ2oWxlIZ+TyOL1vxg=; b=8SFLjCeCWll4vVS7O78Lso2eNiHONzzoSE+vK8n9LZUwt2DdvereAUVEdUep3pKVVh y3h8/tKfKo7QXZyX0zSeK497XCvy37OTrAjrvP1+zZe71uVpQr1SglYEwKIGSJzZfaBr ZfQ4lau5Tw4h0AOHe+c4ECKHVQTskUTkg3yJyAVbNcA+E9Chwu96v2wWhFRBJjpMFxPY 8KL3sOpHqpMNEm2UzRjy70IgtwQ5K0qlNZGqtfBr9Q57Nm3iz6+1nimoYSueIRbJ3vmR rFeX8EC4HNFPyZBM5sSIdqLsOLtqKzMBzfbwYH5apqDp+TbFNBHE3u+bSu2BfIb2w1p7 8OyA== X-Gm-Message-State: AJIora+EeRCzzTaPPbSgMmh6LYpb4Hws8ANG0s2dLGB0EU7b9nGvuDhK TofnxbVqXpF2OD8cWYgL3Ug0HuPetJrjuGvwC8A= X-Google-Smtp-Source: AGRyM1vhp8yobum1aOsQzJSwM+FakDexBfPfx03HdJpN8s8kw7Mmp7PywYHodAY4Twzq8vB5W+MoMg1IWMIU2FUcdDw= X-Received: by 2002:a05:6902:90e:b0:669:5bfb:9877 with SMTP id bu14-20020a056902090e00b006695bfb9877mr13346915ybb.323.1656646187678; Thu, 30 Jun 2022 20:29:47 -0700 (PDT) In-Reply-To: <87r136aze3.fsf@athena.silentflame.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235755 Archived-At: --0000000000008904d405e2b5ff98 Content-Type: text/plain; charset="UTF-8" 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 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 > --0000000000008904d405e2b5ff98 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It's interesting to see commentary about how one shoul= dn't want to kill buffers. There is a lot of functionality revolving ar= ound killing buffers.

> ...each time I see suggestions for featur= es to kill unused buffers or
> see people who are worried about such = buffers, I raise a brow: in
> Emacs, we generally don't care abou= t that (because it does no harm to
> have unused buffers)...

I= use desktop-mode. So I currently have 267 buffers open in my Emacs. Perhap= s you might think I'm "doing it wrong", but I find that the m= ore buffers I have open, the longer it takes to find a given buffer. The mo= re open buffers I have open, the greater the chance I'll accidently swi= tch 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:
>
> >=C2= =A0 M-x delete-file RET M-n RET
>
> I don't think this woul= d 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 u= sages of `delete-file` with this new one.

There are many ways to wor= k 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@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:
>
>=C2=A0 =C2=A0M-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&= #39;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.=C2=A0 I did until toda= y,
and used it almost daily.=C2=A0 (After reading this thread, I've replac= ed it
with something calling bury-buffer.)=C2=A0 It's also to be found in Spa= cemacs
and Doom Emacs.

--
Sean Whitton
--0000000000008904d405e2b5ff98--