-
Notifications
You must be signed in to change notification settings - Fork 1
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
Workaround for switch buffer? #8
Comments
Hello @JordanAnthonyKing, thank you for the report. I am not 100% sure that I understand correctly, so let me write a step-by-step how I tried to reproduce this, and please confirm that it is correct, or tell me what I am doing wrong.
What you expect to happen: What I understand, happens for you: |
Apologies, I reenabled this package today and I'm not seeing that behaviour anymore. That said, is there a workaround for switch-to-buffer-other-window? |
Ok, nice.
Depends on how it behaves for you now and what do you want it to do. When |
Yes that's how it works for me but I'd like it to retain its old behaviour. Maybe advise those functions to quickly disable and reenable the mode? |
I see. You can try this: (defun switch-to-buffer-other-window-force ()
(interactive)
(let ((override #'current-window-only--switch-to-buffer-other-window))
(advice-remove 'switch-to-buffer-other-window override)
(call-interactively #'switch-to-buffer-other-window)
(advice-add 'switch-to-buffer-other-window :override override))) This should work for your use-case. The implementation probably could be easier but I am too big a of an Emacs Lisp noob for that. Can you please test, so that I can then recommend this workaround in |
Apologies, I am now observing this behaviour again, but it's "randomly" started after a prolonged period messing about. Is there any info I can provide you with to help pin this down? |
I have no idea how that can happen. AFAIK by default Is it possible you have some other package enabled, that modifies the behavior? |
Okay, it seems to happen only when that buffer is visible in the other window, does that help narrow it down? |
Not really, that what I've been trying from the beginning as described in #8 (comment) |
If you have two windows open, and a buffer was previously opened in one of them, when you switch to that buffer instead of opening in the current window it will be opened in the window it was open in previously and focus will be shifted to that window. Is there a workaround for this?
The text was updated successfully, but these errors were encountered: