Replies: 2 comments 3 replies
-
My current "solution" is this abomination: (defun cperivol--transient-init-objects (&rest args)
(when (and (boundp 'cperivol-transient--caller) (functionp cperivol-transient--caller))
(dolist (obj transient--suffixes)
(setf (oref obj command)
(let ((fn (gensym)))
(eval
`(defun ,fn ()
(interactive)
(funcall ,cperivol-transient--caller (quote ,(oref obj command)))))
fn)))))
(advice-add #'transient--init-objects :after #'cperivol--transient-init-objects)
(transient-define-prefix foo-popup ()
"Doc."
["Actions"
("a" "Action" action-command)]
(interactive "P")
(let* ((buf (get-the-buffer-at-popup-time))
(dir (get-the-dir-at-popup-time))
(cperivol-transient--caller (apply-partially
(lambda (dir buf fn)
(let ((default-directory dir))
(funcall fn buf)))
dir buf)))
(transient-setup 'foo-popup))) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm not sure what you are trying to do but I am guessing its similar to what |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
I am trying to pass some information from the prefix to the suffix command, ideally by binding the suffix command arguments. For example I would like to do something like this:
I am suspecting that I am misunderstanding something about how transient is supposed to be used, can someone help me clarify the situation?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions