-
Notifications
You must be signed in to change notification settings - Fork 17
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
Error if window is strongly dedicated #113
Comments
I ended up writing this function (defun my/navigate-to-exwm-buffer ()
"Navigate to EXWM buffer whereever it is."
(interactive)
(let* ((buffers-alist exwm--id-buffer-alist)
(buffer-names
(mapcar (lambda (pair)
(cons (string-trim-left (buffer-name (cdr pair))) (cdr pair)))
buffers-alist))
(selected-buffer-name
(completing-read "Select Application: " buffer-names nil t))
(selected-buffer
(cdr (assoc selected-buffer-name buffer-names))))
(with-current-buffer selected-buffer
(exwm-workspace-switch exwm--frame)
(if (not exwm--floating-frame)
(switch-to-buffer selected-buffer)
;; Select the floating frame.
(select-frame-set-input-focus exwm--floating-frame)
(select-window (frame-root-window exwm--floating-frame))))))
I'm not optimising it too much, but at least do I miss anything critical? |
It looks like the real issue is that we're "stealing" an EXWM buffer from a window where it's "dedicated". The only real feasible solution I can think of is to automatically undedicate and/or close the window we stole the buffer from. But there are some snags:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
exwm/exwm-workspace.el
Lines 1036 to 1040 in 26d24e5
Hi, using this function I noticed that if the selected window is nil, an error can happen for
It happens when returns a window that is strongly dedicated.
as a workaround I had to replace this piece of code with
The solution proposed is weird and I do not like it. The behavior (window placement) is different from the case you first switch to the desired workspace and then switch to buffer.
Background
Initially I was attempting to write similar function but with non-EXWM buffers filtered out. I wanted to easily navigate across opened applications.
The text was updated successfully, but these errors were encountered: