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

Window numbers are incorrect in daemon mode #73

Open
seagle0128 opened this issue Oct 24, 2018 · 5 comments
Open

Window numbers are incorrect in daemon mode #73

seagle0128 opened this issue Oct 24, 2018 · 5 comments

Comments

@seagle0128
Copy link
Contributor

seagle0128 commented Oct 24, 2018

Hi,

When I using emacsclient -a "" -nw to start Emacs as daemon, the window numbers are incorrect while switching window. It happens on GNU Emacs 26.1/27.0.50 with Ubuntu/Mint Linux/macOS.

Only two windows, but the numbers are 2 and 3 in the screenshot below.
image

BTW, the numbers are correct in ace-window and winum.

@tumashu
Copy link
Collaborator

tumashu commented Oct 27, 2018

I have tested in windows, seem to have no problem, please test by bare emacs, maybe it is a configure problem.

@seagle0128
Copy link
Contributor Author

seagle0128 commented Oct 27, 2018

It exists in the terminal on Linux and macOS. On Windows, there is not real daemon mode actually.

@dolorsitatem
Copy link

dolorsitatem commented Nov 20, 2018

Here are the minimal steps which reproduce it for me. I'm running Windows 7 with Emacs 26.1.

I have switch-window installed. I have renamed my init.el so that it is not loaded.

  1. In cmd.exe, I run emacsclientw.exe -n -c -a ""
  2. In the default *scratch* buffer, I execute (require 'switch-window)
  3. I create several splits, C-x 2 C-x 3
  4. I try switching windows with C-x o

This produces the following:

switch-window

Pressing a has no effect.

@dolorsitatem
Copy link

Here's a workaround when using the switch-window-qwerty-shortcuts. I imagine this can be extended to other shortcut setups.

It seems that the first shortcut is being lost somewhere. So, just throw a dummy one in there.

(setq switch-window-qwerty-shortcuts '("x" "a" "s" "d" "f" "j" "k" "l" ";" "w" "e" "i" "o")

My full setup is as follows:

(use-package switch-window
  :ensure t
  :bind
  ;; default C-x o is other-window
  ;; default C-x C-o is delete-blank-lines
  (("C-x o" . switch-window)
   ("C-x C-o" . switch-window))
  :config
  (setq switch-window-multiple-frames t)
  (setq switch-window-shortcut-style 'qwerty)
  (setq switch-window-qwerty-shortcuts '("x" "a" "s" "d" "f" "j" "k" "l" ";" "w" "e" "i" "o"))
  (setq switch-window-increase 3))

@dolorsitatem
Copy link

I notice that the labeling of windows depends on the monitor the frame is on. I have 4 monitors. Say that I have 3 frames open with 4 windows total. I can have a frame on the far left monitor and it will be labeled "a". When I move that same frame to the far right monitor, it becomes ";". It skips several of the qwerty shortcuts:

  (setq switch-window-qwerty-shortcuts '("a" "s" "d" "f" "j" "k" "l" ";" "w" "e" "r" "u" "i" "o" "q" "t" "y" "p"))

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

3 participants