bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38294: [PATCH] Handle killing of virtual buffers in Ido


From: Dario Gjorgjevski
Subject: bug#38294: [PATCH] Handle killing of virtual buffers in Ido
Date: Wed, 22 Jan 2020 09:21:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Stefan,

Thanks a lot for getting back to me.

> I noticed that you have gotten no reply here.  Could you please
> describe what problem it is you are solving, is this fixing a bug or
> adding a new feature?

I would say this neither fixes a bug nor introduces a new feature;
merely makes ‘ido-kill-buffer’ behave as I expect it to.

> How can I test that this code works as advertised, preferably starting
> from "emacs -Q"?  Please give a step by step description, including a
> description of what happens before and after applying your patch.

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.

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.

Best regards,
Dario

-- 
dario.gjorgjevski@gmail.com :: +49 1525 8666837
%   gpg --keyserver 'hkps://hkps.pool.sks-keyservers.net' \
\`>     --recv-keys '744A4F0B4F1C9371'





reply via email to

[Prev in Thread] Current Thread [Next in Thread]