ace-window icon indicating copy to clipboard operation
ace-window copied to clipboard

add ace-window-hook

Open aborn opened this issue 8 years ago • 4 comments

aborn avatar Sep 22 '16 04:09 aborn

What good can this hook serve?

abo-abo avatar Sep 23 '16 07:09 abo-abo

turning of golden-ratio-mode for a while and other stuff, maybe?

shackra avatar Sep 28 '16 04:09 shackra

What's wrong with using this in your own config:

(defun ace-window-after-hook (arg)
  (message "ace-window %d" arg))

(advice-add 'ace-window :after #'ace-window-after-hook)
;; (advice-remove 'ace-window #'ace-window-after-hook)

Compared to the hook solution, it's just one line more in the user's config. But:

  • It's 0 lines in my package, which means it's easier to use and understand.
  • It's more flexible in the user's config: you can redefine the advice to :before or :around etc.

abo-abo avatar Sep 28 '16 10:09 abo-abo

I guess there is nothing wrong...

El miércoles 28 de septiembre del 2016 a las 1020 horas, Oleh Krehel escribió:

What's wrong with using this in your own config:

(defun ace-window-after-hook (arg)
  (message "ace-window %d" arg))

(advice-add 'ace-window :after #'ace-window-after-hook)
;; (advice-remove 'ace-window #'ace-window-after-hook)

Compared to the hook solution, it's just one line more in the user's config. But:

  • It's 0 lines in my package, which means it's easier to use and understand.
  • It's more flexible in the user's config: you can redefine the advice to :before or :around etc.

👋 Pax et bonum. Jorge Araya Navarro https://es.gravatar.com/shackra

shackra avatar Sep 29 '16 00:09 shackra