(put 'guix-define-buffer-type 'lisp-indent-function 'defun)
\f
-;;; Getting info about packages and generations
+;;; Getting and displaying info about packages and generations
+
+(defcustom guix-package-list-type 'output
+ "Define how to display packages in a list buffer.
+May be a symbol `package' or `output' (if `output', display each
+output on a separate line; if `package', display each package on
+a separate line)."
+ :type '(choice (const :tag "List of packages" package)
+ (const :tag "List of outputs" output))
+ :group 'guix)
+
+(defcustom guix-package-info-type 'package
+ "Define how to display packages in an info buffer.
+May be a symbol `package' or `output' (if `output', display each
+output separately; if `package', display outputs inside a package
+information)."
+ :type '(choice (const :tag "Display packages" package)
+ (const :tag "Display outputs" output))
+ :group 'guix)
(defun guix-get-entries (entry-type search-type search-vals
&optional params)
(guix-info-insert-action-button
"Packages"
(lambda (btn)
- (guix-get-show-entries 'list 'package 'generation
+ (guix-get-show-entries 'list guix-package-list-type 'generation
(button-get btn 'number)))
"Show installed packages for this generation"
'number number)
"Face used if a package is obsolete."
:group 'guix-package-list)
-(defcustom guix-package-list-type 'output
- "Define how to display packages in a list buffer.
-May be a symbol `package' or `output' (if `output', display each
-output on a separate line; if `package', display each package on
-a separate line)."
- :type '(choice (const :tag "List of packages" package)
- (const :tag "List of outputs" output))
- :group 'guix-package-list)
-
(defcustom guix-package-list-generation-marking-enabled nil
"If non-nil, allow putting marks in a list with 'generation packages'.
(upgrade . ?U)
(delete . ?D)))
-(defcustom guix-output-list-describe-type 'package
- "Define how to describe outputs in a list buffer.
-May be a symbol `package' or `output' (if `output', describe only
-marked outputs; if `package', describe all outputs of the marked
-packages)."
- :type '(choice (const :tag "Describe packages" package)
- (const :tag "Describe outputs" output))
- :group 'guix-output-list)
-
(let ((map guix-output-list-mode-map))
(define-key map (kbd "RET") 'guix-output-list-describe)
(define-key map (kbd "x") 'guix-output-list-execute)
"Describe outputs or packages marked with a general mark.
If no entries are marked, describe the current output or package.
With prefix (if ARG is non-nil), describe entries marked with any mark.
-Also see `guix-output-list-describe-type'."
+Also see `guix-package-info-type'."
(interactive "P")
- (if (eq guix-output-list-describe-type 'output)
+ (if (eq guix-package-info-type 'output)
(guix-list-describe arg)
(let* ((oids (or (apply #'guix-list-get-marked-id-list
(unless arg '(general)))
Results are displayed in the list buffer, unless a single package
is found and `guix-list-single-package' is nil."
- (let* ((list-params (guix-get-params-for-receiving
- 'list guix-package-list-type))
- (packages (guix-get-entries guix-package-list-type
- search-type search-vals
- list-params)))
+ (let ((packages (guix-get-entries guix-package-list-type
+ search-type search-vals
+ (guix-get-params-for-receiving
+ 'list guix-package-list-type))))
(if (or guix-list-single-package
(cdr packages))
(guix-set-buffer packages 'list guix-package-list-type
search-type search-vals)
- (let* ((info-params (guix-get-params-for-receiving
- 'info guix-package-list-type))
- (packages (if (equal list-params info-params)
- packages
- ;; If we don't have required info, we should
- ;; receive it again
- (guix-get-entries guix-package-list-type
- search-type search-vals
- info-params))))
- (guix-set-buffer packages 'info guix-package-list-type
+ (let ((packages (guix-get-entries guix-package-info-type
+ search-type search-vals
+ (guix-get-params-for-receiving
+ 'info guix-package-info-type))))
+ (guix-set-buffer packages 'info guix-package-info-type
search-type search-vals)))))
(defun guix-get-show-generations (search-type &rest search-vals)