2014-08-27 12:44:17 +00:00
|
|
|
;;; guix.el --- Interface for GNU Guix package manager
|
|
|
|
|
2015-08-17 09:05:05 +00:00
|
|
|
;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;; Package-Requires: ((geiser "0.3"))
|
|
|
|
;; Keywords: tools
|
|
|
|
|
|
|
|
;; This file is part of GNU Guix.
|
|
|
|
|
|
|
|
;; GNU Guix is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
;; GNU Guix is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; This package provides an interface for searching, listing and getting
|
|
|
|
;; information about Guix packages and generations; and for
|
|
|
|
;; installing/upgrading/removing packages.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
2014-09-17 13:52:08 +00:00
|
|
|
(require 'guix-base)
|
2014-08-27 12:44:17 +00:00
|
|
|
(require 'guix-list)
|
|
|
|
(require 'guix-info)
|
2014-10-16 17:35:47 +00:00
|
|
|
(require 'guix-utils)
|
2015-08-17 09:05:05 +00:00
|
|
|
(require 'guix-read)
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
(defgroup guix nil
|
|
|
|
"Interface for Guix package manager."
|
|
|
|
:prefix "guix-"
|
|
|
|
:group 'external)
|
|
|
|
|
|
|
|
(defcustom guix-list-single-package nil
|
|
|
|
"If non-nil, list a package even if it is the only matching result.
|
|
|
|
If nil, show a single package in the info buffer."
|
|
|
|
:type 'boolean
|
|
|
|
:group 'guix)
|
|
|
|
|
|
|
|
(defvar guix-search-params '(name synopsis description)
|
|
|
|
"Default list of package parameters for searching by regexp.")
|
|
|
|
|
|
|
|
(defvar guix-search-history nil
|
|
|
|
"A history of minibuffer prompts.")
|
|
|
|
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-get-show-packages (profile search-type &rest search-vals)
|
2014-08-27 12:44:17 +00:00
|
|
|
"Search for packages and show results.
|
|
|
|
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
|
2014-08-27 12:44:17 +00:00
|
|
|
See `guix-get-entries' for the meaning of SEARCH-TYPE and
|
|
|
|
SEARCH-VALS.
|
|
|
|
|
|
|
|
Results are displayed in the list buffer, unless a single package
|
|
|
|
is found and `guix-list-single-package' is nil."
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(or profile (setq profile guix-current-profile))
|
|
|
|
(let ((packages (guix-get-entries profile guix-package-list-type
|
2014-09-28 05:32:41 +00:00
|
|
|
search-type search-vals
|
|
|
|
(guix-get-params-for-receiving
|
|
|
|
'list guix-package-list-type))))
|
2014-08-27 12:44:17 +00:00
|
|
|
(if (or guix-list-single-package
|
|
|
|
(cdr packages))
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(guix-set-buffer profile packages 'list guix-package-list-type
|
2014-09-17 13:52:08 +00:00
|
|
|
search-type search-vals)
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(let ((packages (guix-get-entries profile guix-package-info-type
|
2014-09-28 05:32:41 +00:00
|
|
|
search-type search-vals
|
|
|
|
(guix-get-params-for-receiving
|
|
|
|
'info guix-package-info-type))))
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(guix-set-buffer profile packages 'info guix-package-info-type
|
2014-09-17 13:52:08 +00:00
|
|
|
search-type search-vals)))))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-get-show-generations (profile search-type &rest search-vals)
|
|
|
|
"Search for generations and show results.
|
|
|
|
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
|
|
|
|
See `guix-get-entries' for the meaning of SEARCH-TYPE and
|
|
|
|
SEARCH-VALS."
|
2014-09-17 13:52:08 +00:00
|
|
|
(apply #'guix-get-show-entries
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(or profile guix-current-profile)
|
2014-09-17 13:52:08 +00:00
|
|
|
'list 'generation search-type search-vals))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-search-by-name (name &optional profile)
|
2014-08-27 12:44:17 +00:00
|
|
|
"Search for Guix packages by NAME.
|
|
|
|
NAME is a string with name specification. It may optionally contain
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
a version number. Examples: \"guile\", \"guile-2.0.11\".
|
|
|
|
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
2014-08-27 12:44:17 +00:00
|
|
|
(interactive
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(list (read-string "Package name: " nil 'guix-search-history)
|
|
|
|
(and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-packages profile 'name name))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-search-by-regexp (regexp &optional params profile)
|
2014-08-27 12:44:17 +00:00
|
|
|
"Search for Guix packages by REGEXP.
|
|
|
|
PARAMS are package parameters that should be searched.
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
If PARAMS are not specified, use `guix-search-params'.
|
|
|
|
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
|
|
|
(interactive
|
|
|
|
(list (read-regexp "Regexp: " nil 'guix-search-history)
|
|
|
|
nil
|
|
|
|
(and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-packages profile 'regexp regexp
|
|
|
|
(or params guix-search-params)))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun guix-installed-packages (&optional profile)
|
|
|
|
"Display information about installed Guix packages.
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
2014-08-27 12:44:17 +00:00
|
|
|
(interactive
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(list (and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-packages profile 'installed))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-obsolete-packages (&optional profile)
|
|
|
|
"Display information about obsolete Guix packages.
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
|
|
|
(interactive
|
|
|
|
(list (and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-packages profile 'obsolete))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-all-available-packages (&optional profile)
|
|
|
|
"Display information about all available Guix packages.
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
|
|
|
(interactive
|
|
|
|
(list (and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-packages profile 'all-available))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-newest-available-packages (&optional profile)
|
|
|
|
"Display information about the newest available Guix packages.
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
|
|
|
(interactive
|
|
|
|
(list (and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-packages profile 'newest-available))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-generations (&optional profile)
|
|
|
|
"Display information about all generations.
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
|
|
|
(interactive
|
|
|
|
(list (and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-generations profile 'all))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-last-generations (number &optional profile)
|
2014-08-27 12:44:17 +00:00
|
|
|
"Display information about last NUMBER generations.
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
|
|
|
(interactive
|
|
|
|
(list (read-number "The number of last generations: ")
|
|
|
|
(and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-generations profile 'last number))
|
2014-08-27 12:44:17 +00:00
|
|
|
|
2014-10-16 17:35:47 +00:00
|
|
|
;;;###autoload
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(defun guix-generations-by-time (from to &optional profile)
|
2014-10-16 17:35:47 +00:00
|
|
|
"Display information about generations created between FROM and TO.
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
FROM and TO should be time values.
|
|
|
|
If PROFILE is nil, use `guix-current-profile'.
|
|
|
|
Interactively with prefix, prompt for PROFILE."
|
2014-10-16 17:35:47 +00:00
|
|
|
(interactive
|
|
|
|
(list (guix-read-date "Find generations (from): ")
|
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
2014-10-17 18:21:32 +00:00
|
|
|
(guix-read-date "Find generations (to): ")
|
|
|
|
(and current-prefix-arg
|
|
|
|
(guix-profile-prompt))))
|
|
|
|
(guix-get-show-generations profile 'time
|
2014-10-16 17:35:47 +00:00
|
|
|
(float-time from)
|
|
|
|
(float-time to)))
|
|
|
|
|
2015-08-17 09:05:05 +00:00
|
|
|
;;;###autoload
|
|
|
|
(defun guix-edit (id-or-name)
|
|
|
|
"Edit (go to location of) package with ID-OR-NAME."
|
|
|
|
(interactive (list (guix-read-package-name)))
|
|
|
|
(let ((loc (guix-package-location id-or-name)))
|
|
|
|
(if loc
|
|
|
|
(guix-find-location loc)
|
|
|
|
(message "Couldn't find package location."))))
|
|
|
|
|
2014-08-27 12:44:17 +00:00
|
|
|
(provide 'guix)
|
|
|
|
|
|
|
|
;;; guix.el ends here
|