unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
Cc: 38294@debbugs.gnu.org
Subject: bug#38294: [PATCH] Handle killing of virtual buffers in Ido
Date: Wed, 22 Jan 2020 10:00:24 +0100	[thread overview]
Message-ID: <87wo9jkgrb.fsf@marxist.se> (raw)
In-Reply-To: <fv2zojftg7zyt1.fsf@gmail.com> (Dario Gjorgjevski's message of "Wed, 22 Jan 2020 09:21:30 +0100")

Hi Dario,

Dario Gjorgjevski <dario.gjorgjevski@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





  reply	other threads:[~2020-01-22  9:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20  8:56 bug#38294: [PATCH] Handle killing of virtual buffers in Ido Dario Gjorgjevski
2020-01-20 18:40 ` Stefan Kangas
2020-01-22  8:21   ` Dario Gjorgjevski
2020-01-22  9:00     ` Stefan Kangas [this message]
2020-08-09 13:20       ` Lars Ingebrigtsen
2020-08-12 22:01         ` Stefan Kangas
2020-08-13  8:16           ` Lars Ingebrigtsen
2020-08-13  8:37             ` Stefan Kangas
2020-08-13  8:39               ` Lars Ingebrigtsen
2020-08-13  9:50           ` Dario Gjorgjevski
2020-08-13 11:04             ` Stefan Kangas
2020-08-14  9:23               ` Dario Gjorgjevski
2020-08-14 11:00                 ` Lars Ingebrigtsen
2020-08-14 16:14                   ` Stefan Kangas
2020-08-14 21:58                     ` Dario Gjorgjevski
2020-08-14 22:56                       ` Stefan Kangas
2020-08-15  8:03                         ` Dario Gjorgjevski
2020-08-15 10:29                           ` Lars Ingebrigtsen
2020-08-15 14:03                             ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo9jkgrb.fsf@marxist.se \
    --to=stefan@marxist.se \
    --cc=38294@debbugs.gnu.org \
    --cc=dario.gjorgjevski@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).