From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] gnu: magit: Update to 2.2.0. Date: Sat, 22 Aug 2015 23:48:06 +0300 Message-ID: <87wpwnoxrt.fsf@gmail.com> References: <87zj1pd9rg.fsf@gmail.com> <87io87s00t.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTFhs-00031K-Sb for guix-devel@gnu.org; Sat, 22 Aug 2015 16:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTFhp-0007cj-Ny for guix-devel@gnu.org; Sat, 22 Aug 2015 16:48:04 -0400 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:36374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTFhp-0007cL-El for guix-devel@gnu.org; Sat, 22 Aug 2015 16:48:01 -0400 Received: by labjy4 with SMTP id jy4so8664535lab.3 for ; Sat, 22 Aug 2015 13:48:00 -0700 (PDT) In-Reply-To: <87io87s00t.fsf@netris.org> (Mark H. Weaver's message of "Sat, 22 Aug 2015 13:31:14 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver (2015-08-22 20:31 +0300) wrote: > Alex Kost writes: > >> From 55e67d4f3867f11a77b9a91d4c3c54599846cc83 Mon Sep 17 00:00:00 2001 >> From: Alex Kost >> Date: Mon, 17 Aug 2015 21:44:40 +0300 >> Subject: [PATCH] gnu: magit: Update to 2.2.0. >> >> * gnu/packages/emacs.scm (magit): Update to 2.2.0. >> [inputs]: Remove 'git:gui'. >> [propagated-inputs]: Add 'dash', remove 'git-modes'. >> [arguments]: Enable tests. Add VERSION, PREFIX and DASH_DIR to >> 'make-flags'. Remove 'configure', 'augment-load-path' and >> 'post-install' phases. > > [...] > >> + #:make-flags >> + (list (string-append "VERSION=3D" ,version) > > Interesting, you have to tell it what it's own version number is? Yes, it tries to define the version using "git describe --tags ..." and then it generates "magit-version.el" which is used only to set 'magit-versi= on' variable. I think the main problem with this package (and many other packages, sigh) is that there is no configure script, so there are some workarounds to reinvent the wheel. >> (add-before >> 'build 'patch-exec-paths >> (lambda* (#:key inputs #:allow-other-keys) >> - (let ((git (assoc-ref inputs "git")) >> - (git:gui (assoc-ref inputs "git:gui"))) >> - (emacs-substitute-variables "magit.el" >> - ("magit-git-executable" (string-append git "/bin/git")) >> - ("magit-gitk-executable" (string-append git:gui >> - "/bin/gitk"))))= )) > > Does magit 2 no longer use gitk? I don't see any sign of gitk (I don't understand why it was used before). >> - (add-before >> - 'build 'augment-load-path >> - (lambda* (#:key inputs #:allow-other-keys) >> - ;; Allow git-commit-mode.el & co. to be found. >> - (let ((git-modes (assoc-ref inputs "git-modes"))) >> - (setenv "EMACSLOADPATH" >> - (string-append ":" git-modes "/share/emacs/site-l= isp")) >> - #t))) >> - (add-after >> - 'install 'post-install >> - (lambda* (#:key outputs #:allow-other-keys) >> - (emacs-generate-autoloads >> - ,name (string-append (assoc-ref outputs "out") >> - "/share/emacs/site-lisp/"))))))) > > Are the autoloads installed by magit 2? Yes. >> + (let ((git (assoc-ref inputs "git"))) >> + (emacs-substitute-variables "lisp/magit-git.el" >> + ("magit-git-executable" (string-append git "/bin/git"))= ))))))) > > Return #t from this phase procedure. Ah, OK. At first I blindly thought if 'emacs-substitute-variables' succeeds, it returns #t, but now I see that it's not the case. I see that other emacs packages (except 'emacs-w3m') don't return #t after this "substitute vars" phase. So perhaps it would be better to modify 'emacs-batch-edit-file' (and 'emacs-batch-eval') from (guix build emacs-utils) to return #t if everything was OK. WDYT? > Otherwise, looks good to me! I haven't yet tried magit 2, but for now I > will take your word for it that we don't need magit 1 anymore. We can > always add it later if there's demand for it. OK, but I don't think it should be done, because it is obsolete and there will be no Magit 1.4.3 or 1.5, only 2.X.X. But switching from Magit 1.4 to 2 requires some=E2=80=A6 I don't know how to say=E2=80=A6 attention, especially if you have many settings for the old Ma= git. The new magit was mostly rewritten, so its settings differ a lot. --=20 Alex