diff options
author | marty hiatt <martianhiatus@disroot.org> | 2024-10-28 15:48:46 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@disroot.org> | 2024-10-28 15:48:46 +0100 |
commit | 7bf9d25de2ae4b1157ae61badddbdee32a51575b (patch) | |
tree | 4a072d2cf93109fc364443f30462c9317a0365b1 | |
parent | 2a3369bdca00ff2a31363799ca3b13b9f341e720 (diff) |
add inspect prefix
-rw-r--r-- | lisp/mastodon-transient.el | 14 |
1 files changed, 14 insertions, 0 deletions
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: |