deb0ch / emacs-winum

Window numbers for Emacs - Navigate windows and frames using numbers
143 stars 13 forks source link

winum interferes with golden-ratio normal behaviour #35

Open PavoDive opened 11 months ago

PavoDive commented 11 months ago

I have installed golden-ratio package, and use M-<arrows> to navigate between windows. I installed winum and really love the fact that I didn't need to move my hand to the arrow keys. But when winum-mode is enabled, golden-ratio stops working as expected.

The following are the relevant parts of my .emacs:

;; bind navigation between windows to M-arrows
(windmove-default-keybindings 'meta)

;;; some other things follow

;;; winum (select windows by numbers
(require 'winum)
(set-face-attribute 'winum-face nil :weight 'bold)
(setq window-numbering-scope            'global
      winum-reverse-frame-list          nil
      winum-auto-assign-0-to-minibuffer t
      winum-auto-setup-mode-line        t
      winum-format                      " %s "
      winum-mode-line-position          1
      winum-ignored-buffers             '(" *which-key*")
      winum-ignored-buffers-regexp      '(" \\*Treemacs-.*"))

(winum-mode)

;;; enable golden ratio
(require 'golden-ratio)
(golden-ratio-mode 1)
(setq golden-ratio-auto-scale t)

I have noticed that when windows are created, they take the golden ratio aspect. See for instance the following sequence in a fresh screen:

C-x 2 ;; the upper window is taller than the bottom one
C-x 3 ;; the top-left window is larger than the others
C-x 2 ;; the top-left window is larger than the left-middle window (in all cases the active window has the golden ratio aspect)

;;; however, switching windows do not change their aspect (as expected):
C-x w 2 ;; switches to left-middle window, but it's not resized

What I've tried:

My emacs version:

user@Machine:~$ emacs --version
GNU Emacs 29.1
Development version 28fb02492c24 on master branch; build date 2023-12-10.