summary refs log tree commit diff
path: root/emacs/guix.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.el
parent347e17b47450a0fcc120c29e8b307e87b9182c21 (diff)
downloadguix-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.el')
-rw-r--r--emacs/guix.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs/guix.el b/emacs/guix.el
index a1425161c4..b91a88dc14 100644
--- a/emacs/guix.el
+++ b/emacs/guix.el
@@ -31,6 +31,7 @@
 (require 'guix-base)
 (require 'guix-list)
 (require 'guix-info)
+(require 'guix-utils)
 
 (defgroup guix nil
   "Interface for Guix package manager."
@@ -134,6 +135,17 @@ Interactively, NUMBER is defined by a numeric prefix."
       (guix-get-show-generations 'last number)
     (guix-get-show-generations 'all)))
 
+;;;###autoload
+(defun guix-generations-by-time (from to)
+  "Display information about generations created between FROM and TO.
+FROM and TO should be time values."
+  (interactive
+   (list (guix-read-date "Find generations (from): ")
+         (guix-read-date "Find generations (to): ")))
+  (guix-get-show-generations 'time
+                             (float-time from)
+                             (float-time to)))
+
 (provide 'guix)
 
 ;;; guix.el ends here