GNU bug report logs - #38294
[PATCH] Handle killing of virtual buffers in Ido

Previous Next

Package: emacs;

Reported by: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>

Date: Wed, 20 Nov 2019 08:58:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 38294 <at> debbugs.gnu.org
Subject: bug#38294: [PATCH] Handle killing of virtual buffers in Ido
Date: Wed, 22 Jan 2020 10:00:24 +0100
Hi Dario,

Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

> What follows is a way to reproduce this scenario, assuming the file
> ‘foo’ does not exist.
>
> Start by
>
>   M-x recentf-mode <RET>
>   M-x ido-mode <RET>
>   M-: (setq ido-use-virtual-buffers t) <RET>
>   C-x C-f foo <RET> <RET>
>   C-x C-s
>   C-x k <RET>
>
> Now, ‘foo’ is a _virtual buffer_ in the terminology of Ido, and since we
> have ‘ido-use-virtual-buffers’ set to t, we should be able 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 <RET>
>
> you will notice that ‘foo’ remains in the list of buffers, despite being
> “killed.”  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 “killed” 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




This bug report was last modified 4 years and 331 days ago.

Previous Next


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