Commit Graph

603 Commits

Author SHA1 Message Date
Ludovic Courtès 455272c5cc
scheme/actions: Autoload (guix scripts build) for ‘log-url’.
This is a followup to d61d827906, which
left ‘log-url’ unbound.

* scheme/emacs-guix/actions.scm: Autoload.
2023-12-06 22:47:39 +01:00
Ludovic Courtès 87d2ddd5d7
scheme: Turn off cross-module inlining.
This was causing some bindings to be unavailable in the (emacs-guix)
module at the REPL, such as ‘package-by-id’, which would in turn break
package commands in the user interface as well as shell completion.

The problem can be reproduced by running:

  guix shell -C guile guix emacs-guix -- guile

and then, at the REPL:

  ,m (emacs-guix)
  package-by-id

* scheme/Makefile.am (GUILEC_OPTS): Pass ‘-O2 -Ono-cross-module-inlining’.
2023-12-06 22:47:04 +01:00
Sergio Pastor Pérez 9ce92d95d0
Add missing binding in #:autoload form.
* scheme/emacs-guix.scm <module>: Autoload (emacs-guix packages) for
‘package-by-id’.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-10-05 16:19:53 +02:00
Janneke Nieuwenhuizen 3fba3f4648
elisp/guix-misc: Update Emacs Info-directory-list if needed.
* elisp/guix-misc.el (guix-set-emacs-environment): Set 'Info-directory-list'
when setting "INFOPATH" variable.
2023-08-28 19:34:02 +02:00
Ludovic Courtès a85f070c18
elisp: Update regexp for "-builder" files.
The "-guile-builder" suffix was used by 'build-expression->derivation'
but 'gexp->description' uses "-builder" instead.

* elisp/guix-auto-mode.el (auto-mode-alist): Change "-guile-builder" to
"-builder".
2023-03-09 10:55:48 +01:00
Ludovic Courtès cf5b7a402e
services: Allow listing Home services.
* scheme/emacs-guix/services.scm (service-by-id): Use
'fold-home-service-types' in addition to 'fold-service-types'.
(find-services): Add support for 'all-home'.
* elisp/guix-popup.el (guix-service-popup): Add ?h key.
* elisp/guix-ui-service.el (guix-service-message): Add message for
'all-home'.
(guix-all-home-services): New procedure.
2022-10-11 14:44:41 +02:00
Ludovic Courtès 1e0961647a
pack: Adjust code for new (gnu compression) module.
* scheme/emacs-guix/pack.scm <top level>: Use (gnu compression) when it
exists.
2022-10-11 13:51:40 +02:00
Simon Streit 6f5c2c3a01 Remove command loading geiser-company.
Geiser has removed it's extension to company: 18faa0ba32

* elisp/guix-repl.el (geiser-company--setup): Remove.
2022-09-02 17:47:39 +02:00
Alex Kost 85d1f49e41 elisp/ui-package: Add 'guix-package-use-name-at-point' variable
* elisp/guix-ui-package.el (guix-package-use-name-at-point): New variable.
(guix-packages-by-name): Use it.
2022-05-27 10:08:10 +02:00
Alex Kost 36a151b2fc elisp/ui-package: Fix an error on package name read
This is a followup to commit fbc2bbc12873ce080992f99b12c652ae007fc3c6.

Reported by Nicolò Balzarotti at
<https://github.com/alezost/guix.el/issues/45>
and by Christopher Howard at
<https://lists.gnu.org/archive/html/bug-guix/2021-06/msg00036.html>.

