From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Which Emacs version used to build Emacs packages with emacs-checkout? Date: Fri, 29 Sep 2017 13:57:14 +0300 Message-ID: <87poa97oxh.fsf@gmail.com> References: <877exa5oph.fsf@gmail.com> <87h8wdc4p4.fsf@gmail.com> <87vakaetcw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxsyq-0005or-JI for help-guix@gnu.org; Fri, 29 Sep 2017 06:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxsyn-0007vG-Hr for help-guix@gnu.org; Fri, 29 Sep 2017 06:57:16 -0400 Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]:55090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxsyn-0007rq-81 for help-guix@gnu.org; Fri, 29 Sep 2017 06:57:13 -0400 Received: by mail-wr0-x22c.google.com with SMTP id g29so1742527wrg.11 for ; Fri, 29 Sep 2017 03:57:11 -0700 (PDT) In-Reply-To: <87vakaetcw.fsf@gmail.com> (Oleg Pykhalov's message of "Fri, 22 Sep 2017 16:49:19 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Oleg Pykhalov Cc: help-guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Oleg Pykhalov (2017-09-22 16:49 +0300) wrote: > Hello Alex, Hi! > Alex Kost writes: [...] >> Yes. Note that this default emacs can be overrided on a package level >> by using #:emacs keyword in the arguments. See 'emacs-auctex' package >> for example. > > Ah, this is bad for me. Now I need to redefine all those =E2=80=9C#:emacs > ,emacs=E2=80=9D to =E2=80=9C#:emacs ,emacs-checkout=E2=80=9D as I guess. = Or I need to redefine > =E2=80=9Cemacs=E2=80=9D variable instead of inherit it in =E2=80=9Cemacs-= checkout=E2=80=9D. I think making your packages with #:emacs argument is the right way. And it is not so bad as it may seem, as you can use some Guile code to reduce the duplication. For example, look at the attached file: it shows how you may inherit the packages you need from the original emacs packages. To check it, put it into your GUIX_PACKAGE_PATH and call "guix package --show=3Dmy-emacs-paredit". This is just an example, but I think you get the idea ;-) > I want to have Emacs builded from my local Git repository. And I also > want Emacs packages builded with this my Emacs version. Actually, why do you want to do this? I mean it doesn't matter what version of Emacs you use to compile .el files. There is no difference: if you build a package with Emacs 24 it will still work with Emacs 26. --=-=-= Content-Type: text/x-scheme Content-Disposition: attachment; filename=my-emacs.scm (define-module (my-emacs) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages emacs)) (define-syntax-rule (define-my-packages (var-name pkg) ...) (begin (define-public var-name (package (inherit pkg) (name (string-append "my-" (package-name pkg))) (arguments (cons* #:emacs emacs-no-x (package-arguments pkg))))) ...)) (define-my-packages (my-emacs-ag emacs-ag) (my-paredit paredit) (my-smex emacs-smex) ;; ...and the other packages you need. ) --=-=-=--