Commit Graph

16 Commits

Author SHA1 Message Date
Alex Kost
b2cb869cf9 emacs: Replace 'guix-any' with 'cl-some'.
* emacs/guix-utils.el (guix-any): Remove.
* emacs/guix-command.el (guix-command-improve-argument): Use 'cl-some'
  instead of 'guix-any'.
2015-09-18 21:41:46 +03:00
Alex Kost
83d95c7b36 emacs: Add "View build log" action to build popup.
* 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-15 15:19:31 +03:00
Alex Kost
32c0b6d78c emacs: Allow users to choose a 'find-file' function.
* emacs/guix-utils.el (guix-find-file-function): New variable.
  (guix-find-file): Use it.
2015-09-01 13:03:51 +03:00
Alex Kost
51dac38339 emacs: 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.
2015-08-30 18:26:02 +03:00
Alex Kost
6543601fa0 emacs: Add 'guix-memoized-defalias' macro.
* emacs/guix-utils.el (guix-memoized-defalias): New macro.
  (guix-memoized-font-lock-keywords): New variable.
2015-08-30 18:26:01 +03:00
Alex Kost
e767752c79 emacs: Add 'guix-any'.
* emacs/guix-utils.el (guix-any): New function.
2015-08-30 18:26:01 +03:00
Alex Kost
ad0f31f6a5 emacs: Add utils to copy guix command.
* emacs/guix-utils.el (guix-copy-as-kill, guix-copy-command-as-kill):
  New functions.
2015-08-30 18:26:01 +03:00
Alex Kost
009d6388e6 emacs: Add utils to make symbol and string for guix command.
* emacs/guix-utils.el (guix-shell-quote-argument, guix-command-symbol,
  guix-command-string): New functions.
2015-08-30 18:26:01 +03:00
Alex Kost
1ce96dd927 emacs: Add and use 'guix-concat-strings'.
* 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-30 18:26:01 +03:00
Alex Kost
c10521e976 emacs: Add and use 'guix-while-search'.
* 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-08-30 18:26:01 +03:00
Alex Kost
132e74fec9 emacs: Add "memoization" code.
* emacs/guix-utils.el (guix-memoize): New function.
  (guix-memoized-defun): New macro.
2015-06-08 11:46:05 +03:00
Alex Kost
e718f6cc8f emacs: Add 'guix-find-file'.
* emacs/guix-utils.el (guix-find-file): New procedure.
* emacs/guix-info.el (guix-file): Use it.
2014-11-10 16:13:41 +03:00
Alex Kost
d38bd08c74 emacs: Add interface for comparing generations.
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-11-04 15:51:22 +03:00
Alex Kost
189cea2782 emacs: Add 'guix-generations-by-time' command.
* 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-10-17 10:56:27 +04:00
Alex Kost
2e269860c4 emacs: 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.
2014-09-28 22:46:15 +04:00
Alex Kost
457f60fa06 Add 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.
2014-09-03 23:50:35 +04:00