[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/24: emacs: Add utils to copy guix command.
From: |
Alex Kost |
Subject: |
06/24: emacs: Add utils to copy guix command. |
Date: |
Fri, 28 Aug 2015 20:06:32 +0000 |
alezost pushed a commit to branch wip-emacs-popup-ui
in repository guix.
commit 49772eea027aa0c030e8ff93e70eddef4d138012
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)
- branch wip-emacs-popup-ui created (now a7d4674), Alex Kost, 2015/08/28
- 01/24: emacs: Remove leftover internal variable., Alex Kost, 2015/08/28
- 02/24: emacs: Add 'guix-prettify' to 'guix' custom group., Alex Kost, 2015/08/28
- 06/24: emacs: Add utils to copy guix command.,
Alex Kost <=
- 03/24: emacs: Add and use 'guix-while-search'., Alex Kost, 2015/08/28
- 04/24: emacs: Add and use 'guix-concat-strings'., Alex Kost, 2015/08/28
- 05/24: emacs: Add utils to make symbol and string for guix command., Alex Kost, 2015/08/28
- 07/24: emacs: Add 'guix-any'., Alex Kost, 2015/08/28
- 08/24: emacs: Add 'guix-memoized-defalias' macro., Alex Kost, 2015/08/28
- 09/24: guix lint: Export checkers and <lint-checker> accessors., Alex Kost, 2015/08/28
- 10/24: emacs: Add 'guix-lint-checker-names'., Alex Kost, 2015/08/28
- 11/24: guix graph: Export node types and <node-type> accessors., Alex Kost, 2015/08/28
- 12/24: emacs: Add 'guix-graph-type-names'., Alex Kost, 2015/08/28
- 13/24: emacs: Add 'guix-package-names'., Alex Kost, 2015/08/28