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?
xref-find-definitions: not what you are aiming for. Try("d" "find definitions" xref-find-definitions).