Need help in bringing together ace-window link-hint zk
poulpoulsen opened this issue · 5 comments
Hello,
I want to bring together, what you described in
https://localauthor.github.io/posts/aw-select.html
Gould you please describe, how i should do it?
The packages for own are working (ace-window, link-hint, zk)
Regards
Poul
Certainly! It's a bit piecemeal, since it's not all together in one package but...
- Download the following two files:
https://github.com/localauthor/.emacs.d/blob/main/my-lisp/link-hint-aw-select.el
https://github.com/localauthor/.emacs.d/blob/main/my-lisp/zk-link-hint.el
-
Put these files in a directory on your load-path.
-
Add this to your
init.el
file:
(require 'zk-link-hint)
(require 'link-hint-aw-select)
(with-eval-after-load 'link-hint-aw-select
(link-hint-define-type 'zk-link
:aw-select #'link-hint--aw-select-zk-link)
(defun link-hint--aw-select-zk-link (id)
(with-demoted-errors "%s"
(if (> (length (aw-window-list)) 1)
(let ((window (aw-select nil))
(buffer (current-buffer))
(new-buffer))
(zk-follow-link-at-point id)
(setq new-buffer
(current-buffer))
(switch-to-buffer buffer)
(aw-switch-to-window window)
(switch-to-buffer new-buffer))
(link-hint-open-link-at-point)))))
After that, you can call function link-hint-aw-select
in the buffer where you want to use it. Bind it to a convenient keybinding!
Thank you,
as far as i see it works.
I will play a bit with it and come back then.
Thanks again.
Poul
Great! I'll leave this open then.
Let me know if you have issues/questions in the meantime.
Hi @poulpoulsen, just checking in to see if you've had any success/problems with this issue, or any others.
hello,
ah yes, i bring it together. sorry for the delay.
i do not fully understand how it works, but it works :-)
have to learn a bit more about using ace.
regards
poul