Skip to content
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

switch-window-multiple-frames returns error in EXWM #82

Open
emysliwietz opened this issue Nov 12, 2020 · 0 comments
Open

switch-window-multiple-frames returns error in EXWM #82

emysliwietz opened this issue Nov 12, 2020 · 0 comments

Comments

@emysliwietz
Copy link

I am using switch-window in Emacs 27.1 under EXWM with two frames, spanning two monitors.
My configuration is as follows:

(use-package switch-window
  :ensure t
  :defer t
  :config
  (setq switch-window-multiple-frames nil)
  (setq switch-window-input-style 'minibuffer)
  (setq switch-window-increase 4)
  (setq switch-window-threshold 2)
  (setq switch-window-shortcut-style 'qwerty)
  (setq switch-window-qwerty-shortcuts
	'("j" "k" "l" "a" "s" "d" "f")) ; ö does not work without pressing RET
  :bind
  ([remap other-window] . switch-window))

If I change the first config line into

  (setq switch-window-multiple-frames t)

and subsequently call C-x o (switch-window), (using the debug-on-error variable) the first monitor's frame populates with labels as it should
image
No labels appear on the second monitor, pressing the key associated to a label does nothing (because the debugger is trapping input, I guess).

The stack trace looks as follows:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  propertize(nil face switch-window-label)
  (insert (propertize label 'face 'switch-window-label))
  (cond ((eq switch-window-shortcut-appearance 'asciiart) (setq line-spacing nil) (insert (replace-regexp-in-string "^\n" "" (nth (cl-position label (remove "" (split-string "123456789abcdefjhijklmnopqrstuvwxyz" "")) :test #'equal) switch-window-asciiart)))) ((eq switch-window-shortcut-appearance 'text) (insert (propertize label 'face 'switch-window-label))) ((eq switch-window-shortcut-appearance 'image) (let ((types (cl-copy-seq image-types)) file) (while types (let* ((type (car-safe ...)) (file1 (format "%s%s.%S" ... label type))) (if (file-exists-p file1) (progn (setq file file1) (setq types nil))))) (if (and file (display-images-p)) (insert-image-file (expand-file-name file)) (insert (propertize label 'face 'switch-window-label))))))
  (save-current-buffer (set-buffer buffer) (if switch-window-background (progn (insert background) (goto-char (point-min)))) (cond ((eq switch-window-shortcut-appearance 'asciiart) (setq line-spacing nil) (insert (replace-regexp-in-string "^\n" "" (nth (cl-position label (remove "" ...) :test #'equal) switch-window-asciiart)))) ((eq switch-window-shortcut-appearance 'text) (insert (propertize label 'face 'switch-window-label))) ((eq switch-window-shortcut-appearance 'image) (let ((types (cl-copy-seq image-types)) file) (while types (let* ((type ...) (file1 ...)) (if (file-exists-p file1) (progn ... ...)))) (if (and file (display-images-p)) (insert-image-file (expand-file-name file)) (insert (propertize label 'face 'switch-window-label)))))) (insert " ") (goto-char (point-min)) (set (make-local-variable 'buffer-read-only) t) (set (make-local-variable 'show-trailing-whitespace) nil) buffer)
  switch-window--create-label-buffer(#<window 15 on *scratch*> #<buffer  *nil: *scratch**> nil "")
  switch-window--display-number(#<window 15 on *scratch*> 5)
  switch-window--prompt("Move to window: ")
  switch-window--then("Move to window: " switch-window--other-window-or-frame)
  switch-window()
  funcall-interactively(switch-window)
  call-interactively(switch-window nil nil)
  command-execute(switch-window)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant