aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-info.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-10-14 20:43:10 +0400
committerAlex Kost <alezost@gmail.com>2014-10-16 10:09:53 +0400
commit49d758d212d78976d6679125fa1731537c768526 (patch)
tree47f77d6ec5ad784a721b98e855768c0518a567a3 /emacs/guix-info.el
parent063b60be7b0de45630095cf22f097eaa1953f863 (diff)
downloadpatches-49d758d212d78976d6679125fa1731537c768526.tar
patches-49d758d212d78976d6679125fa1731537c768526.tar.gz
emacs: Support auto-updating after performing REPL operation.
* emacs/guix-backend.el (guix-operation-buffer): New variable. (guix-eval-in-repl): Use it. Add optional 'operation-buffer' argument. * emacs/guix-base.el (guix-update-after-operation): New variable. (guix-switch-to-buffer, guix-list-or-info-buffer-p, guix-buffers, guix-update-buffers-maybe): New procedures. (guix-set-buffer): Use 'guix-switch-to-buffer'. Add optional 'no-display' argument. (guix-process-package-actions, guix-delete-generations, guix-switch-to-generation): Add optional 'operation-buffer' argument. * emacs/guix-info.el (guix-package-info-insert-action-button, guix-generation-info-insert-number, guix-generation-info-insert-current): Adjust for using operation buffer. * emacs/guix-list.el (guix-list-execute-package-actions, guix-generation-list-switch, guix-generation-list-execute): Likewise.
Diffstat (limited to 'emacs/guix-info.el')
-rw-r--r--emacs/guix-info.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/emacs/guix-info.el b/emacs/guix-info.el
index 7a600907b1..dcd2ce2932 100644
--- a/emacs/guix-info.el
+++ b/emacs/guix-info.el
@@ -558,9 +558,9 @@ ENTRY is an alist with package info."
type-str
(lambda (btn)
(guix-process-package-actions
- (list (button-get btn 'action-type)
- (list (button-get btn 'id)
- (button-get btn 'output)))))
+ `((,(button-get btn 'action-type) (,(button-get btn 'id)
+ ,(button-get btn 'output))))
+ (current-buffer)))
(concat type-str " '" full-name "'")
'action-type type
'id (or (guix-get-key-val entry 'package-id)
@@ -639,7 +639,8 @@ ENTRY is an alist with package info."
(guix-info-insert-action-button
"Delete"
(lambda (btn)
- (guix-delete-generations (button-get btn 'number)))
+ (guix-delete-generations (list (button-get btn 'number))
+ (current-buffer)))
"Delete this generation"
'number number))
@@ -652,7 +653,8 @@ ENTRY is an alist with package info."
(guix-info-insert-action-button
"Switch"
(lambda (btn)
- (guix-switch-to-generation (button-get btn 'number)))
+ (guix-switch-to-generation (button-get btn 'number)
+ (current-buffer)))
"Switch to this generation (make it the current one)"
'number (guix-get-key-val entry 'number))))