summaryrefslogtreecommitdiff
path: root/emacs/guix-utils.el
AgeCommit message (Collapse)Author
2016-01-02emacs: Add Hydra interface.Alex Kost
* emacs/guix-utils.el (guix-hexify, guix-number->bool): New procedures. (guix-while-null): New macro. * emacs/guix-hydra.el: New file. * emacs/guix-hydra-build.el: New file. * emacs/guix-hydra-jobset.el: New file. * emacs.am (ELFILES): Add them. * doc/emacs.texi (Emacs Hydra): New node. (Emacs Interface): Add it. * doc/guix.texi (Top): Add it. (Substitutes): Mention Emacs interface.
2016-01-02emacs: Return nil instead of "" in completing readers.Alex Kost
* emacs/guix-utils.el (guix-completing-read): New procedure. (guix-define-readers): Use it.
2016-01-02emacs: Reorganize 'readers' code.Alex Kost
* emacs/guix-base.el (guix-graph-type-names, guix-refresh-updater-names) (guix-lint-checker-names, guix-package-names): Move to... * emacs/guix-read.el: ... here. (guix-read-file-name, guix-define-reader, guix-define-readers): Move to... * emacs/guix-utils.el: ... here.
2016-01-02emacs: info: Generalize inserting and formatting.Alex Kost
* emacs/guix-info.el: Use a more flexible format for inserting any data. (guix-info-ignore-empty-vals): Rename to... (guix-info-ignore-empty-values): ... this. (guix-info-insert-methods): Merge this and... (guix-info-displayed-params): ... this into... (guix-info-format): ... this. Change format specifications. (guix-info-title-aliases, guix-info-value-aliases): New variables. (guix-info-displayed-params): Adjust for the new format. (guix-info-insert-entry): Likewise. (guix-package-info-fill-heading): Replace with... (guix-info-fill): ... this. (guix-info-insert-param): Replace with... (guix-info-insert-entry-unit): ... this. (guix-info-insert-title-default): Replace with... (guix-info-insert-title-format): ... this. (guix-info-insert-val-default): Replace with... (guix-info-insert-value-format): ... this. (guix-info-insert-val-simple): Replace with... (guix-info-insert-value-indent): ... this. (guix-package-info-insert-source): Adjust accordingly. (guix-package-info-insert-heading): Insert only name and version. (guix-package-info-define-insert-inputs): Do not generate 'guix-package-info-insert-ENTRY-TYPE-inputs' procedures. (guix-info-fill-column, guix-info-insert-entry-default) (guix-info-method-funcall, guix-info-insert-file-path) (guix-info-insert-url, guix-info-insert-package-function) (guix-info-insert-installed-function) (guix-info-insert-output-function) (guix-info-insert-generation-function) (guix-package-info-heading-params) (guix-package-info-insert-with-heading) (guix-package-info-insert-description) (guix-package-info-insert-location) (guix-package-info-insert-full-names) (guix-package-info-insert-source-url): Remove. (guix-info-fill-column, guix-info-param-title) (guix-info-title-function, guix-info-value-function) (guix-info-title-method->function) (guix-info-value-method->function) (guix-info-insert-value-simple): New procedures. * emacs/guix-utils.el (guix-buttonize, guix-button-type?): New procedures. (guix-split-string): Split multi-line strings and ignore empty lines. * doc/emacs.texi (Emacs Appearance): Adjust accordingly.
2016-01-02emacs: Add 'guix-alist-put'.Alex Kost
* emacs/guix-utils.el (guix-alist-put, guix-alist-put-1) (guix-alist-put!): New procedures.
2016-01-02emacs: Add 'guix-keyword-args-let'.Alex Kost
* emacs/guix-utils.el (guix-keyword-args-let): New macro. (guix-utils-font-lock-keywords): Add it. * emacs/guix-base.el (guix-define-buffer-type): Use it. * emacs/guix-list.el (guix-list-define-entry-type): Use it. * emacs/guix-read.el (guix-define-readers): Use it.
2016-01-02emacs: Simplify defining parameter titles.Alex Kost
* emacs/guix-utils.el (guix-symbol-title): New procedure. * emacs/guix-base.el (guix-get-param-title): Use it. (guix-param-titles): Remove most titles as they are automatically defined by 'guix-symbol-title'.
2016-01-02emacs: Add 'guix-with-indent'.Alex Kost
* 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.
2015-11-12emacs: Improve post processing of popup arguments.Alex Kost
* emacs/guix-command.el (guix-command-switches, guix-command-rest-arg-regexp): New variables. (guix-command-post-processors, guix-command-post-process-matching-args, guix-command-post-process-rest-single, guix-command-post-process-rest-multiple, guix-command-post-process-rest-multiple-leave, guix-command-post-process-package-args): New functions. (guix-command-post-process-rest-multiple): Take 2 arguments. (guix-command-define-popup-action): Adjust accordingly. * emacs/guix-utils.el (guix-modify): New function.
2015-09-18emacs: Replace 'guix-any' with 'cl-some'.Alex Kost
* emacs/guix-utils.el (guix-any): Remove. * emacs/guix-command.el (guix-command-improve-argument): Use 'cl-some' instead of 'guix-any'.
2015-09-15emacs: Add "View build log" action to build popup.Alex Kost
* emacs/guix-command.el (guix-run-view-build-log): New function. (guix-command-additional-execute-arguments, guix-command-special-executors): Add entries for "View build log" action. * emacs/guix-utils.el (guix-find-file-or-url): New function.
2015-09-01emacs: Allow users to choose a 'find-file' function.Alex Kost
* emacs/guix-utils.el (guix-find-file-function): New variable. (guix-find-file): Use it.
2015-08-30emacs: Add and use alist accessors.Alex Kost
* 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.
2015-08-30emacs: Add 'guix-memoized-defalias' macro.Alex Kost
* emacs/guix-utils.el (guix-memoized-defalias): New macro. (guix-memoized-font-lock-keywords): New variable.
2015-08-30emacs: Add 'guix-any'.Alex Kost
* emacs/guix-utils.el (guix-any): New function.
2015-08-30emacs: Add utils to copy guix command.Alex Kost
* emacs/guix-utils.el (guix-copy-as-kill, guix-copy-command-as-kill): New functions.
2015-08-30emacs: Add utils to make symbol and string for guix command.Alex Kost
* emacs/guix-utils.el (guix-shell-quote-argument, guix-command-symbol, guix-command-string): New functions.
2015-08-30emacs: Add and use 'guix-concat-strings'.Alex Kost
* emacs/guix-utils.el (guix-concat-strings): New function. * emacs/guix-pcomplete.el (guix-pcomplete-short-options): Use it. * emacs/guix-base.el (guix-get-package-strings): Likewise.
2015-08-30emacs: Add and use 'guix-while-search'.Alex Kost
* emacs/guix-utils.el (guix-while-search): New macro. * emacs/guix-pcomplete.el (guix-pcomplete-run-guix-and-search): Use it. * emacs/guix-prettify.el (guix-prettify-decompose-buffer): Likewise.
2015-06-08emacs: Add "memoization" code.Alex Kost
* emacs/guix-utils.el (guix-memoize): New function. (guix-memoized-defun): New macro.
2014-11-10emacs: Add 'guix-find-file'.Alex Kost
* emacs/guix-utils.el (guix-find-file): New procedure. * emacs/guix-info.el (guix-file): Use it.
2014-11-04emacs: Add interface for comparing generations.Alex Kost
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.
2014-10-17emacs: Add 'guix-generations-by-time' command.Alex Kost
* 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.
2014-09-28emacs: Support font-locking.Alex Kost
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.
2014-09-03Add Emacs user interface.Alex Kost
* 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.