* elisp/guix-ui-package.el (guix-packages-by-name): Make sure
'thing-at-point' returns a string (it can also return nil).  Otherwise,
do not read package names (as it would be a useless function call).
2022-05-27 10:07:51 +02:00
Alex Kost 5b6fcaa47d Rename 'guix-search-…' to 'guix-packages-…' commands
* elisp/guix-ui-package.el (guix-search-by-regexp, guix-search-by-name):
Leave as obsolete aliases; rename to 'guix-packages-by-regexp' and
'guix-packages-by-name-regexp' respectively.
* elisp/guix-popup.el (guix-package-popup): Adjust accordingly.
* elisp/guix-help.el (guix-help-specifications): Likewise.
* doc/emacs-guix.texi (Package Commands): Likewise.
2022-05-27 10:07:43 +02:00
Alex Kost fb58cfdf40 elisp/ui-package: Use thing at point for 'guix-packages-by-name' command
Ispired by Formbi:
<https://gitlab.com/emacs-guix/emacs-guix/-/merge_requests/9/diffs>.

* elisp/guix-ui-package.el (guix-packages-by-name): Check
'thing-at-point' and use it if it is a package name.
2022-05-27 10:07:19 +02:00
Ludovic Courtès c9c5cb0900
elisp/profiles: Support Home profiles.
* elisp/guix-profiles.el (guix-home-profile, guix-home-profile-regexp):
New variables.
(guix-home-profile?): New procedure.
(guix-generation-profile, guix-package-profile): Add call to
'guix-home-profile?' next to 'guix-system-profile?'.
* elisp/guix-ui-profile.el (guix-all-profiles): Add GUIX-HOME-PROFILE.
(guix-home-profile): New procedure.
* elisp/guix-popup.el (guix-profile-popup): Add ?h for 'guix-home-profile'.
2022-03-07 14:04:17 +01:00
Ludovic Courtès 94fcf1fb83
elisp/prettify: Recognize "/zstd" in nar URLs.
* elisp/guix-prettify.el (guix-prettify-regexp): Add "/zstd".
2022-01-30 16:03:33 +01:00
Tobias Geerinckx-Rice 825ab772f7
Remove all references to the GuixSD name.
* README (About, Installation): Replace ‘GuixSD’ with ‘Guix System’.
* doc/emacs-guix.texi (Package Commands, Profiles, Generations, System)
(System From File, Services, Service Commands): Likewise.
* elisp/guix-about.el (guix-logo-file): Unuse ‘guixsd-logo.svg’.
* elisp/guix-utils.el (guix-guixsd?): Remove now unused procedure.
(guix-read-os-file-name): Update docstring.
* images/README: Refer to singular ‘guix-logo.svg’.
* images/guixsd-logo.svg: Delete file.

Signed-off-by: John Soo <jsoo1@asu.edu>
2021-01-12 06:30:10 -08:00
John Soo a42f66cb40
elisp: Support geiser @0.12.x
Geiser now requires a project to be declared per repl.

* elisp/guix-repl.el: Set geiser-repl-buffer-project when starting the
geiser repl.
2021-01-11 06:39:23 -08:00
John Soo d61d827906
scheme: Remove @@ for Guile 3.x support.
Support Guile 3.x.

