summaryrefslogtreecommitdiff
path: root/emacs/guix-info.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/guix-info.el')
-rw-r--r--emacs/guix-info.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/emacs/guix-info.el b/emacs/guix-info.el
index fc1b585414..7a600907b1 100644
--- a/emacs/guix-info.el
+++ b/emacs/guix-info.el
@@ -647,7 +647,14 @@ ENTRY is an alist with package info."
"Insert boolean value VAL showing whether this generation is current."
(if val
(guix-info-insert-val-default "Yes" 'guix-generation-info-current)
- (guix-info-insert-val-default "No" 'guix-generation-info-not-current)))
+ (guix-info-insert-val-default "No" 'guix-generation-info-not-current)
+ (guix-info-insert-indent)
+ (guix-info-insert-action-button
+ "Switch"
+ (lambda (btn)
+ (guix-switch-to-generation (button-get btn 'number)))
+ "Switch to this generation (make it the current one)"
+ 'number (guix-get-key-val entry 'number))))
(provide 'guix-info)