aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-ui-generation.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-01-04 22:59:04 +0300
committerAlex Kost <alezost@gmail.com>2016-01-16 13:02:21 +0300
commit54c3c284d7f319d6db7c665c612fdbeefe81ae5f (patch)
treeda969d795667472a21ea87af0ea36cb86e11935c /emacs/guix-ui-generation.el
parent2df17bd0eeed1e29e64cf21ecec61413af19ba65 (diff)
downloadpatches-54c3c284d7f319d6db7c665c612fdbeefe81ae5f.tar
patches-54c3c284d7f319d6db7c665c612fdbeefe81ae5f.tar.gz
emacs: Replace 'generation-diff' search with 'profile-diff'.
* emacs/guix-main.scm (generation-package-specifications): Rename to... (profile-package-specifications): ... this. Take a single 'profile' argument. (generation-difference): Rename to... (profile-difference): ... this. Take profiles as arguments. (package/output-sexps): Adjust accordingly. * emacs/guix-ui-generation.el (guix-generation-list-profiles-to-compare): New procedure. (guix-generation-list-show-added-packages) (guix-generation-list-show-removed-packages): Use it. * emacs/guix-messages.el (guix-messages): Replace 'generation-diff' with 'profile-diff'. (guix-message-outputs-by-diff): Adjust accordingly.
Diffstat (limited to 'emacs/guix-ui-generation.el')
-rw-r--r--emacs/guix-ui-generation.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/emacs/guix-ui-generation.el b/emacs/guix-ui-generation.el
index 89a235a29c..752d8523b9 100644
--- a/emacs/guix-ui-generation.el
+++ b/emacs/guix-ui-generation.el
@@ -212,6 +212,11 @@ VAL is a boolean value."
(user-error "2 generations should be marked for comparing")
(sort numbers #'<))))
+(defun guix-generation-list-profiles-to-compare ()
+ "Return a sorted list of 2 marked generation profiles for comparing."
+ (mapcar #'guix-generation-current-packages-profile
+ (guix-generation-list-generations-to-compare)))
+
(defun guix-generation-list-show-added-packages ()
"List package outputs added to the latest marked generation.
If 2 generations are marked with \\[guix-list-mark], display
@@ -221,8 +226,8 @@ installed in the other one."
(guix-buffer-get-display-entries
'list 'output
(cl-list* (guix-ui-current-profile)
- 'generation-diff
- (reverse (guix-generation-list-generations-to-compare)))
+ 'profile-diff
+ (reverse (guix-generation-list-profiles-to-compare)))
'add))
(defun guix-generation-list-show-removed-packages ()
@@ -234,8 +239,8 @@ installed in the other one."
(guix-buffer-get-display-entries
'list 'output
(cl-list* (guix-ui-current-profile)
- 'generation-diff
- (guix-generation-list-generations-to-compare))
+ 'profile-diff
+ (guix-generation-list-profiles-to-compare))
'add))
(defun guix-generation-list-compare (diff-fun gen-fun)