I just started trying out ivy. I took the following example from the ivy tutorial:
(defun my-action-1 (x)
(message "action-1: %s" x))
(defun my-action-2 (x)
(message "action-2: %s" x))
(defun my-action-3 (x)
(message "action-3: %s" x))
(defun mih ()
(interactive)
(ivy-read "test: " '("foo" "bar" "baz")
:action '(1
("o" my-action-1 "action 1")
("j" my-action-2 "action 2")
("k" my-action-3 "action 3"))))
My problem is, no matter which option I select, only the default function is invoked. Say, I selected option "j" above, I still the message:
"action-1 bar"
My expectation was that I would get:
"action-2 bar"
Since I did not make any changes to the code from the tutorial, I think I am missing something here.
Any ideas?
M-x mih
, select foo,M-o k
, messagesaction-3: foo
. – Hubisan Aug 19 '19 at 20:57