-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent buffers from being added to several perspectives #164
Comments
Perspective always adds a buffer to the current perspective when the buffer is displayed. Meaning, if you switch to a buffer which is not in the current perspective, it will then be added to the current perspective. This also happens if you use a previewing buffer switcher like If you're absolutely certain that buffers are being added to the current perspective even though you did not at any point display them, then that's a bug and I'll need a test case reproducible with |
Thanks for your answeer. For example, if I kill a buffer in a given perspective, another buffer will be automatically displayed which may belong to another perspective. Then, this buffer is unexpectedly added to the current perspective. Reading what you say, it does not seem to be a bug. But, I wish it could be prevented. Is there a way to prevent any displayed buffer from being automatically added ? Regards |
The behavior you’re describing, i.e., pulling in a buffer from a different perspective after killing a buffer, should not happen. A series of bugs did cause it to occur in rare situations, but I fixed all the ones I knew about quite a long time ago. If it happens to you regularly, that’s definitely a bug and needs to be investigated. What version of Perspective do you have installed? Also, could you please double-check that you have Perspective installed, and not the persp-mode fork? |
Yes I am sure it is Let's say I start from a clean Then, I start I think I can reproduce this quite well. Also, following on this example, if I try to close the unexpected buffer in the main perspective with Regards EDIT : emacs 28.0.50 mingw64 / windows 10 |
I want to get to the bottom of this, but I can't reproduce it on Emacs 27.2. Here is a scripted test case. To run it, launch Emacs like this:
This will start Emacs with no custom configurations which may interfere, but will activate Perspective. Next, save the following code to a file called (setq backup-inhibited t)
(setq auto-save-default nil)
(require 'ibuffer)
(global-set-key (kbd "C-x C-b") #'persp-ibuffer)
(persp-switch "one")
(find-file "/tmp/persp-one-file-1.txt")
(insert "persp: one\nfile 1\n")
(persp-switch "two")
(find-file "/tmp/persp-two-file-2.txt")
(insert "persp: two\nfile 2\n")
(persp-switch "three")
(gnus nil t) Since you use Windows, you may have to change the Load this file: press M-: and then run (This script also binds C-x C-b to Now you should be looking at an empty Gnus buffer. At this point, whether I hit q or C-x k to exit Gnus, the buffer which pops up is
|
Hi, Run your test, which is ok. Perhaps something in my configuration. I will look into this. Regards |
@deb75: Please grab the latest Perspective from MELPA and set
Then restart Emacs. There's a lot of new code there to try to keep this problem from happening in the edge case of killing the last buffer in a perspective affecting other perspectives. |
Thanks a lot for coping with this issue which was preventing me from using I will give it a try as soon as I can and, let you know if the issue persists. Regards |
Hello,
I have just begun to use
perspective
, perhaps this question is just due to my lack of practice.Sometimes when I switch from one perspective to another, I notice with
persp-ibuffer
that some buffersfrom previous perspective do appear in the current one, although I did not want to add thess buffers to the
current perspective.
How can I make sure that buffers (files) belonging to one perspective will not mix with other perspectives.
As for now, i have to issue
C-x x A
all the time. Is there any settings to do this once for all ?Regards
The text was updated successfully, but these errors were encountered: