aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-utils.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-10-16 21:35:47 +0400
committerAlex Kost <alezost@gmail.com>2014-10-17 10:56:27 +0400
commit189cea2782df67ea048a3982be69c8b1ff9762e9 (patch)
treef353da6c0b24a43cfad0da4635e3deaa7f7b1d71 /emacs/guix-utils.el
parent347e17b47450a0fcc120c29e8b307e87b9182c21 (diff)
downloadpatches-189cea2782df67ea048a3982be69c8b1ff9762e9.tar
patches-189cea2782df67ea048a3982be69c8b1ff9762e9.tar.gz
emacs: Add 'guix-generations-by-time' command.
* emacs/guix-main.scm (find-generations): Add finding generations by time. * emacs/guix-utils.el (guix-read-date): New procedure. * emacs/guix-base.el (guix-messages): Add new messages. * emacs/guix.el (guix-generations-by-time): New command. * doc/emacs.texi (emacs Commands): Document it.
Diffstat (limited to 'emacs/guix-utils.el')
-rw-r--r--emacs/guix-utils.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el
index f99c2ba884..878781489e 100644
--- a/emacs/guix-utils.el
+++ b/emacs/guix-utils.el
@@ -138,6 +138,14 @@ split it into several short lines."
hist def inherit-input-method)
:test #'string=))
+(declare-function org-read-date "org" t)
+
+(defun guix-read-date (prompt)
+ "Prompt for a date or time using `org-read-date'.
+Return time value."
+ (require 'org)
+ (org-read-date nil t nil prompt))
+
(defun guix-get-key-val (alist &rest keys)
"Return value from ALIST by KEYS.
ALIST is alist of alists of alists ... which can be consecutively