[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
35/35: emacs: Add "B" key to display latest builds.
From: |
Alex Kost |
Subject: |
35/35: emacs: Add "B" key to display latest builds. |
Date: |
Fri, 11 Dec 2015 11:42:45 +0000 |
alezost pushed a commit to branch wip-refactor-emacs-ui
in repository guix.
commit e3967626098f28dd7ddff53463aff246a4eef1fb
Author: Alex Kost <address@hidden>
Date: Fri Dec 11 14:09:27 2015 +0300
emacs: Add "B" key to display latest builds.
* emacs/guix-ui-package.el (guix-package-list-latest-builds): New
procedure.
(guix-package-list-mode-map): Bind "B" key to it.
(guix-output-list-mode-map): Likewise.
---
emacs/guix-ui-package.el | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index c2bb241..14a9a6e 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -34,6 +34,7 @@
(require 'guix-guile)
(require 'guix-entry)
(require 'guix-utils)
+(require 'guix-hydra-build)
(defgroup guix-package nil
"Interface for displaying packages and outputs."
@@ -548,6 +549,7 @@ This function is used to hide a \"Download\" button if
needed."
(delete . ?D)))
(let ((map guix-package-list-mode-map))
+ (define-key map (kbd "B") 'guix-package-list-latest-builds)
(define-key map (kbd "e") 'guix-package-list-edit)
(define-key map (kbd "x") 'guix-package-list-execute)
(define-key map (kbd "i") 'guix-package-list-mark-install)
@@ -722,6 +724,18 @@ The specification is suitable for
`guix-process-package-actions'."
(interactive)
(guix-edit (guix-list-current-id)))
+(defun guix-package-list-latest-builds (number &rest args)
+ "Display latest NUMBER of Hydra builds of the current package.
+Interactively, prompt for NUMBER. With prefix argument, prompt
+for all ARGS."
+ (interactive
+ (let ((entry (guix-list-current-entry)))
+ (guix-hydra-build-latest-prompt-args
+ :job (guix-package-name-specification
+ (guix-entry-value entry 'name)
+ (guix-entry-value entry 'version)))))
+ (apply #'guix-hydra-latest-builds number args))
+
;;; Output 'info'
@@ -787,6 +801,7 @@ The specification is suitable for
`guix-process-package-actions'."
(delete . ?D)))
(let ((map guix-output-list-mode-map))
+ (define-key map (kbd "B") 'guix-package-list-latest-builds)
(define-key map (kbd "e") 'guix-output-list-edit)
(define-key map (kbd "x") 'guix-output-list-execute)
(define-key map (kbd "i") 'guix-output-list-mark-install)
- 22/35: emacs: Generalize buffer redisplaying., (continued)
- 22/35: emacs: Generalize buffer redisplaying., Alex Kost, 2015/12/11
- 27/35: emacs: info: Get rid of syntactic fontification., Alex Kost, 2015/12/11
- 18/35: emacs: info: Split 'guix-info-format' variable., Alex Kost, 2015/12/11
- 17/35: emacs: Factorize macros for defining interfaces., Alex Kost, 2015/12/11
- 29/35: emacs: Reorganize 'readers' code., Alex Kost, 2015/12/11
- 31/35: emacs: Add 'list-single' variables., Alex Kost, 2015/12/11
- 33/35: emacs: Return nil instead of "" in completing readers., Alex Kost, 2015/12/11
- 26/35: emacs: Generalize buffer naming., Alex Kost, 2015/12/11
- 32/35: emacs: Add 'guix-list-get-display-entries'., Alex Kost, 2015/12/11
- 16/35: emacs: info: Generalize inserting and formatting., Alex Kost, 2015/12/11
- 35/35: emacs: Add "B" key to display latest builds.,
Alex Kost <=
- 34/35: emacs: Add Hydra interface., Alex Kost, 2015/12/11
- 28/35: emacs: Generalize buffer interface., Alex Kost, 2015/12/11
- 30/35: emacs: Reorganize package/generation UI code., Alex Kost, 2015/12/11