with-emacs / mcfly

Execute commands like Marty McFly
https://with-emacs.com/posts/execute-commands-like-marty-mcfly/
5 stars 2 forks source link

vod variable ivy-hooks-alist? #2

Closed peng051410 closed 5 years ago

peng051410 commented 5 years ago

When eval buffer, I got this error: Debugger entered--Lisp error: (void-variable ivy-hooks-alist) (cons (cons 'swiper 'mcfly-swiper) ivy-hooks-alist) (setq ivy-hooks-alist (cons (cons 'swiper 'mcfly-swiper) ivy-hooks-alist)) (lambda nil (setq ivy-hooks-alist (cons (cons 'swiper 'mcfly-swiper) ivy-hooks-alist)) (defalias 'mcfly-swiper (function (lambda nil (let ((sym (let ((save-selected-window--state (internal--before-with-selected-window (ivy--get-window ivy-last)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (thing-at-point 'symbol)) (internal--after-with-selected-window save-selected-window--state)))))) (if sym (progn (add-hook 'pre-command-hook 'mcfly-back-to-present nil t) (save-excursion (insert (propertize sym 'face 'shadow))))))))))() eval-after-load(ivy (lambda nil (setq ivy-hooks-alist (cons (cons 'swiper 'mcfly-swiper) ivy-hooks-alist)) (defalias 'mcfly-swiper (function (lambda nil (let ((sym (let ((save-selected-window--state (internal--before-with-selected-window (ivy--get-window ivy-last)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (thing-at-point 'symbol)) (internal--after-with-selected-window save-selected-window--state)))))) (if sym (progn (add-hook 'pre-command-hook 'mcfly-back-to-present nil t) (save-excursion (insert (propertize sym 'face 'shadow))))))))))) eval-buffer() ; Reading at buffer position 1723 funcall-interactively(eval-buffer) call-interactively(eval-buffer nil nil) command-execute(eval-buffer)

What should i do?

clemera commented 5 years ago

It looks like the variable ivy-hooks-alist is unknown:

(void-variable ivy-hooks-alist)

What version of ivy are you using? You probably need to update it.

peng051410 commented 5 years ago

version is 20180415.905, it's to old?

clemera commented 5 years ago

I think so, what does C-h v ivy-hooks-alist show you? When this variable isn't defined you need to update.

peng051410 commented 5 years ago

Yes, my ivy version problem!