From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#38294: [PATCH] Handle killing of virtual buffers in Ido Date: Wed, 22 Jan 2020 10:00:24 +0100 Message-ID: <87wo9jkgrb.fsf@marxist.se> References: <87a76it1hi.fsf@marxist.se> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="122732"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 38294@debbugs.gnu.org To: Dario Gjorgjevski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 22 10:01:23 2020 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 1iuBt4-000Vsc-0b for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jan 2020 10:01:22 +0100 Original-Received: from localhost ([::1]:38758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuBt2-0002SE-Ra for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jan 2020 04:01:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48903) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuBsm-0002O3-AL for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 04:01:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuBsk-0005pg-Bc for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 04:01:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42998) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iuBsk-0005pT-46 for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 04:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iuBsk-0000xE-1s for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 04:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Jan 2020 09:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38294 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 38294-submit@debbugs.gnu.org id=B38294.15796836363628 (code B ref 38294); Wed, 22 Jan 2020 09:01:01 +0000 Original-Received: (at 38294) by debbugs.gnu.org; 22 Jan 2020 09:00:36 +0000 Original-Received: from localhost ([127.0.0.1]:48971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuBsK-0000wS-Fr for submit@debbugs.gnu.org; Wed, 22 Jan 2020 04:00:36 -0500 Original-Received: from ted.gofardesign.uk ([67.225.143.91]:46584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuBsI-0000wF-IM for 38294@debbugs.gnu.org; Wed, 22 Jan 2020 04:00:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GQccKrFT7rcBga6eVDNhLINzNdGaxUYOG/RTVa8lmFA=; b=W8HbwoTrDefiL5EoGcxdHmCB7p 8CL815kEQ6NCq9pO05IYo03U+XlK7XTu5abW6A6ZzPbw734Y7m1uW2XVF2tXO1MurOp+rPIl6xRzI Ou/ykuW649+qbmTAXJtEbZuSiWu338vIEQu6oVoPQIbQvz5GPBMdPOFlP5QhAi/YrXeOaeeGagpVy tX9m/EK1OC4NkC4I68vQ9THnjhTMP9W7YxXAI8plTyKAczqIrBjkbxkXj09pQARZS00i9i8tqc/Ku 5uJ4pqpzBDFueTx9WUzHnr+aU/Xl+qD3UGB3QP65W/niJORmiz3AJc0umrmslr3FAPZLHIfdezrMd 4fO9fKqA==; Original-Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:52530 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iuBsA-000WNL-7U; Wed, 22 Jan 2020 04:00:26 -0500 In-Reply-To: (Dario Gjorgjevski's message of "Wed, 22 Jan 2020 09:21:30 +0100") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:175054 Archived-At: Hi Dario, Dario Gjorgjevski writes: > What follows is a way to reproduce this scenario, assuming the file > =E2=80=98foo=E2=80=99 does not exist. > > Start by > > M-x recentf-mode > M-x ido-mode > M-: (setq ido-use-virtual-buffers t) > C-x C-f foo > C-x C-s > C-x k > > Now, =E2=80=98foo=E2=80=99 is a _virtual buffer_ in the terminology of Id= o, and since we > have =E2=80=98ido-use-virtual-buffers=E2=80=99 set to t, we should be abl= e to operate on > it: switch to it or kill it. Switching works fine; however, *killing is > a no-op*. > > At this point, when you do > > C-x k foo > > you will notice that =E2=80=98foo=E2=80=99 remains in the list of buffers= , despite being > =E2=80=9Ckilled.=E2=80=9D You will still see when doing C-x b or C-x k. = In fact, you > can repeat the above step ad infinitum. Thank you for the detailed explanation. > What this patch changes is exactly this behavior: once a virtual buffer > has been =E2=80=9Ckilled=E2=80=9D from C-x k, it no longer appears in the= list of > buffers. > > Let me know if this makes sense. I think the current behaviour makes sense, but I can very much see that some users would want what you suggest. Both choices here are valid. Given that Ido has behaved like this for a long time, I would be wary of changing the default behaviour at this point. It risks surprising users. My suggestion would theferefore be to add a new option to enable the behaviour you suggest. It could perhaps be named something like ido-kill-removes-virtual-buffers, and should be disabled by default. What do you think? Best regards, Stefan Kangas