From 7bf9d25de2ae4b1157ae61badddbdee32a51575b Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 28 Oct 2024 15:48:46 +0100 Subject: add inspect prefix --- lisp/mastodon-transient.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lisp') diff --git a/lisp/mastodon-transient.el b/lisp/mastodon-transient.el index 67ea667..ceea384 100644 --- a/lisp/mastodon-transient.el +++ b/lisp/mastodon-transient.el @@ -48,6 +48,20 @@ ;;; UTILS +(transient-define-suffix mastodon-transient--prefix-inspect () + "Inspect a transient prefix's arguments and scope." + (interactive) + :transient 'transient--do-return + (let ((args (transient-args (oref transient-current-prefix command))) + (scope (oref transient-current-prefix scope))) + (message "prefix's scope: %s \ntransient-args: %s\n last: %s" + scope args + (length + (cl-member-if + (lambda (x) + (equal (car x) 'one)) + args))))) + ;; some JSON fields that are returned under the "source" field need to be ;; sent back in the format source[key], while some others are sent kust as ;; key: -- cgit v1.2.3