0

I have tried to define a transient for some elisp-function-calls that depend on the cursor-position and/or on the active buffer. Here an extract:

(transient-define-prefix navigation-transient-menu () "My transient for navigation through code" ["Commands" ("d" "find definitions" (lambda () (interactive) 'xref-find-definitions)) ]) 

However it does not work. When I call the prefix and select the d-command, nothing happens, while typing M-. via the keyboard at the same position works. I guess it has something todo with the cursor-position or the active buffer being in the transient menu. How can I make it work?

3
  • 1
    Your lambda will return the symbol xref-find-definitions: not what you are aiming for. Try ("d" "find definitions" xref-find-definitions). Commented Feb 26 at 18:24
  • Thank you @FranBurstall! That worked. Commented Mar 3 at 20:20
  • I turned that into an answer. Please accept it so this question does not remain "unanswered". Commented Mar 21 at 13:30

1 Answer 1

1

Your lambda will return the symbol xref-find-definitions: not what you are aiming for. Try ("d" "find definitions" xref-find-definitions).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.