Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use read-buffer-to-switch in exwm-workspace-switch-to-buffer #200

Merged
merged 1 commit into from
Oct 1, 2016

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Sep 30, 2016

read-buffer-to-switch elides the current buffer from the list of completions and selects a sane default.

read-buffer-to-switch elides the current buffer from the list of
completions and selects a sane default.
@fjl fjl changed the title use read-buffer-to-switch in exwm-workspace-switch-to-buffer Use read-buffer-to-switch in exwm-workspace-switch-to-buffer Sep 30, 2016
@fjl
Copy link
Contributor Author

fjl commented Sep 30, 2016

Quick question: What is the purpose of exwm-workspace-switch-to-buffer anyway?

I'm asking because I got confused by its existence. What I wanted to achieve is that switching to an exwm-mode buffer moves the X window to the current workspace if necessary. I tried rebinding C-x b to exwm-workspace-switch-to-buffer for a while and found that it breaks ivy's virtual buffers and uses the wrong read function (fixed in this PR).

Some further investigation shows that I can just set exwm-workspace-show-all-buffers and exwm-layout-show-all-buffers to t and then regular switch-to-buffer and all its derivatives just work.

Maybe this is a documentation issue but so far I don't see why this function should exist. It would make sense to have it if it actually switched to the workspace that the X window is on, but right now it pulls the window into the current workspace.

@ch11ng ch11ng merged commit 7d732d7 into ch11ng:master Oct 1, 2016
@ch11ng
Copy link
Owner

ch11ng commented Oct 1, 2016

Thanks! I didn't notice the problem since I always use ido-everywhere.

exwm-workspace-switch-to-buffer is intended to be used when those two variables you mentioned are not set, that is, exwm-mode buffers are not shared among workspaces.

It would make sense to have it if it actually switched to the workspace that the X window is on, but right now it pulls the window into the current workspace.

This is not implemented yet, but it's possible.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants