exwm icon indicating copy to clipboard operation
exwm copied to clipboard

make exwm-workspace-switch-to-buffer switch workspaces

Open fjl opened this issue 8 years ago • 12 comments

As per discussion in #200, I'd like to propose that exwm-workspace-switch-to-buffer should switch workspaces instead of pulling the buffer to the current workspace.

fjl avatar Oct 02 '16 00:10 fjl

Thanks! I've just tried this and it seems working for me. But I think it'd be better if you can make this a new command or some users may get confused by the change (and exwm-workspace-switch-to-buffer is naturally analogous to switch-to-buffer).

ch11ng avatar Oct 02 '16 15:10 ch11ng

Sorry didn't have much time last few weeks.

What should it be renamed to? I thought exwm-workspace-switch-to-buffer made sense because of the analogy to exwm-workspace-switch. The best I can come up with is exwm-workspace-switch-by-buffer but then they're too similar...

fjl avatar Oct 30 '16 23:10 fjl

Perhaps simply exwm-workspace-switch-to-buffer-1?

ch11ng avatar Oct 31 '16 14:10 ch11ng

I'd say exwm-workspace-select-buffer, in analogy with select-* functions, particularly the interactive command select-frame-by-name.

Best regards, Adrián.

medranocalvo avatar Nov 01 '16 07:11 medranocalvo

Is there interest in reviving this?

madnificent avatar Nov 13 '20 11:11 madnificent

Is there interest in reviving this?

I would be interested. Common use case for me: S-f switches to web browser buffer on my setup. Most of the time, I don't want to pull the browser into my workspace if it visible on another one. Since I do that quite often, it would save quite a bit of key strokes.

timor avatar Nov 13 '20 20:11 timor

@medranocalvo Any plans on merging this? It's quite annoying.

2ndemosthenes avatar Nov 12 '21 16:11 2ndemosthenes

@2ndemosthenes, thank you for bringing this up.

I think it is a fine use case.

I don't think this should be implemented in EXWM (necessarily, see below).

In my view, a key feature of EXWM is that it lets us treat X windows as Emacs' buffers, thus apply Emacs' window management to X windows. With that I mean not only Emacs' default window management (other-window, etc.), but also evil or avy or shackle... To each their own.

The feature proposed here is the ability to select the window displaying a buffer in another frame instead of displaying the buffer in current window (where the buffer is an exwm-mode buffer, i.e., an X window).

Does Emacs already offer a way to do this?

If it does, we should write about it in the Cookbook, or showcase it in exwm-config-example. Maybe we should offer a function in order to ease configuration or discoverability, or maybe we should tailor the function to EXWM (for example, search only in EXWM workspaces).

If Emacs doesn't: it should! We should patch Emacs to support this.


...checks Emacs...

It seems to me that the following is Emacs' way of doing this:

(pop-to-buffer
 (read-buffer "Select buffer: " (other-buffer))
 '((display-buffer-reuse-window) . ((reusable-frames . visible))))

See also display-buffer-alist.


medranocalvo avatar Nov 13 '21 23:11 medranocalvo

Thanks you.

2ndemosthenes avatar Nov 17 '21 16:11 2ndemosthenes

@2ndemosthenes (and everyone else): I would appreciate your thoughts on the following:

If it does, we should write about it in the Cookbook, or showcase it in exwm-config-example. Maybe we should offer a function in order to ease configuration or discoverability, or maybe we should tailor the function to EXWM (for example, search only in EXWM workspaces).

medranocalvo avatar Nov 18 '21 15:11 medranocalvo

@medranocalvo Yes, I think it would be very helpful to add it Cookbook or the config since many may want to do this but dont know how (or maybe think it can't be done)

2ndemosthenes avatar Nov 19 '21 05:11 2ndemosthenes

Do we have any workarounds to get this functionality right now? I would love to select an EXWM buffer and navigate to it's workspace properly

cherryramatisdev avatar Nov 24 '21 14:11 cherryramatisdev