aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-base.el
Commit message (Collapse)AuthorAge
* emacs: Move profiles code to "guix-profiles.el.in".Alex Kost2014-12-02
| | | | | | | | | | * emacs/guix-base.el (guix-user-profile, guix-default-profile, guix-current-profile, guix-profile-prompt, guix-set-current-profile): Move to... * emacs/guix-init.el.in (guix-default-profile): Move to... * emacs/guix-profiles.el.in: ... here. New file. * configure.ac (AC_CONFIG_FILES): Add "emacs/guix-profiles.el". * emacs.am (nodist_lisp_DATA): Likewise.
* emacs: Add "Source" field to 'guix-info' buffers.Alex Kost2014-11-12
| | | | | | | | | | | | | | | | | | | | | | Suggested by Ludovic Courtès. * emacs/guix-info.el (guix-info-insert-methods, guix-info-displayed-params): Add 'source' parameter. (guix-package-info-source): New face. (guix-package-source): New button type. (guix-package-info-auto-find-source, guix-package-info-auto-download-source, guix-package-info-download-buffer): New variables. (guix-package-info-show-source, guix-package-info-insert-source-url, guix-package-info-insert-source, guix-package-info-download-source, guix-package-info-redisplay-after-download): New procedures. * emacs/guix-base.el (guix-param-titles): Add 'source' parameter. (guix-operation-prompt): Add 'prompt' argument. (guix-after-source-download-hook): New variable. (guix-package-source-path, guix-package-source-build-derivation): New procedures. * emacs/guix-main.scm (%package-param-alist): Add 'source' parameter. (package-source-names, package-source-derivation->store-path, package-source-path, package-source-build-derivation): New procedures.
* emacs: Improve 'guix-redisplay-buffer'.Alex Kost2014-11-10
| | | | | * emacs/guix-base.el (guix-redisplay-buffer): Allow to display new entries. Restore point position.
* emacs: Restore mode-line after operation prompt.Alex Kost2014-11-10
| | | | | * emacs/guix-base.el (guix-operation-prompt): Restore 'mode-line-format' after prompting.
* emacs: Add interface for comparing generations.Alex Kost2014-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Ludovic Courtès. * doc/emacs.texi (Emacs List buffer): Document new key bindings. * emacs/guix-base.el (guix-generation-packages-buffer-name-function, guix-generation-packages-update-buffer, guix-output-name-width): New variables. (guix-generation-file, guix-manifest-file, guix-generation-packages, guix-generation-packages-buffer-name-default, guix-generation-packages-buffer-name-long, guix-generation-packages-buffer-name, guix-generation-packages-buffer, guix-generation-insert-package, guix-generation-insert-packages, guix-profile-generation-manifest-file, guix-profile-generation-packages-buffer): New procedures. * emacs/guix-list.el: Add key bindings for comparing generations. (guix-generation-list-generations-to-compare, guix-generation-list-show-added-packages, guix-generation-list-show-removed-packages, guix-generation-list-compare, guix-generation-list-ediff-manifests, guix-generation-list-diff-manifests, guix-generation-list-ediff-packages, guix-generation-list-diff-packages, guix-generation-list-ediff, guix-generation-list-diff): New procedures. * emacs/guix-messages.el (guix-messages): Add 'generation-diff' search type. (guix-message-outputs-by-diff): New procedure. * emacs/guix-utils.el (guix-diff-switches): New variable. (guix-diff): New procedure. * emacs/guix-main.scm (package/output-sexps): Handle 'generation-diff' search type. (manifest-entry->package-specification, manifest-entries->package-specifications, generation-package-specifications, generation-package-specifications+paths, generation-difference): New procedures.
* emacs: Improve minibuffer messages.Alex Kost2014-11-04
| | | | | | | | | | | | * emacs/guix-base.el (guix-messages, guix-result-message): Move to 'guix-messages.el'. (guix-set-buffer, guix-history-call, guix-redisplay-buffer): Adjust for the modified 'guix-result-message'. * emacs/guix-messages.el: New file. (guix-redisplay-buffer): Add 'profile' argument. (guix-message-string-name, guix-message-string-entry-type, guix-message-string-entries, guix-message-packages-by-name, guix-message-generations-by-time): New procedures.
* emacs: Add 'guix-pull' command.Alex Kost2014-10-27
| | | | | | | | | * emacs/guix-base.el (guix-pull): New command. (guix-update-after-pull, guix-after-pull-hook): New variables. (guix-restart-repl-after-pull, guix-update-buffers-maybe-after-pull): New procedures. * emacs/guix-main.scm: Use (guix scripts pull) module. * doc/emacs.texi (Emacs Commands): Document 'guix-pull' command.
* emacs: Improve buffer procedures.Alex Kost2014-10-27
| | | | | | | | | | * emacs/guix-base.el (guix-list-or-info-buffer-p): Delete. Replace with... (guix-buffer-p): ... this. New procedure. (guix-buffers): Use it. Add 'modes' argument. (guix-update-buffer): New procedure. (guix-update-buffers-maybe): Rename to ... (guix-update-buffers-maybe-after-operation): this. Use 'guix-update-buffer'.
* emacs: Handle updating by ID after REPL restart.Alex Kost2014-10-27
| | | | | | * emacs/guix-base.el (guix-entry-to-specification, guix-entries-to-specifications): New procedures. (guix-revert-buffer): Search by name if searching by ID gives no results.
* emacs: Improve interface for working with multiple profiles.Alex Kost2014-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* emacs: Add 'guix-generations-by-time' command.Alex Kost2014-10-17
| | | | | | | | * emacs/guix-main.scm (find-generations): Add finding generations by time. * emacs/guix-utils.el (guix-read-date): New procedure. * emacs/guix-base.el (guix-messages): Add new messages. * emacs/guix.el (guix-generations-by-time): New command. * doc/emacs.texi (emacs Commands): Document it.
* emacs: Support auto-updating after performing REPL operation.Alex Kost2014-10-16
| | | | | | | | | | | | | | | | | * 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.
* emacs: Add support for switching generations.Alex Kost2014-10-13
| | | | | | | | | * emacs/guix-base.el (guix-switch-to-generation): New procedure. * emacs/guix-info.el (guix-generation-info-insert-current): Insert button for switching to generation. * emacs/guix-list.el (guix-generation-list-switch): New procedure. * doc/emacs.texi (emacs List buffer, emacs Info buffer): Document switching generations.
* emacs: Add 'current' generation parameter.Alex Kost2014-10-13
| | | | | | | | | | * emacs/guix-main.scm (generation-param-alist): Add 'current' parameter. * emacs/guix-base.el (guix-param-titles): Add title for 'current' parameter. * emacs/guix-info.el: Display 'current' parameter. (guix-generation-info-current, guix-generation-info-not-current): New faces. (guix-generation-info-insert-current): New procedure. * emacs/guix-list.el: Display 'current' column. (guix-generation-list-get-current): New procedure.
* emacs: Add support for deleting generations.Alex Kost2014-10-06
| | | | | | | | | * doc/emacs.texi (emacs List buffer): Mention new key bindings. * emacs/guix-base.el (guix-delete-generations): New procedure. * emacs/guix-info.el (guix-generation-info-insert-number): Use it. * emacs/guix-list.el (guix-generation-list-mark-delete, guix-generation-list-execute): New procedures. * emacs/guix-main.scm (delete-generations*): New procedure.
* emacs: Add support for modifying options during operation confirmation.Alex Kost2014-10-02
| | | | | | | | | | | * emacs/guix-base.el (guix-operation-option-key): New face. (guix-operation-option-true-string, guix-operation-option-false-string, guix-operation-option-separator, guix-operation-options): New variables. (guix-operation-option-by-key, guix-operation-option-key, guix-operation-option-name, guix-operation-option-variable, guix-operation-option-value, guix-operation-option-string-value, guix-operation-prompt, guix-operation-set-mode-line): New procedures. (guix-continue-package-operation-p): Use 'guix-operation-prompt'.
* emacs: Use package/output type variables where needed.Alex Kost2014-09-28
| | | | | | | | | | * emacs/guix-list.el (guix-package-list-type, guix-output-list-describe-type): Move to... * emacs/guix-base.el: ... here. Rename 'guix-output-list-describe-type' to 'guix-package-info-type'. * emacs/guix-info.el (guix-generation-info-insert-number): Use 'guix-package-list-type'. * emacs/guix.el (guix-get-show-packages): Use 'guix-package-info-type'.
* emacs: Support font-locking.Alex Kost2014-09-28
| | | | | | | | | | | | | | | | | | | Avoid breaking highlighting after adding new font-lock keywords. * emacs/guix-base.el (guix-insert-package-strings): Use 'propertize' instead of 'guix-get-string'. * emacs/guix-info.el (guix, guix-action, guix-file, guix-url, guix-package-location, guix-package-name): New button types. (guix-info-insert-action-button, guix-info-insert-file-path, guix-info-insert-url, guix-package-info-insert-location, guix-package-info-insert-full-names, guix-package-info-insert-non-unique-text): Adjust for 'guix-insert-button' and button types. (guix-package-info-name-button): New face. (guix-package-info-define-insert-inputs): Use it. Add new button types. (guix-package-info-insert-full-name): Remove. * emacs/guix-utils.el (guix-get-string): Replace 'face' with 'font-lock-face'. (guix-insert-button): Adjust for using button types.
* emacs: Add support for displaying outputs.Alex Kost2014-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Taylan Ulrich Bayirli/Kammer and Ludovic Courtès. * emacs/guix-base.el (guix-param-titles): Add output titles. (guix-messages): Add output messages. (guix-get-package-id-and-output-by-output-id): New procedure. (guix-define-buffer-type): Add ':buffer-name' key. * emacs/guix-info.el: Add "output-info" buffer type. (guix-info-insert-methods): Add output methods. (guix-info-displayed-params): Add output params. (guix-output-info-insert-version, guix-output-info-insert-output): New procedures. * emacs/guix-list.el: Add "output-list" buffer type. (guix-list-column-format): Add output formats. (guix-list-column-value-methods): Add output methods. (guix-package-list-type): New variable. (guix-generation-list-show-packages): Use it. (guix-package-list-marking-check): Use 'guix-output-list-mode'. (guix-list-mark-package-upgrades): New procedure. (guix-package-list-mark-upgrades): Use it. (guix-list-execute-package-actions): New procedure. (guix-package-list-execute): Use it. (guix-list-describe-maybe): New procedure. (guix-list-describe): Use it. (guix-output-list-mark-install, guix-output-list-mark-delete, guix-output-list-mark-upgrade, guix-output-list-mark-upgrades, guix-output-list-execute, guix-output-list-make-action, guix-output-list-describe): New procedures. (guix-output-list-describe-type): New variable. * emacs/guix.el (guix-get-show-packages): Use 'guix-package-list-type'. * doc/emacs.texi (emacs Commands): Mention 'guix-package-list-type'. (emacs List buffer): Adjust accordingly. (emacs Info buffer): Likewise. (emacs Buffer Names): New node. (emacs Keymaps): Add keymaps for output buffers.
* emacs: Rewrite scheme side in a functional manner.Alex Kost2014-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emacs/guix-main.scm: Rewrite in a functional way. Add support for output entries. (%current-manifest, %current-manifest-entries-table, set-current-manifest-maybe!): Replace with... (manifest-entries->hash-table, manifest->hash-table): ... this. (manifest-entries-by-name+version): Replace with... (manifest-entries-by-name): ... this. (fold-manifest-entries): Rename to... (fold-manifest-by-name): ... this. (package-installed-param-alist): Rename to... (%manifest-entry-param-alist): ... this. (package-param-alist): Rename to... (%package-param-alist): this. (manifest-entry->installed-entry): Rename to... (manifest-entry->sexp): ... this. (manifest-entries->installed-entries): Rename to... (manifest-entries->sexps): ... this. (matching-generation-entries): Replace with... (matching-generations): ... this. (last-generation-entries): Replace with... (last-generations): ... this. (get-entries): Rename to... (entries): ... this. (installed-entries-by-name+version, installed-entries-by-package, matching-package-entries, fold-object, package-entries-by-name+version, package-entries-by-spec, package-entries-by-regexp, package-entries-by-ids, newest-available-package-entries, all-available-package-entries, manifest-package-entries, installed-package-entries, generation-package-entries, obsolete-package-entries, all-generation-entries, generation-entries-by-ids, profile-generations, %package-entries-functions, %generation-entries-functions): Remove. (manifest=?, manifest-entry->name+version+output, manifest-entry-by-output, list-maybe, matching-packages, filter-packages-by-output, packages-by-name, manifest-entry->packages, all-available-packages, newest-available-packages, specification->package-pattern, specification->output-pattern, id->package-pattern, id->output-pattern, specifications->package-patterns, specifications->output-patterns, ids->package-patterns, ids->output-patterns, manifest-patterns-result, obsolete-package-patterns, obsolete-output-patterns, manifest-package-patterns, manifest-output-patterns, obsolete-package-sexp, package-pattern-transformer, output-pattern-transformer, entry-type-error, search-type-error, pattern-transformer, patterns-maker, package/output-sexps, find-generations, generation-sexps): New procedures. (%pattern-transformers, %patterns-makers): New variables. * emacs/guix-base.el (guix-continue-package-operation-p): Adjust accordingly. * emacs/guix-info.el (guix-package-info-insert-action-button): Likewise.
* emacs: Use general functions instead of generated ones.Alex Kost2014-09-24
| | | | | | | | | | | | | | | | | | | | | * emacs/guix-base.el: Add and use general functions instead of specialized functions generated by 'guix-define-buffer-type' macro. (guix-buffer-type, guix-entry-type): New variables. (guix-set-vars): Add new variables. (guix-get-show-entries, guix-show-entries, guix-set-buffer) (guix-history-call, guix-make-history-item) (guix-get-params-for-receiving, guix-revert-buffer) (guix-redisplay-buffer): New functions. (guix-define-buffer-type): Do not generate specialized functions. * emacs/guix-info.el (guix-package-info-insert-full-names): Use 'guix-get-show-entries'. (guix-generation-info-insert-number): Likewise. * emacs/guix-list.el (guix-list-describe): New function. (guix-list-define-entry-type): Do not generate specialized one. (guix-generation-list-show-packages): Use 'guix-get-show-entries'. * emacs/guix.el (guix-show-generations-function): Remove. (guix-get-show-packages): Use new functions. (guix-get-show-generations): Likewise.
* Add Emacs user interface.Alex Kost2014-09-03
* configure.ac (emacsuidir): New variable. (AC_CONFIG_FILES): Add 'emacs/guix-init.el', 'emacs/guix-helper.scm'. * Makefile.am: Include 'emacs.am'. * emacs.am: New file. * doc/emacs.texi: New file. * doc/guix.texi: Include 'emacs.texi'. * emacs/guix-backend.el: New file. * emacs/guix-base.el: New file. * emacs/guix-helper.scm.in: New file. * emacs/guix-history.el: New file. * emacs/guix-info.el: New file. * emacs/guix-init.el.in: New file. * emacs/guix-list.el: New file. * emacs/guix-main.scm: New file. * emacs/guix-utils.el: New file. * emacs/guix.el: New file.