* scheme/emacs-guix/profiles.scm: Remove @@ for
search-path-environment-variables.
* scheme/emacs-guix/system.scm: Remove @@ for
operating-system-firmware.
* scheme/emacs-guix/pack.scm: Remove @@ for %compressors,
compressor-name, and %formats.
* scheme/emacs-guix/actions.scm: Remove @@ from log-url.
2021-01-11 06:38:58 -08:00
Jonas Bernoulli 41fba4eec8 Fix the previous commit
This is a followup to commit d246b2c443.
2020-10-25 19:44:51 +03:00
Jan Nieuwenhuizen d246b2c443 elisp/misc: Update Emacs path if needed
This helps Geiser find the correct (environment's) Guile.

* elisp/guix-misc.el (guix-set-emacs-environment): Set 'exec-path'
when setting "PATH" variable.
2020-09-18 14:16:49 +03:00
Oleg Pykhalov 58a840d067 build: Fix build for Emacs 27
<https://gitlab.com/emacs-guix/emacs-guix/-/merge_requests/5>.

* elisp/local.mk (AUTOLOADS): Add '-l autoload' option to make it
compatible with Emacs 27.
2020-08-12 20:33:14 +03:00
Alex Kost a975da31aa scheme/packages: Fix compilation warning (for Guile 3.0)
* scheme/emacs-guix/packages.scm (packages-from-file): Use
'primitive-load' instead of 'load' as the latter gives a warning if
compiled with Guile 3.0.
2020-07-30 12:30:55 +03:00
Alex Kost 968cad7f1a scheme: Add missing autoloads (for Guile 3.0)
See
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=6a7c4636d4dec47eefa03c95da5a1315bd0e0413>
for the explanation.

* scheme/emacs-guix/lint.scm (emacs-guix): Add 'package-specification' autoload.
* scheme/emacs-guix/profiles.scm (emacs-guix): Add 'user-owned?' autoload.
2020-07-30 12:26:32 +03:00
Alex Kost df1fc5d888 elisp/command: Disambiguate "--list-profiles" package option
Reported by ksg at <http://issues.guix.gnu.org/41614> and
by zimoun at <https://gitlab.com/emacs-guix/emacs-guix/-/issues/24>.

This option was added by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=3972dc5d43ea824ee4ab78592e759f62ce90bf6a>.

* elisp/guix-command.el (guix-command-improve-package-argument): Use "P"
  for "--list-profiles" (as "l" is already used by "--list-generations").
2020-06-15 20:04:26 +03:00
Alex Kost e0f1c0803f elisp/command: Disambiguate "--no-offload" build option
This option was renamed from "--no-build-hook" by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=dc209d5a5ddba4320c9a4f893d6df4b70f3685a0>.

* elisp/guix-command.el (guix-command-improve-common-build-argument):
  Use "O" for "--no-offload" (as "n" is used by "--dry-run").
2020-06-15 20:04:11 +03:00
Alex Kost 5b65938f77 scheme/actions: Updates for a recent API change
That was introduced by
<https://git.savannah.gnu.org/cgit/guix.git/commit/?id=65ffb9388c1c3d870cb07e4cb3ef12c9ac06a161>

This should fix <https://gitlab.com/emacs-guix/emacs-guix/-/issues/18>.

* scheme/emacs-guix/actions.scm (process-package-actions): Use the new
'with-build-handler' macro instead of calling 'build-and-use-profile'
with '#:dry-run?' and '#:use-substitutes?' keywords.
(package-source-build-derivation): Likewise.
2020-05-18 18:44:21 +03:00
Alex Kost 9faebb7b07 elisp/devel: Update font-lock and indent symbols
According to the Guix's ".dir-locals.el".
2020-05-18 18:30:27 +03:00
Alex Kost 0b8f751243 elisp/prettify: Adjust 'guix-prettify-regexp'
Reported by zimoun:
<https://gitlab.com/emacs-guix/emacs-guix/-/issues/22>.

* elisp/guix-prettify.el (guix-prettify-regexp): Handle "lzip" before
  the hash part.
2020-05-10 19:13:09 +03:00
Maxim Cournoyer 3b5990618e elisp/devel: Fix 'guix-devel-lint-package'
Fixes <https://gitlab.com/emacs-guix/emacs-guix/issues/14>.
This is a followup to commit 2555e4b563.

* elisp/guix-devel.el (guix-devel-lint-package): Pass '%all-checkers' as
the required second argument.
2020-02-19 21:21:41 +03:00
Daniel Nagy e026d1df1a elisp: Add imenu support for 'guix-build-log-mode'
* elisp/guix-build-log.el (guix-build-log-imenu-generic-expression): New
  variable.
  (guix-build-log-mode): Use it.
2020-02-10 20:24:49 +03:00
Alex Kost 4ae8d61c3c build: Support Guile 3.0
As it is going to be released soon.

* configure.ac: Add 3.0 to 'GUILE_PKG'.
2020-01-03 21:06:10 +03:00
Alex Kost c2796e6886 Update version to 0.5.2 2019-11-21 19:20:39 +03:00
Alex Kost 13ddadabcd Update NEWS 2019-11-21 19:20:39 +03:00
Alex Kost abc5052d93 elisp/about: Silence byte-compiler about 'image-size' function
* elisp/guix-about.el (image-size): Declare 'image-size' function.
2019-11-21 19:20:39 +03:00
Alex Kost b344054910 elisp: Support the new "guix time-machine" command
Which was introduced by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=f675f8dec73d02e319e607559ed2316c299ae8c7>.

* elisp/guix-command.el (guix-command-argument-improvers): Complete
build and pull arguments.
(guix-command-rest-argument): Add the "rest" arguments (guix command).

* elisp/guix-pcomplete.el (guix-pcomplete-complete-option-arg): Complete
"--channels" option.
2019-11-21 18:55:08 +03:00
Alex Kost e91fe11dfc elisp: Support the new "guix show" command
Which was introduced by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=aeb51370da7c854e8167066df9b138e15d7363e6>.

* elisp/guix-command.el (guix-command-improve-action-argument): Use "W"
for it ("s", "h" and "w" are already occupied by the other commands).
(guix-command-argument-improvers): Complete "--load-path" argument.
(guix-command-rest-argument): Complete the "rest" argument (package name).

* elisp/guix-pcomplete.el (guix-pcomplete-package-commands): Likewise.
2019-11-21 18:53:59 +03:00
Alex Kost de8978d6d5 elisp/repl: Do not autoload Emacs packages after REPL operation
'guix-emacs-autoload-packages' cannot be used to autoload the new Emacs
packages on the fly since
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=47b3b4c2aa49e21f4cc32c97ff7bbbd069bb849c>.

Moreover, that commit broke backward compatibility, as
'guix-emacs-autoload-packages' does not take any arguments anymore.

* elisp/guix-repl.el (guix-repl-autoload-emacs-packages-maybe): Remove.
2019-11-20 19:36:51 +03:00
Alex Kost 97670a52c6 Display all user profiles in the Profile List
Suggested by zimoun: <https://github.com/alezost/guix.el/issues/36>.

* scheme/emacs-guix/profiles.scm (user-profiles): New procedure.
* scheme/emacs-guix.scm: Autoload it.
* elisp/guix-ui-profile.el (guix-all-profiles): New procedure.  Set
  'guix-profiles' variable on the first call.
* doc/emacs-guix.texi (Profile Commands): Document it.
2019-10-29 18:53:46 +03:00
Alex Kost 24918011d2 elisp/ui-lint-checker: Add lint command
* elisp/guix-ui-lint-checker.el (guix-lint-checker-list-lint): New command.
(guix-lint-checker-list-mode-map): Bind it to "L"
(guix-lint-checker-list-default-hint): Add it.
* doc/emacs-guix.texi (Lint Checkers): New section.
2019-09-13 19:24:20 +03:00
Alex Kost a44235cd43 Prompt for multiple packages for linting
* scheme/emacs-guix/lint.scm (lint-packages): New procedure.
* scheme/emacs-guix.scm (emacs-guix): Autoload it.
* elisp/guix-package.el (guix-package-lint): Use it to check multiple
  packages.
* elisp/guix-ui-package.el: Adjust accordingly.
* doc/emacs-guix.texi (More Package Commands): Adjust documentation.
2019-09-11 19:35:10 +03:00
Alex Kost 24ebe0d118 elisp: Use 'guix-package-lint' instead of 'guix-lint'
This should have been done in commit
49f937d4e0.
2019-09-08 17:06:02 +03:00
Alex Kost ba5ca406ca Make 'guix-hidden-packages' interactive command
This function was introduced by commit
3aa2f8a051.  Originally, it was not made
interactive as hidden packages are supposed to be... hidden.

But now I think it will not do any harm to make this function
interactive (otherwise, no one will ever find it).

* elisp/guix-ui-messages.el: Add messages for 'hidden' type.
* elisp/guix-ui-package.el (guix-package-info-insert-hidden-text):
Remove the old "Easter egg" message.
(guix-hidden-packages): Make interactive.
* elisp/guix-help.el (guix-help-specifications): Add it.
* elisp/guix-popup.el (guix-package-popup): Add it.
* doc/emacs-guix.texi (Package Commands): Document it.
2019-09-07 19:19:20 +03:00
Alex Kost 41f4ea8df1 Add interface for lint checkers
* scheme/emacs-guix/lint.scm (lint-checker-type)
(find-lint-checkers, lint-checker-sexps): New procedures.
* scheme/emacs-guix.scm (emacs-guix): Autoload 'lint-checker-sexps'.
* elisp/guix-ui-lint-checker.el: New file.
* elisp/local.mk (EL_FILES): Add it.
* elisp/guix-help.el (guix-help-specifications): Add
  'guix-lint-checkers' command.
* elisp/guix-popup.el (guix-package-popup): Likewise.
* doc/emacs-guix.texi (More Package Commands): Document it.
2019-09-07 19:16:46 +03:00
Alex Kost 2555e4b563 scheme/lint: Updates for the recent changes
That were introduced by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=f363c836e0b4c416dae594af4257459da592b35c> and
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=38f3176a57593be45e245de5fec27518886ce5eb>.

* scheme/emacs-guix/lint.scm: Use the new (guix lint) module.
Rename '%checkers' to '%all-checkers'.
2019-09-05 19:11:07 +03:00
Alex Kost 08ead00862 elisp/pcomplete: Complete options for "--verify"
Apparently, I missed to add these completions at the time.

* elisp/guix-pcomplete.el (guix-pcomplete-complete-option-arg): Complete
  "--verify" arguments.
2019-07-27 21:38:17 +03:00
Alex Kost 2e5304687b elisp/commands: Support new "guix deploy" command
Which was introduced by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=5cbb832fb107a8ca55938a52f6699ad8c6f08c8d>.

* elisp/guix-command.el (guix-command-improve-action-argument): Use "Y"
for it ("d", "D" and other keys are already occupied by the other
commands).
(guix-command-rest-argument): Add "File" argument.
2019-07-27 20:56:45 +03:00
Alex Kost 07dc656403 elisp: Support new options for "guix pack"
Which were added by:
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=fd214f1522063905021a297dab1ac4d85d94ad83> and
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=a0f352b30f4869a7af7017b8a5011ac7602dd115>.

* elisp/guix-command.el (guix-command-improve-pack-argument): Use "P"
  for "--entry-point" ("e" is for "--expression").
  Complete file name for "--root".
* elisp/guix-pcomplete.el (guix-pcomplete-complete-option-arg): Likewise.
2019-07-26 18:56:24 +03:00
Alex Kost 65bd49b3a2 elisp/command: Disambiguate "guix environment" options
* elisp/guix-command.el (guix-command-improve-environment-argument): Use
"-c" for "--no-cwd" option ("-n" is for "--dry-run") introduced by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=b6dc08393e6a8313b88ce422fc3c1e4e9c0efc6f>.
2019-07-26 18:38:39 +03:00
Alex Kost 11e0dbf649 elisp/command: Disambiguate "guix pack" options
* elisp/guix-command.el (guix-command-improve-pack-argument): Use "p"
for "--save-provenance" (and leave "s" for "--system") which was added by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=d40ec4a0d00df08ec4f866467080235f5a9fea87>
2019-05-07 20:11:05 +03:00
Alex Kost 75fe1d3beb elisp/command: Disambiguate "guix gc" options
* elisp/guix-command.el (guix-command-improve-gc-argument): Use "E" for
"--list-dead" (as "D" is used by "--delete" since
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=96b8c2e6e2aa00b7b400530b62cf7479aa2d9674>).
Use "F" for "--list-failures" (and leave "l" for "--list-roots" which
was added by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=bacf980c76c94e7bda86220ca4bf662d0e34a45a>).
2019-05-07 20:10:59 +03:00
Alex Kost f64acb931f elisp/command: Disambiguate "--expose" option
* elisp/guix-command.el (guix-command-improve-expose-argument): New function.
(guix-command-argument-improvers): Use it for "environment" and "system"
commands.
2019-05-07 19:52:33 +03:00