unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Constantin Kulikov <zxnotdead@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: kill-buffer calls frame's buffer-predicate for all buffers even if the killed buffer was not shown in any window.
Date: Tue, 17 Jan 2017 01:21:14 +0300	[thread overview]
Message-ID: <CAFkz2yoQX5jCZc82apBSPwUrNok=Ngqj4ozGEFWoCYvd2G==+w@mail.gmail.com> (raw)
In-Reply-To: <83d1fn9dio.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

Ok, here is my attempt to code this:
https://github.com/Bad-ptr/emacs/commit/cf6b0d9f08dbdc5dd685dbc6a5ef9ff18575e2b2
This seem to work for my example from the start of discussion(not tested it
much for now).

> you didn't describe the use case where this issue got in your
way, so perhaps you should.

If you set a 'heay' buffer-predicate like here
https://github.com/Bad-ptr/persp-mode.el/blob/master/persp-mode.el#L2793
(This package provide a way to switch between 'projects',
each project has a list of buffers, it is essential to set a
buffer-predicate that
will constrain buffer switching to the current 'project' so it needs to
check if a
buffer is a member of the current project list. There may be many buffers
from
many projects)
And if you are the user of a package that overuse the with-temp-buffer(like
helm
or if you run down the list of candidates of the company-mode) you can
notice a
slowdown.
https://github.com/Bad-ptr/persp-mode.el/issues/35

And I just think that this behavior of the kill-buffer is wrong and could
be fixed
quite easily and without introducing new functions or breaking user
experience.
Maybe I'm wrong.
And I'm not saying that this is a critical bug or somehow urgent, just
wanted to
discuss the idea.

[-- Attachment #2: Type: text/html, Size: 1954 bytes --]

  parent reply	other threads:[~2017-01-16 22:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-15 19:32 kill-buffer calls frame's buffer-predicate for all buffers even if the killed buffer was not shown in any window Constantin Kulikov
2017-01-15 20:31 ` Eli Zaretskii
2017-01-16  8:14   ` Constantin Kulikov
2017-01-16 16:26     ` Eli Zaretskii
2017-01-16 16:55       ` Eli Zaretskii
2017-01-16 22:21       ` Constantin Kulikov [this message]
2017-01-17 14:26         ` Stefan Monnier
2017-01-17 14:40         ` Constantin Kulikov
2017-01-18 10:03           ` Constantin Kulikov
2017-01-18 15:43             ` Eli Zaretskii

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='CAFkz2yoQX5jCZc82apBSPwUrNok=Ngqj4ozGEFWoCYvd2G==+w@mail.gmail.com' \
    --to=zxnotdead@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).