abo-abo / ace-window

Quickly switch windows in Emacs
977 stars 87 forks source link

ace-window-display-mode doesn't respect aw-ignore-buffers #143

Closed seagle0128 closed 5 years ago

seagle0128 commented 5 years ago

GNU Emacs 26.1 macOS Mojave ace-window-20181008.1549

While enabling ace-window-display-mode, still display the window number for ignored buffers. I add some buffers to aw-ignored-buffersand set aw-ignore-on to t.

seagle0128 commented 5 years ago

I checked aw-update, and dont' understand why let aw-ignore-on to nil. I think aw-ignore-on and aw-ignore-current are should be removed from let but need your confirm.

(defun aw-update ()
  "Update ace-window-path window parameter for all windows.

Ensure all windows are labeled so the user can select a specific
one, even from the set of windows typically ignored when making a
window list."
  (let ((aw-ignore-on)
        (aw-ignore-current)
        (ignore-window-parameters t))
    (avy-traverse
     (avy-tree (aw-window-list) aw-keys)
     (lambda (path leaf)
       (set-window-parameter
        leaf 'ace-window-path
        (propertize
         (apply #'string (reverse path))
         'face 'aw-mode-line-face))))))
abo-abo commented 5 years ago

You can see from the docstring of aw-update that all windows are labeled intentionally.

Since then you can use M-0 ace-window to select a window on your ignored list if a need arises. So I think it's not a bug.

seagle0128 commented 5 years ago

I see it's not an issue of aw-update now. But how to make ace-window-display-mode to respect aw-ignore-buffers, please?

abo-abo commented 5 years ago

You'd have to rewrite aw-update to not bind aw-ignore-on to nil as it does now.

seagle0128 commented 5 years ago

Thank you! That's what I am doing.