all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: bug#30884 <30884@debbugs.gnu.org>
Subject: [bug#30884] Status: [PATCH 0/6] gnu: Add emacs-epkg.
Date: Wed, 18 Apr 2018 21:09:06 -0400	[thread overview]
Message-ID: <877ep4ngst.fsf@gmail.com> (raw)
In-Reply-To: <87tvsdk77s.fsf@gmail.com> (Oleg Pykhalov's message of "Sat, 14 Apr 2018 20:50:47 +0300")

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> writes:

> Hello Ludovic,
>
> Thank you for review!
>
> I've applied all your suggestions except ‘set-emacs-load-path’.  First
> of all this procedure is not exported.

Phases are typically not exported individually, but as an alist of all
the phases of the build system, as `%standard-phases'.

> Another pitfall is ‘Invalid
> keyword’ error.
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index 6258dbaed..d290a61b4 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -7733,7 +7733,8 @@ object has been freed.")
>                    ,@%gnu-build-system-modules
>                    (guix build emacs-utils))
>         #:imported-modules (,@%gnu-build-system-modules
> -                           (guix build emacs-utils))
> +                           (guix build emacs-utils)
> +                           (guix build emacs-build-system))
>         #:phases
>         (modify-phases %standard-phases
>           (delete 'configure)
> @@ -7744,22 +7745,8 @@ object has been freed.")
>               #t))
>           (add-after 'patch-elisp-shell-shebangs 'setenv-emacsloadpath
>             (lambda* (#:key inputs #:allow-other-keys)
> -             (define (el-dir store-dir)
> -               (match (find-files store-dir "\\.el$")
> -                 ((f1 f2 ...) (dirname f1))
> -                 (_ "")))
> -             (define emacs-prefix? (cut string-prefix? "emacs-" <>))
> -             (let* ((emacs-load-paths
> -                     (map (match-lambda
> -                            (((? emacs-prefix? name) . dir)
> -                             (string-append (el-dir dir) ":"))
> -                            (_ ""))
> -                          inputs))
> -                    (emacs-load-path-value
> -                     (string-concatenate emacs-load-paths)))
> -               (format #t "environment variable `EMACSLOADPATH' set to ~a\n"
> -                       emacs-load-path-value)
> -               (setenv "EMACSLOADPATH" emacs-load-path-value))
> +             ((@@ (guix build emacs-build-system) set-emacs-load-path)
> +               inputs)

As `set-emacs-load-path' is a phase itself, it expects to be called as
such, with keyworded arguments. It would be simpler to just insert the
phase as in:

--8<---------------cut here---------------start------------->8---
;; Add this to the define-module top level definition:
;; (define-module (gnu packages emacs)
;; ...
;; #:use-module ((guix build emacs-build-system) #:prefix emacs:)
;; ...

(add-after 'patch-elisp-shell-shebangs
           (assoc-ref emacs:%standard-phases 'set-emacs-load-path))
--8<---------------cut here---------------start------------->8---

HTH,

Maxim

  parent reply	other threads:[~2018-04-19  1:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 16:29 [bug#30884] [PATCH 0/6] gnu: Add emacs-epkg Oleg Pykhalov
2018-03-20 16:33 ` [bug#30884] [PATCH 1/6] gnu: Add emacs-pg Oleg Pykhalov
2018-03-20 16:33   ` [bug#30884] [PATCH 2/6] gnu: Add emacs-cl-generic Oleg Pykhalov
2018-04-04 12:32     ` Ludovic Courtès
2018-03-20 16:33   ` [bug#30884] [PATCH 3/6] gnu: Add emacs-finalize Oleg Pykhalov
2018-04-04 12:33     ` Ludovic Courtès
2018-03-20 16:33   ` [bug#30884] [PATCH 4/6] gnu: Add emacs-emacsql Oleg Pykhalov
2018-04-04 12:37     ` Ludovic Courtès
2018-03-20 16:33   ` [bug#30884] [PATCH 5/6] gnu: Add emacs-closql Oleg Pykhalov
2018-04-04 12:38     ` Ludovic Courtès
2018-03-20 16:33   ` [bug#30884] [PATCH 6/6] gnu: Add emacs-epkg Oleg Pykhalov
2018-04-04 12:39     ` Ludovic Courtès
2018-04-04 12:32   ` [bug#30884] [PATCH 1/6] gnu: Add emacs-pg Ludovic Courtès
2018-03-20 16:43 ` [bug#30884] guix lint produces warnings Oleg Pykhalov
2018-04-14 17:50 ` [bug#30884] Status: [PATCH 0/6] gnu: Add emacs-epkg Oleg Pykhalov
2018-04-16 14:08   ` bug#30884: " Oleg Pykhalov
2018-04-19  1:09   ` Maxim Cournoyer [this message]
2018-04-19  2:07     ` [bug#30884] " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ep4ngst.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=30884@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.