summaryrefslogtreecommitdiff
path: root/emacs/guix-info.el
AgeCommit message (Expand)Author
2016-01-02emacs: Rename internal procedures....* emacs/guix-list.el (guix-list-get-param-title): Rename to... (guix-list-param-title): ... this. (guix-list-get-column-format): Rename to... (guix-list-format): ... this. (guix-list-get-displayed-params): Rename to... (guix-list-displayed-params): ... this. (guix-list-get-sort-key): Rename to... (guix-list-tabulated-sort-key): ... this. (guix-list-make-tabulated-vector): Rename to... (guix-list-tabulated-vector): ... this. (guix-list-get-list-format): Rename to... (guix-list-tabulated-format): ... this. (guix-list-get-tabulated-entries): Rename to... (guix-list-tabulated-entries): ... this. (guix-list-get-tabulated-entry): Rename to... (guix-list-tabulated-entry): ... this. * emacs/guix-info.el (guix-info-get-displayed-params): Rename to... (guix-info-displayed-params): ... this. * emacs/guix-base.el (guix-get-params-for-receiving): Adjust accordingly. (guix-get-name-spec): Rename to... (guix-package-name-specification): ... this. (guix-get-full-name): Merge this and... (guix-entry-to-specification): ... this into... (guix-package-entry->name-specification): ... this. (guix-get-installed-outputs): Rename to... (guix-package-installed-outputs): ... this. (guix-get-package-id-and-output-by-output-id): Rename to... (guix-package-id-and-output-by-output-id): ... this. Alex Kost
2016-01-02emacs: Add API for 'guix-entry'....* emacs/guix-info.el: Use new entry procedures. * emacs/guix-list.el: Likewise. * emacs/guix-base.el: Likewise. (guix-get-entry-by-id): Move and rename to ... * emacs/guix-entry.el (guix-entry-by-id): ...this. New file. (guix-entry-value, guix-entry-id, guix-entries-by-ids) (guix-replace-entry): New procedures. * emacs.am (ELFILES): Add new file. Alex Kost
2016-01-02emacs: Add 'guix-with-indent'....* emacs/guix-utils.el (guix-with-indent): New macro. (guix-memoized-font-lock-keywords): Rename to... (guix-utils-font-lock-keywords): ... this. Add it. * emacs/guix-info.el (guix-info-insert-entry-default): Use it. Alex Kost
2015-12-09emacs: info: Add 'guix-info-heading' face....* emacs/guix-info.el (guix-info-heading): New face. (guix-package-info-heading): Inherit it. Alex Kost
2015-12-06emacs: info: Show a message after copying button label....* emacs/guix-info.el (guix-info-button-copy-label): Use 'guix-copy-as-kill' to display a message with what was killed. Alex Kost
2015-09-15emacs: Add customization groups for faces....* emacs/guix.el (guix-faces): New custom group. * emacs/guix-base.el (guix-operation-option-key): Use it. (guix-define-buffer-type): Generate faces group. * emacs/guix-info.el: Adjust faces to use new groups. (guix-info-faces): New custom group. * emacs/guix-list.el: Likewise (guix-list-faces): New custom group. Alex Kost
2015-08-30emacs: Add and use alist accessors....* emacs/guix-utils.el (guix-define-alist-accessor): New macro. (guix-assq-value, guix-assoc-value): New functions. (guix-get-key-val): Remove. * emacs/guix-base.el: Replace 'guix-get-key-val' with 'guix-assq-value' everywhere. * emacs/guix-info.el: Likewise. * emacs/guix-list.el: Likewise. * emacs/guix-messages.el: Likewise. Alex Kost
2015-07-14emacs: Fill package heading in Info buffers....* emacs/guix-info.el (guix-package-info-fill-heading): New variable. (guix-package-info-insert-heading): Fill heading if needed. Co-authored-by: Alex Kost <alezost@gmail.com> Ludovic Courtès
2015-06-26emacs: Add 'guix-root-map'....* emacs/guix-base.el (guix-define-buffer-type): Move common key bindings from here... (guix-root-map): ... to here. New variable. * emacs/guix-info.el (guix-info-mode-map): Use it. * emacs/guix-list.el (guix-list-mode-map): Use it. * doc/emacs.texi (Emacs Keymaps): Document it. Alex Kost
2014-11-12emacs: Add "Source" field to 'guix-info' buffers....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. Alex Kost
2014-11-10emacs: Add 'guix-find-file'....* emacs/guix-utils.el (guix-find-file): New procedure. * emacs/guix-info.el (guix-file): Use it. Alex Kost
2014-11-10emacs: Add "c" key binding to copy a button link....* emacs/guix-info.el (guix-info-button-map): New variable. (guix-info-button-copy-label): New procedure. * doc/emacs.texi (Emacs Info buffer): Mention a "c" key binding. (Emacs Keymaps): Add 'guix-info-button-map'. Alex Kost
2014-11-02emacs: Add package info heading....Co-authored-by: Ludovic Courtès <ludo@gnu.org> * emacs/guix-info.el: (guix-package-info-heading): New face. (guix-package-info-synopsis): Modify face. (guix-info-insert-entry-default, guix-package-info-insert-heading, guix-package-info-insert-with-heading): New procedures. (guix-package-info-heading-params, guix-info-insert-package-function, guix-info-insert-installed-function, guix-info-insert-output-function, guix-info-insert-generation-function): New variables. Alex Kost
2014-10-18emacs: 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'. Alex Kost
2014-10-16emacs: Support auto-updating after performing REPL operation....* 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. Alex Kost
2014-10-13emacs: Add support for switching generations....* 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. Alex Kost
2014-10-13emacs: Add 'current' generation parameter....* 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. Alex Kost
2014-10-06emacs: Add support for deleting generations....* 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. Alex Kost
2014-09-28emacs: Use package/output type variables where needed....* 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'. Alex Kost
2014-09-28emacs: Support font-locking....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. Alex Kost
2014-09-24emacs: Add support for displaying outputs....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. Alex Kost
2014-09-24emacs: Rewrite scheme side in a functional manner....* 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. Alex Kost
2014-09-24emacs: Use general functions instead of generated ones....* 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. Alex Kost
2014-09-03Add Emacs user interface....* 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. Alex Kost