[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/20: emacs: Add utils to copy guix command.
From: |
Alex Kost |
Subject: |
07/20: emacs: Add utils to copy guix command. |
Date: |
Tue, 18 Aug 2015 09:41:10 +0000 |
alezost pushed a commit to branch wip-emacs-popup-ui
in repository guix.
commit b4bcd44e2ebbb34404aa222031ea9ac1f73d97ad
Author: Alex Kost <address@hidden>
Date: Sun Aug 16 11:11:37 2015 +0300
emacs: Add utils to copy guix command.
* emacs/guix-utils.el (guix-copy-as-kill, guix-copy-command-as-kill):
New functions.
---
emacs/guix-utils.el | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el
index dfcab4d..700eeec 100644
--- a/emacs/guix-utils.el
+++ b/emacs/guix-utils.el
@@ -152,6 +152,18 @@ add both to the end and to the beginning."
"Return 'guix ARGS ...' string."
(guix-concat-strings (cons "guix" args) " "))
+(defun guix-copy-as-kill (string &optional no-message?)
+ "Put STRING into `kill-ring'.
+If NO-MESSAGE? is non-nil, do not display a message about it."
+ (kill-new string)
+ (unless no-message?
+ (message "'%s' has been added to kill ring." string)))
+
+(defun guix-copy-command-as-kill (args &optional no-message?)
+ "Put 'guix ARGS ...' string into `kill-ring'.
+See also `guix-copy-as-kill'."
+ (guix-copy-as-kill (guix-command-string args) no-message?))
+
(defun guix-completing-read-multiple (prompt table &optional predicate
require-match initial-input
hist def inherit-input-method)
- 03/20: emacs: Add 'guix-package-names'., (continued)
- 03/20: emacs: Add 'guix-package-names'., Alex Kost, 2015/08/18
- 05/20: emacs: Add and use 'guix-concat-strings'., Alex Kost, 2015/08/18
- 04/20: emacs: Add and use 'guix-while-search'., Alex Kost, 2015/08/18
- 06/20: emacs: Add utils to make symbol and string for guix command., Alex Kost, 2015/08/18
- 08/20: emacs: Add 'guix-any'., Alex Kost, 2015/08/18
- 09/20: emacs: Add 'guix-memoized-defalias' macro., Alex Kost, 2015/08/18
- 13/20: ui: Add 'run-guix'., Alex Kost, 2015/08/18
- 02/20: emacs: Add 'guix-lint-checker-names'., Alex Kost, 2015/08/18
- 14/20: emacs: Add code to run guix command in REPL., Alex Kost, 2015/08/18
- 10/20: emacs: Add help variables., Alex Kost, 2015/08/18
- 07/20: emacs: Add utils to copy guix command.,
Alex Kost <=
- 15/20: emacs: Add code to run guix command in shell., Alex Kost, 2015/08/18
- 20/20: emacs: Use popup interface instead 'guix-pull' command., Alex Kost, 2015/08/18
- 11/20: emacs: Add minibuffer readers., Alex Kost, 2015/08/18
- 16/20: doc: Reorganize "Emacs Interface" node., Alex Kost, 2015/08/18
- 17/20: emacs: Add "guix-popup.el"., Alex Kost, 2015/08/18
- 12/20: emacs: Add and use alist accessors., Alex Kost, 2015/08/18
- 19/20: emacs: Use prompt for packages instead popup for edit action., Alex Kost, 2015/08/18
- 18/20: emacs: Add popup interface for guix commands., Alex Kost, 2015/08/18