-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
C-i
and C-o
shouldn't jump between files in different workspaces
#2826
Comments
C-o
shouldn't jump between workspacesC-o
shouldn't jump between files in different workspaces
C-o
shouldn't jump between files in different workspacesC-i
and C-o
shouldn't jump between files in different workspaces
This always annoyed me, but I didn't realize that was because the "queue" of |
I can also confirm that this happens to me too, and it annoys the hell out of me! 😈 |
I've also been frustrated by this issue and I came up with the following partial fix:
While this prevents the addition of jump points from other perspectives, there are other issues that also need to be addressed:
I still have to investigate these and maybe contribute it upstream, in the meantime the above snippet reduces the pain. |
Hey, I'm the author of
This is working by design based on the
@sgleizes Can you please create a bug on gilbertw1/better-jumper with steps to reproduce this issue? From my testing, I'm not able to reproduce this problem.
@sgleizes Could you also provide a scenario that reproduces |
Hello and thanks for your insights!
That's also what I thought first, but in my case it seems that the window for the new workspace and the original window share the same jump list (does it mean that they are the same window?). To make sure I tried clearing the jump list as in your PR, and this results in the jump list of the original perspective's window being cleared as well, which is not intended. This happens regardless of the
I will, but first I will try with a minimal configuration to make sure I don't have some parts of my own config interfering here, since it seems that I get a different behavior on all mentioned aspects.
For me this was occurring when simply switching between workspaces using e.g. |
Thanks for the response. The negative interactions with |
So I just tested with a default doom configuration. For the sake of clarity here are the 3 issues under investigation:
How to reproduce
Solutions so far
|
Thanks, for the detailed reply. I've been pretty busy today, so I haven't had much time to look at this so far. After updating doom to the lastest (including all packages), which I haven't don't in a while, I've noticed a regression where it appears that the window properties are being shared between perspectives as they're created, instead of the expected copy. Therefore the actual underlying jump lists are being utilized by multiple perspectives simultaneously which is causing confusing behavior with jumps crossing the perspective boundary. I haven't yet been able to dig into where or when this regression was introduced, but I plan on looking into it tonight. |
I'm still digging into the cause of the problem and a proper solution. It appears that the window configuration from the current window is being used whenever a new perspective is being created. This results in all the properties in the current selected window (better jumper jumps, buffer list, etc) being inherited into the new perspective instead of those properties being isolated between the new and old perspective. A temporary workaround for this would be the following advice: (with-eval-after-load 'persp-mode
(defadvice persp-delete-other-windows (before better-jumper activate)
(select-window (split-window)))) When This will solve problem by preventing the existing window properties (buffer list, jumps, etc.) from leaking into the newly created perspective and result in an effectively blank window being used as the basis of the new perspective. |
I just created a pull request that should solve this problem. Better jumper has been updated to now ensure that upon activating a new workspace, an existing jump list is never leaked into a new perspective. I'm also contemplating creating a proposal for |
What did you expect to happen?
Each workspace should be independent between each other, so opening a new project in a new workspace should be like opening another project in a new instance of Emacs, just in another "tab" (workspace) instead.
What actually happened?
Calling
C-o
(better-jumper-jump-backward
) after opening a new file from a new project inside a new workspace goes back to the old file from the old project, however the workspace is not switched up.So you actually have, say, a workspace called "Project 2" that has a file from "Project 1" opened on it (while "Project 1" workspace still exists).
Additional details:
Steps to reproduce:
doom-emacs
SPC p p
(this will create a new workspace)C-o
C-i
andC-o
will alternate between files from the two projects (at least this is consistent)System information:
The text was updated successfully, but these errors were encountered: