[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
37/37: emacs: Use "B" key to display latest builds in package list.
From: |
Alex Kost |
Subject: |
37/37: emacs: Use "B" key to display latest builds in package list. |
Date: |
Fri, 18 Dec 2015 18:51:36 +0000 |
alezost pushed a commit to branch wip-refactor-emacs-ui
in repository guix.
commit c787c7bdeb99bf4f45429c99c9eb93b300e8ec7c
Author: Alex Kost <address@hidden>
Date: Fri Dec 11 14:09:27 2015 +0300
emacs: Use "B" key to display latest builds in package list.
* 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.
* doc/emacs.texi (Emacs List buffer): Document it.
---
doc/emacs.texi | 2 ++
emacs/guix-ui-package.el | 15 +++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/doc/emacs.texi b/doc/emacs.texi
index 1096199..ae55274 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -288,6 +288,8 @@ similar to @command{guix edit} command (@pxref{Invoking
guix edit}), but
for opening a package recipe in the current Emacs instance.
@item x
Execute actions on the marked packages.
address@hidden B
+Display latest builds of the current package (@pxref{Emacs Hydra}).
@end table
A ``generation-list'' buffer additionally provides the following
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 9f45fc1..6525fa5 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)
(guix-ui-define-entry-type package)
(guix-ui-define-entry-type output)
@@ -547,6 +548,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)
@@ -721,6 +723,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'
@@ -786,6 +800,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)
- 21/37: emacs: Split 'guix-root-map' keymap., (continued)
- 21/37: emacs: Split 'guix-root-map' keymap., Alex Kost, 2015/12/18
- 22/37: emacs: Generalize buffer redisplaying., Alex Kost, 2015/12/18
- 18/37: emacs: info: Split 'guix-info-format' variable., Alex Kost, 2015/12/18
- 23/37: emacs: Generalize buffer reverting., Alex Kost, 2015/12/18
- 27/37: emacs: info: Get rid of syntactic fontification., Alex Kost, 2015/12/18
- 17/37: emacs: Factorize macros for defining interfaces., Alex Kost, 2015/12/18
- 31/37: emacs: Add 'list-single' variables., Alex Kost, 2015/12/18
- 29/37: emacs: Reorganize 'readers' code., Alex Kost, 2015/12/18
- 32/37: emacs: Add 'guix-list-get-display-entries'., Alex Kost, 2015/12/18
- 33/37: emacs: Return nil instead of "" in completing readers., Alex Kost, 2015/12/18
- 37/37: emacs: Use "B" key to display latest builds in package list.,
Alex Kost <=
- 26/37: emacs: Generalize buffer naming., Alex Kost, 2015/12/18
- 35/37: emacs: Add 'guix-ui-read-profile'., Alex Kost, 2015/12/18
- 34/37: emacs: Add hierarchy of customization groups., Alex Kost, 2015/12/18
- 16/37: emacs: info: Generalize inserting and formatting., Alex Kost, 2015/12/18
- 36/37: emacs: Add Hydra interface., Alex Kost, 2015/12/18
- 28/37: emacs: Generalize buffer interface., Alex Kost, 2015/12/18
- 30/37: emacs: Reorganize package/generation UI code., Alex Kost, 2015/12/18