[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 042f37aa66 21/23: transient-copy-menu-text: N
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 042f37aa66 21/23: transient-copy-menu-text: New command |
Date: |
Sun, 22 Dec 2024 08:44:41 -0500 (EST) |
branch: externals/transient
commit 042f37aa66e1b43afab8d0cf751da8b5c52f5282
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-copy-menu-text: New command
---
docs/transient.org | 8 ++++++++
docs/transient.texi | 8 ++++++++
lisp/transient.el | 9 +++++++++
3 files changed, 25 insertions(+)
diff --git a/docs/transient.org b/docs/transient.org
index b5fe66ff35..907d268d3b 100644
--- a/docs/transient.org
+++ b/docs/transient.org
@@ -428,6 +428,14 @@ window, and the key bindings are the same as for
~scroll-up-command~ and
lines. If {{{var(ARG)}}} is ~nil~, then it scrolls near full screen. This
is a wrapper around ~scroll-down-command~ (which see).
+The following commands are not available by default. If you would
+like to use them for all menus, bind them in ~transient-map~.
+
+- Command: transient-copy-menu-text ::
+
+ This command copies the contents of the menu buffer to the kill
+ ring.
+
** Configuration
More options are described in [[* Common Suffix Commands]], in [[* Saving
diff --git a/docs/transient.texi b/docs/transient.texi
index 48bd3af992..52259d1cc7 100644
--- a/docs/transient.texi
+++ b/docs/transient.texi
@@ -586,6 +586,14 @@ lines. If @var{ARG} is @code{nil}, then it scrolls near
full screen. This
is a wrapper around @code{scroll-down-command} (which see).
@end deffn
+The following commands are not available by default. If you would
+like to use them for all menus, bind them in @code{transient-map}.
+
+@deffn Command transient-copy-menu-text
+This command copies the contents of the menu buffer to the kill
+ring.
+@end deffn
+
@node Configuration
@section Configuration
diff --git a/lisp/transient.el b/lisp/transient.el
index 3aca297f1b..45b5f2b04c 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1971,6 +1971,7 @@ of the corresponding object."
"<transient-forward-button>" #'transient--do-move
"<transient-isearch-backward>" #'transient--do-move
"<transient-isearch-forward>" #'transient--do-move
+ "<transient-copy-menu-text>" #'transient--do-stay
;; If a valid but incomplete prefix sequence is followed by
;; an unbound key, then Emacs calls the `undefined' command
;; but does not set `this-command', `this-original-command'
@@ -3273,6 +3274,14 @@ transient is active."
(message "Debugging transient %s"
(if transient--debug "enabled" "disabled")))
+(defun transient-copy-menu-text ()
+ "Copy the contents of the menu buffer to the kill ring.
+To make this available in all menus, bind it in `transient-map'"
+ (interactive)
+ (transient--show)
+ (with-current-buffer (get-buffer transient--buffer-name)
+ (copy-region-as-kill (point-min) (point-max))))
+
(transient-define-suffix transient-echo-arguments (arguments)
"Show the transient's active ARGUMENTS in the echo area.
Intended for use in prefixes used for demonstration purposes,
- [elpa] externals/transient fd9811ea1a 13/23: transient--fit-window-to-buffer: Also fit horizontally, (continued)
- [elpa] externals/transient fd9811ea1a 13/23: transient--fit-window-to-buffer: Also fit horizontally, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient a45ac41152 15/23: transient--show: No longer redo setup on every refresh, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 88031d6891 14/23: transient--delete-window: Ensure buffer is always killed, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 667ce2b287 18/23: Use transient-default-value in transient-init-value(suffix), Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 184d0074e8 16/23: Store parent group in suffix and subgroup objects, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 76647bfb9b 17/23: transient--inapt-suffix-p: Return t if parent is inapt, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 54d116b9ae 08/23: transient--get-pre-command: Change argument order, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient be2189ab3c 10/23: transient-prefix: Remove unused variable slot, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 52679f9853 22/23: transient-toggle-docstrings: New command, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 5a18a79100 23/23: transient-describe: New command, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 042f37aa66 21/23: transient-copy-menu-text: New command,
Jonas Bernoulli <=