From unknown Wed Sep 10 18:55:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38662] [PATCH] gnu: Add emacs-next. Resent-From: Amin Bandali Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Dec 2019 20:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38662 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38662@debbugs.gnu.org Cc: Amin Bandali X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157669954028262 (code B ref -1); Wed, 18 Dec 2019 20:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Dec 2019 20:05:40 +0000 Received: from localhost ([127.0.0.1]:43947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihfZk-0007Ll-EH for submit@debbugs.gnu.org; Wed, 18 Dec 2019 15:05:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:55752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihfZi-0007Lc-Pu for submit@debbugs.gnu.org; Wed, 18 Dec 2019 15:05:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34086) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihfZg-0004Ya-Cj for guix-patches@gnu.org; Wed, 18 Dec 2019 15:05:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_20, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ihfZg-0001pl-0X for guix-patches@gnu.org; Wed, 18 Dec 2019 15:05:36 -0500 Received: from [2607:fea8:3b80:1ea:70c0:38fe:5242:3c76] (port=37424 helo=darrud.hitronhub.home) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ihfZd-0008LB-V9; Wed, 18 Dec 2019 15:05:34 -0500 From: Amin Bandali Date: Wed, 18 Dec 2019 15:04:19 -0500 Message-Id: <20191218200419.28836-1-bandali@gnu.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Add `emacs-next' for building latest Emacs from git. * gnu/packages/emacs.scm (emacs-next): New variable. (emacs): make the autoload deletion snippet not fail when eshell/esh-groups.el does not exist. This enables reuse of the entire snippet field of `emacs' for `emacs-next'. --- gnu/packages/emacs.scm | 64 +++++++++++++++++++- gnu/packages/patches/emacs27-exec-path.patch | 12 ++++ 2 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/emacs27-exec-path.patch diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index eba7f88551..102754deed 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -17,6 +17,9 @@ ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Jesse John Gildersleve +;;; Copyright © 2019 Valentin Ignatev +;;; Copyright © 2019 Leo Prikler +;;; Copyright © 2019 Amin Bandali ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,6 +64,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) + #:use-module (gnu packages web) ; for jansson #:use-module (gnu packages webkit) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -83,15 +87,15 @@ "emacs-source-date-epoch.patch")) (modules '((guix build utils))) (snippet - ;; Delete the bundled byte-compiled elisp files and - ;; generated autoloads. '(with-directory-excursion "lisp" + ;; Delete the bundled byte-compiled elisp files and generated + ;; autoloads. (for-each delete-file (append (find-files "." "\\.elc$") (find-files "." "loaddefs\\.el$") ;; This is the only "autoloads" file that ;; does not have "*loaddefs.el" name. - '("eshell/esh-groups.el"))) + (find-files "." "eshell/esh-groups\\.el$"))) ;; Make sure Tramp looks for binaries in the right places on ;; remote Guix System machines, where 'getconf PATH' returns @@ -211,6 +215,60 @@ large Lisp programs. It has full Unicode support for nearly all human languages.") (license license:gpl3+))) +(define-public emacs-next + (let ((commit "6008b679f65f8377a1a1b4601024ac83df013caf") + (revision "0")) + (package + (inherit emacs) + (name "emacs-next") + (version (git-version "27" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/emacs.git") + (commit commit))) + (sha256 (base32 "0niamywp3cq05hqc7k693c3d12jbqbzbfgl4aza9dja0jidv4b80")) + (file-name (git-file-name name version)) + (patches (search-patches "emacs27-exec-path.patch" + "emacs-fix-scheme-indent-function.patch" + "emacs-source-date-epoch.patch")) + (modules (origin-modules (package-source emacs))) + (snippet (origin-snippet (package-source emacs))))) + (arguments + (substitute-keyword-arguments (package-arguments emacs) + ((#:phases phases) + `(modify-phases ,phases + ;; The 'reset-gzip-timestamps phase will throw a + ;; permission error if gzip files aren't writable then + (add-before + 'reset-gzip-timestamps + 'make-compressed-files-writable + (lambda _ + (for-each make-file-writable + (find-files %output ".*\\.t?gz$")) + #t)) + ;; restore the dump file that Emacs installs somewhere in + ;; libexec/ to its original state + (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp + (lambda* (#:key outputs target #:allow-other-keys) + (let* ((libexec (string-append (assoc-ref outputs "out") + "/libexec")) + ;; each of these find-files should return one file + (pdmp (find-files libexec "^emacs\\.pdmp$")) + (pdmp-real (find-files libexec "^\\.emacs\\.pdmp-real$"))) + (for-each (lambda (wrapper real) + (delete-file wrapper) + (rename-file real wrapper)) + pdmp pdmp-real) + #t))))))) + (inputs + `(("jansson" ,jansson) + ,@(package-inputs emacs))) + (native-inputs + `(("autoconf" ,autoconf) ; needed when building from trunk + ,@(package-native-inputs emacs)))))) + (define-public emacs-minimal ;; This is the version that you should use as an input to packages that just ;; need to byte-compile .el files. diff --git a/gnu/packages/patches/emacs27-exec-path.patch b/gnu/packages/patches/emacs27-exec-path.patch new file mode 100644 index 0000000000..368fa6e33a --- /dev/null +++ b/gnu/packages/patches/emacs27-exec-path.patch @@ -0,0 +1,12 @@ +--- a/lisp/loadup.el ++++ b/lisp/loadup.el +@@ -479,7 +479,8 @@ lost after dumping"))) + ((equal dump-mode "dump") "emacs") + ((equal dump-mode "bootstrap") "emacs") + ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp") +- (t (error "unrecognized dump mode %s" dump-mode))))) ++ (t (error "unrecognized dump mode %s" dump-mode)))) ++ (exec-path nil)) + (message "Dumping under the name %s" output) + (condition-case () + (delete-file output) -- 2.23.0 From unknown Wed Sep 10 18:55:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38662] [PATCH] gnu: Add emacs-next. Resent-From: Amin Bandali Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Dec 2019 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38662 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38662@debbugs.gnu.org Cc: Valentin Ignatev , Leo Prikler Received: via spool by 38662-submit@debbugs.gnu.org id=B38662.157670012430626 (code B ref 38662); Wed, 18 Dec 2019 20:16:02 +0000 Received: (at 38662) by debbugs.gnu.org; 18 Dec 2019 20:15:24 +0000 Received: from localhost ([127.0.0.1]:43964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihfj9-0007xd-Mw for submit@debbugs.gnu.org; Wed, 18 Dec 2019 15:15:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihfj6-0007pR-GI for 38662@debbugs.gnu.org; Wed, 18 Dec 2019 15:15:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ihfiz-0007BZ-0j; Wed, 18 Dec 2019 15:15:13 -0500 Received: from [2607:fea8:3b80:1ea:70c0:38fe:5242:3c76] (port=37534 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ihfix-0003rt-Fe; Wed, 18 Dec 2019 15:15:12 -0500 From: Amin Bandali References: <20191218200419.28836-1-bandali@gnu.org> Date: Wed, 18 Dec 2019 15:15:10 -0500 In-Reply-To: <20191218200419.28836-1-bandali@gnu.org> Message-ID: <877e2tz8z5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Many thanks to Valentin and Leo both for their work and for helping me put this together. From unknown Wed Sep 10 18:55:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38662] [PATCH] gnu: Add emacs-next. Resent-From: Brett Gilio Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 19 Dec 2019 02:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38662 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Amin Bandali Cc: Amin Bandali , 38662@debbugs.gnu.org Received: via spool by 38662-submit@debbugs.gnu.org id=B38662.157672250215526 (code B ref 38662); Thu, 19 Dec 2019 02:29:01 +0000 Received: (at 38662) by debbugs.gnu.org; 19 Dec 2019 02:28:22 +0000 Received: from localhost ([127.0.0.1]:44166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihlY6-00042L-5Z for submit@debbugs.gnu.org; Wed, 18 Dec 2019 21:28:22 -0500 Received: from mout02.posteo.de ([185.67.36.66]:51787) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihlY3-000428-6f for 38662@debbugs.gnu.org; Wed, 18 Dec 2019 21:28:20 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2A69B2400FD for <38662@debbugs.gnu.org>; Thu, 19 Dec 2019 03:28:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1576722493; bh=T1INE1mO2rBrmEXEHQ0KXYXWsjXRqIIzyEIcRd32IWw=; h=Date:From:To:Cc:Subject:From; b=N49lXI3ca5qV5AEsmBJ5H9/vT889LEAhSAh5wChIvOrX1ztM5XDC3JXk1cilrRwaf lb+iBV59U2Jk8lbAvpxxk/VAsRXTqZyHemYeP+3Ah7pu/YLFszFLDPX89GjSmJyRJ0 fEoXlvEQWvRlHzBUbnf/RB4wx1v8qFupgjV1pRq/4HFxQC4Vr0TnVHVhaRDS5XQTK1 b/6abQs08f3N26zUhEIlBa24O3Y07Hwu6NIBrPkWAJP27noE6iqwgxj4JYpbHTTn60 bcPBBwOOCE0lAjHSopGiObn+BY5K2U4sn7BTBalWBbwABBBcBhT2KhoeJqPXF1JOHt 00rbn4uynWHTQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 47dbQM3yNbz9rxD; Thu, 19 Dec 2019 03:28:11 +0100 (CET) Date: Thu, 19 Dec 2019 02:28:08 +0000 (UTC) From: Brett Gilio Message-ID: In-Reply-To: <20191218200419.28836-1-bandali@gnu.org> References: <20191218200419.28836-1-bandali@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dec 18, 2019 2:06:12 PM Amin Bandali : > Add `emacs-next' for building latest Emacs from git. > > * gnu/packages/emacs.scm (emacs-next): New variable. > (emacs): make the autoload deletion snippet not fail when eshell/esh-grou= ps.el > does not exist. This enables reuse of the entire snippet field of `emacs'= for > `emacs-next'. > --- > gnu/packages/emacs.scm | 64 +++++++++++++++++++- > gnu/packages/patches/emacs27-exec-path.patch | 12 ++++ > 2 files changed, 73 insertions(+), 3 deletions(-) > create mode 100644 gnu/packages/patches/emacs27-exec-path.patch > > diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm > index eba7f88551..102754deed 100644 > --- a/gnu/packages/emacs.scm > +++ b/gnu/packages/emacs.scm > @@ -17,6 +17,9 @@ > ;;; Copyright =A9 2018 Mathieu Othacehe > ;;; Copyright =A9 2018, 2019 Tobias Geerinckx-Rice > ;;; Copyright =A9 2019 Jesse John Gildersleve > +;;; Copyright =A9 2019 Valentin Ignatev > +;;; Copyright =A9 2019 Leo Prikler > +;;; Copyright =A9 2019 Amin Bandali > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -61,6 +64,7 @@ > #:use-module (gnu packages pkg-config) > #:use-module (gnu packages texinfo) > #:use-module (gnu packages tls) > + #:use-module (gnu packages web) ; for jansson > #:use-module (gnu packages webkit) > #:use-module (gnu packages xml) > #:use-module (gnu packages xorg) > @@ -83,15 +87,15 @@ > "emacs-source-date-epoch.patch")) > (modules '((guix build utils))) > (snippet > - ;; Delete the bundled byte-compiled elisp files and > - ;; generated autoloads. > '(with-directory-excursion "lisp" > + ;; Delete the bundled byte-compiled elisp files and generated > + ;; autoloads. > (for-each delete-file > (append (find-files "." "\\.elc$") > (find-files "." "loaddefs\\.el$") > ;; This is the only "autoloads" file that > ;; does not have "*loaddefs.el" name. > - '("eshell/esh-groups.el"))) > + (find-files "." "eshell/esh-groups\\.el$"))) > > ;; Make sure Tramp looks for binaries in the right places on > ;; remote Guix System machines, where 'getconf PATH' returns > @@ -211,6 +215,60 @@ large Lisp programs. It has full Unicode support for= nearly all human > languages.") > (license license:gpl3+))) > > +(define-public emacs-next > + (let ((commit "6008b679f65f8377a1a1b4601024ac83df013caf") > + (revision "0")) > + (package > + (inherit emacs) > + (name "emacs-next") > + (version (git-version "27" revision commit)) > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://git.savannah.gnu.org/git/emacs.git") > + (commit commit))) > + (sha256 (base32 "0niamywp3cq05hqc7k693c3d12jbqbzbfgl4aza9dja0jidv4b80")= ) > + (file-name (git-file-name name version)) > + (patches (search-patches "emacs27-exec-path.patch" > + "emacs-fix-scheme-indent-function.patch" > + "emacs-source-date-epoch.patch")) > + (modules (origin-modules (package-source emacs))) > + (snippet (origin-snippet (package-source emacs))))) > + (arguments > + (substitute-keyword-arguments (package-arguments emacs) > + ((#:phases phases) > + `(modify-phases ,phases > + ;; The 'reset-gzip-timestamps phase will throw a > + ;; permission error if gzip files aren't writable then > + (add-before > + 'reset-gzip-timestamps > + 'make-compressed-files-writable > + (lambda _ > + (for-each make-file-writable > + (find-files %output ".*\\.t?gz$")) > + #t)) > + ;; restore the dump file that Emacs installs somewhere in > + ;; libexec/ to its original state > + (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp > + (lambda* (#:key outputs target #:allow-other-keys) > + (let* ((libexec (string-append (assoc-ref outputs "out") > + "/libexec")) > + ;; each of these find-files should return one file > + (pdmp (find-files libexec "^emacs\\.pdmp$")) > + (pdmp-real (find-files libexec "^\\.emacs\\.pdmp-real$"))) > + (for-each (lambda (wrapper real) > + (delete-file wrapper) > + (rename-file real wrapper)) > + pdmp pdmp-real) > + #t))))))) > + (inputs > + `(("jansson" ,jansson) > + ,@(package-inputs emacs))) > + (native-inputs > + `(("autoconf" ,autoconf) ; needed when building from trunk > + ,@(package-native-inputs emacs)))))) > + > (define-public emacs-minimal > ;; This is the version that you should use as an input to packages that j= ust > ;; need to byte-compile .el files. > diff --git a/gnu/packages/patches/emacs27-exec-path.patch b/gnu/packages/= patches/emacs27-exec-path.patch > new file mode 100644 > index 0000000000..368fa6e33a > --- /dev/null > +++ b/gnu/packages/patches/emacs27-exec-path.patch > @@ -0,0 +1,12 @@ > +--- a/lisp/loadup.el > ++++ b/lisp/loadup.el > +@@ -479,7 +479,8 @@ lost after dumping"))) > + ((equal dump-mode "dump") "emacs") > + ((equal dump-mode "bootstrap") "emacs") > + ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp") > +- (t (error "unrecognized dump mode %s" dump-mode))))) > ++ (t (error "unrecognized dump mode %s" dump-mode)))) > ++ (exec-path nil)) > + (message "Dumping under the name %s" output) > + (condition-case () > + (delete-file output) > -- > 2.23.0 > This looks good to me! Thank you for your hard work Amin, et al. -- Brett M. Gilio GNU Guix, Contributor | GNU Project, Webmaster [DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE] From unknown Wed Sep 10 18:55:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38662] [PATCH] gnu: Add emacs-next. Resent-From: Valentin Ignatev Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 19 Dec 2019 13:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38662 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38662@debbugs.gnu.org Received: via spool by 38662-submit@debbugs.gnu.org id=B38662.157676260428345 (code B ref 38662); Thu, 19 Dec 2019 13:37:02 +0000 Received: (at 38662) by debbugs.gnu.org; 19 Dec 2019 13:36:44 +0000 Received: from localhost ([127.0.0.1]:44374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihvyu-0007N6-6W for submit@debbugs.gnu.org; Thu, 19 Dec 2019 08:36:44 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:46248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihvys-0007Mr-EA for 38662@debbugs.gnu.org; Thu, 19 Dec 2019 08:36:42 -0500 Received: by mail-io1-f68.google.com with SMTP id t26so5729317ioi.13 for <38662@debbugs.gnu.org>; Thu, 19 Dec 2019 05:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=/9c6yinaqhgoiVVesZ7WnEZgmU3pfyvbV2htHVX6CyA=; b=YA2IBLouqF9y3O7DoRKu/onxl/1jKUzbIIHt/FpXiTf0R662ZfqVu3bPgdo0t4RtXW 7/QfxM+tt3+GzKaRR7kPujh7dVevTSXi6AhCKtlgk7D66OBuNjj+UxBcjf0KpdVOlF9X 4GCVMFDCObAJw45D0rs7mGIhecaeLIYKDYzLzNLCifPv5eH/YOzQh3ils1NX6Uv3UEm+ PuINpFuwXe8pTJgmE9F+LNxE6cvASEOFCgmV6u09qsXmOSA0Eh5Z/5ZqyUVMY0LD/jr5 yHZZRVwLLJWiMzMi2uHcwmkFaJBC/J1oPZFM8pDIjI9ULEgORpl+FS8CLYC6UuA5k2bF 00Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=/9c6yinaqhgoiVVesZ7WnEZgmU3pfyvbV2htHVX6CyA=; b=aAbiAGHwQGi6CQHLAoEaxqAvi7Q5VL2F/NH4/0hYxvtwUAJzsq1C8x1T6gtoxafZZa tdd2Iycbnm6hImzGfYrbkHE3FTiH1jl3ZFx1gVAvIZFQ/vpprgrN8wzz4i/bgmTTqVsC Gzj1U/oeNZVsXYccPILfrpRI7EAlvLFx4rOtUadqHbU0xMLXQQLwu0130H++l33N64tN AOdP1Vx8OPLGJ0uFiOAMEx0ttefO6Ue5eXp7UPiEGgsFoXZsX/7DFhwJXyxadjGskICm BjaOUqncfFUHVEDrRm9CWq9iSKzEuMR6PyYiKMty4dY+jy6RFR2i/UqlvhiUBAaC4P5b oGHQ== X-Gm-Message-State: APjAAAVzQt26u1a4+MvSTxAY+GXzi7808gM7Ishn/xfVQk9CX6553fOz jkRzHfAjs5qZlCrfU95734KKAbDOGWbjd/JDnBK+0scGp5E= X-Google-Smtp-Source: APXvYqwmxONaLdIUDgyhvERtXDWFPyk3hVmiP4ZFeGx9B0DYcckidNZnX6ftmcDOU6WkrF6TQRu/f++2zNYxsz0VnWc= X-Received: by 2002:a5d:93cd:: with SMTP id j13mr5648585ioo.126.1576762596438; Thu, 19 Dec 2019 05:36:36 -0800 (PST) MIME-Version: 1.0 References: <20191218200419.28836-1-bandali@gnu.org> <877e2tz8z5.fsf@gnu.org> In-Reply-To: <877e2tz8z5.fsf@gnu.org> From: Valentin Ignatev Date: Thu, 19 Dec 2019 16:38:58 +0300 Message-ID: Content-Type: multipart/mixed; boundary="00000000000074e0e2059a0ea623" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000074e0e2059a0ea623 Content-Type: multipart/alternative; boundary="00000000000074e0e0059a0ea621" --00000000000074e0e0059a0ea621 Content-Type: text/plain; charset="UTF-8" Thanks a lot for submitting the patch, I'm eager to see emacs-next in upstream! However, there is a potential issue with it. Original emacs package that we inherit here sets EMACSLOADPATH with two values, one of which is some directory path combined with the version: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/emacs.scm?h=master#n196 Every Emacs version creates a dir along the lines of .gix-profile/share/emacs/version/lisp. Current emacs from master hardcodes this version to 27.0.50, so this path becomes .gix-profile/share/emacs/27.0.50/lisp. But since we set version based on commit in this submitted patch, EMACSLOADPATH becomes invalid and this specific directory doesn't end up in the guix-profile/etc/profile script, so when you run emacs, you get multiple errors because Emacs can't load builtin packages. I think that hardcoding a version of emacs-next to "27.0.50" should work well. I'm attaching a patch that can be applied to Amin's emacs-next patch. Regards, Valentin --00000000000074e0e0059a0ea621 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks a lot for submitting the patc= h, I'm eager to see emacs-next in upstream!
However, there is= a potential issue with it. Original emacs package that we inherit here set= s EMACSLOADPATH with two values, one of which is some directory path combin= ed with the version: https://git.savannah.gnu.org/c= git/guix.git/tree/gnu/packages/emacs.scm?h=3Dmaster#n196

=
Every Emacs version creates a dir along the lines of .gix-profil= e/share/emacs/version/lisp. Current emacs from master hardcodes this versio= n to 27.0.50, so this path becomes .gix-profile/share/emacs/27.0.50/lisp. B= ut since we set version based on commit in this submitted patch, EMACSLOADP= ATH becomes invalid and this specific directory doesn't end up in the g= uix-profile/etc/profile script, so when you run emacs, you get multiple err= ors because Emacs can't load builtin packages. I think that hardcoding = a version of emacs-next to "27.0.50" should work well. I'm at= taching a patch that can be applied to Amin's emacs-next patch.

Regards,
Valentin

--00000000000074e0e0059a0ea621-- --00000000000074e0e2059a0ea623 Content-Type: text/x-patch; charset="US-ASCII"; name="emacs-next-hardcode-version.patch" Content-Disposition: attachment; filename="emacs-next-hardcode-version.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k4crt2mw0 SGFyZGNvZGUgdmVyc2lvbiBpbiBgZW1hY3MtbmV4dCcsIHVzZSBjb21taXQgaW4gYGZpbGUtbmFt ZScKCiogZ251L3BhY2thZ2VzL2VtYWNzLnNjbSAoZW1hY3MtbmV4dCk6CkhhcmRjb2RlIHZlcnNp b24gdG8gYmUgMjcuMC41MC4KQ2hhbmdlIGZpbGUtbmFtZSB0byB1c2UgY29tbWl0IGluc3RlYWQg b2YgdmVyc2lvbiB0byBhdm9pZCBjaGVja291dCBjb2xsaXNpb25zLgoKZGlmZiAtLWdpdCBhL2du dS9wYWNrYWdlcy9lbWFjcy5zY20gYi9nbnUvcGFja2FnZXMvZW1hY3Muc2NtCmluZGV4IDEwMjc1 NGRlZWQuLjg2Nzk1YmEwNDYgMTAwNjQ0Ci0tLSBhL2dudS9wYWNrYWdlcy9lbWFjcy5zY20KKysr IGIvZ251L3BhY2thZ2VzL2VtYWNzLnNjbQpAQCAtMjIxLDcgKzIyMSw3IEBAIGxhbmd1YWdlcy4i KQogICAgIChwYWNrYWdlCiAgICAgICAoaW5oZXJpdCBlbWFjcykKICAgICAgIChuYW1lICJlbWFj cy1uZXh0IikKLSAgICAgICh2ZXJzaW9uIChnaXQtdmVyc2lvbiAiMjciIHJldmlzaW9uIGNvbW1p dCkpCisgICAgICAodmVyc2lvbiAiMjcuMC41MCIpCiAgICAgICAoc291cmNlCiAgICAgICAgKG9y aWdpbgogICAgICAgICAgKG1ldGhvZCBnaXQtZmV0Y2gpCkBAIC0yMjksNyArMjI5LDcgQEAgbGFu Z3VhZ2VzLiIpCiAgICAgICAgICAgICAgICAodXJsICJodHRwczovL2dpdC5zYXZhbm5haC5nbnUu b3JnL2dpdC9lbWFjcy5naXQiKQogICAgICAgICAgICAgICAgKGNvbW1pdCBjb21taXQpKSkKICAg ICAgICAgIChzaGEyNTYgKGJhc2UzMiAiMG5pYW15d3AzY3EwNWhxYzdrNjkzYzNkMTJqYnFiemJm Z2w0YXphOWRqYTBqaWR2NGI4MCIpKQotICAgICAgICAgKGZpbGUtbmFtZSAoZ2l0LWZpbGUtbmFt ZSBuYW1lIHZlcnNpb24pKQorICAgICAgICAgKGZpbGUtbmFtZSAoZ2l0LWZpbGUtbmFtZSBuYW1l IGNvbW1pdCkpCiAgICAgICAgICAocGF0Y2hlcyAoc2VhcmNoLXBhdGNoZXMgImVtYWNzMjctZXhl Yy1wYXRoLnBhdGNoIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJlbWFjcy1m aXgtc2NoZW1lLWluZGVudC1mdW5jdGlvbi5wYXRjaCIKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAiZW1hY3Mtc291cmNlLWRhdGUtZXBvY2gucGF0Y2giKSkK --00000000000074e0e2059a0ea623-- From unknown Wed Sep 10 18:55:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38662] [PATCH] gnu: Add emacs-next. Resent-From: Valentin Ignatev Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 19 Dec 2019 14:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38662 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38662@debbugs.gnu.org Received: via spool by 38662-submit@debbugs.gnu.org id=B38662.157676436931137 (code B ref 38662); Thu, 19 Dec 2019 14:07:02 +0000 Received: (at 38662) by debbugs.gnu.org; 19 Dec 2019 14:06:09 +0000 Received: from localhost ([127.0.0.1]:44405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihwRN-000869-3R for submit@debbugs.gnu.org; Thu, 19 Dec 2019 09:06:09 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:38105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihwRH-00085V-AN for 38662@debbugs.gnu.org; Thu, 19 Dec 2019 09:06:07 -0500 Received: by mail-io1-f65.google.com with SMTP id v3so5863582ioj.5 for <38662@debbugs.gnu.org>; Thu, 19 Dec 2019 06:06:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2w4hfiar6JsPiouYAAIzQfRw45Y4Ec7cyCdD5xjbLx0=; b=GUAr9Mi6NLRwxqkcpgjrAb7iKXo3W0mFpRX2086kqkobDDOiP+L8nUEiwKVFc/aHIM lUCcO2a/y6ZFdkIdLxkskcpWwGbyrH03E2SDncuxrgq0ktRl1gh1Vylx2uD6naGQhuvs wdOpfmH1I2I7gROITKtSICgqI5EGxib1KGCKgAaFiYZNl00qiV5I63SlWYQXlRg8T0b/ LYAx3l09rJUTY/6031ciOeFdNXiPrENYgARzcCtYEvz4rvIXtfFQUXSrn3RKEnrsvxNr dWujRmAv1hq1h+vnsW6xPK8PTrgyUFSEskV6sTknD3q5T++ByMYRTDELl5Z1YSg0b+GV gTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2w4hfiar6JsPiouYAAIzQfRw45Y4Ec7cyCdD5xjbLx0=; b=NM7U59062qNchOzwKCskTZmmPTwPzShqo+l5spcgjy9rNQp/yD3bg4msDpUFyEFGpU P5QjQCMMcVLwmBrrTisrZLmHktNvx/tgsetoF6jIO9F+2GJDEecCCpYYJ5PUaRSXNOY3 Co7tXF4qwmSZCtVhUScVCV1umxFLbihZ9ytf+0GpUOs+ttk4Gys2ycTGUhfbhKWizaXP z5FiT4lZbwmA8TaWLvIFc5lpZhOKKefEoQTL6A/ru7N/QMduXMNPyfbKET/Ydyxk0VVd h7JeweNL7k7FxbuqVhxlWHEVZ1LO5wnWY1FRGUHscxblgBhCFlTW+rB/m/wapCN7GhtW 5DZQ== X-Gm-Message-State: APjAAAV+lw657pAgXyfIJPDhvyEr4Fn1yYktA6fgKiMlGQDpLu4ua9Q/ eiIqJ2BEYEQvNbCsC1DNJMAB90SqSqxx45MoSkSe6gqi X-Google-Smtp-Source: APXvYqzgCqNhf8a/8o9SkmJTm5qPk6o9mm8IryMaKw1LSpGBU3DQvRsS3+qKqJ8uvCEzZVZahS9lm7XNu1OFtMm2lu4= X-Received: by 2002:a6b:6e02:: with SMTP id d2mr6197634ioh.22.1576764357539; Thu, 19 Dec 2019 06:05:57 -0800 (PST) MIME-Version: 1.0 References: <20191218200419.28836-1-bandali@gnu.org> <877e2tz8z5.fsf@gnu.org> In-Reply-To: From: Valentin Ignatev Date: Thu, 19 Dec 2019 17:08:19 +0300 Message-ID: Content-Type: multipart/alternative; boundary="0000000000006cfc75059a0f0f57" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000006cfc75059a0f0f57 Content-Type: text/plain; charset="UTF-8" As Leo pointed out on IRC, my patch would break guix package -u emacs-next because of hardcoded version. So it's better to fix the search patch instead of applying it. --0000000000006cfc75059a0f0f57 Content-Type: text/html; charset="UTF-8"
As Leo pointed out on IRC, my patch would break guix package -u emacs-next because of hardcoded version. So it's better to fix the search patch instead of applying it.
--0000000000006cfc75059a0f0f57-- From unknown Wed Sep 10 18:55:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38662] [PATCH] gnu: Add emacs-next. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Dec 2019 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38662 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Amin Bandali Cc: 38662@debbugs.gnu.org Received: via spool by 38662-submit@debbugs.gnu.org id=B38662.15768792205189 (code B ref 38662); Fri, 20 Dec 2019 22:01:02 +0000 Received: (at 38662) by debbugs.gnu.org; 20 Dec 2019 22:00:20 +0000 Received: from localhost ([127.0.0.1]:47349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiQJn-0001Ld-P3 for submit@debbugs.gnu.org; Fri, 20 Dec 2019 17:00:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiQJi-0001LM-RD for 38662@debbugs.gnu.org; Fri, 20 Dec 2019 17:00:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iiQJd-0006pM-JP for 38662@debbugs.gnu.org; Fri, 20 Dec 2019 17:00:09 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59840 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iiQJT-0008KG-5k; Fri, 20 Dec 2019 17:00:02 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20191218200419.28836-1-bandali@gnu.org> Date: Fri, 20 Dec 2019 22:59:56 +0100 In-Reply-To: <20191218200419.28836-1-bandali@gnu.org> (Amin Bandali's message of "Wed, 18 Dec 2019 15:04:19 -0500") Message-ID: <871rsypsir.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Amin, Amin Bandali skribis: > Add `emacs-next' for building latest Emacs from git. > > * gnu/packages/emacs.scm (emacs-next): New variable. > (emacs): make the autoload deletion snippet not fail when eshell/esh-grou= ps.el > does not exist. This enables reuse of the entire snippet field of `emacs= ' for > `emacs-next'. Nice! Please also mention the new patch file and add it to gnu/local.mk. It LGTM, but=E2=80=A6 > (snippet > - ;; Delete the bundled byte-compiled elisp files and > - ;; generated autoloads. > '(with-directory-excursion "lisp" > + ;; Delete the bundled byte-compiled elisp files and gen= erated > + ;; autoloads. > (for-each delete-file > (append (find-files "." "\\.elc$") > (find-files "." "loaddefs\\.el$") > ;; This is the only "autoloads" file = that > ;; does not have "*loaddefs.el" name. > - '("eshell/esh-groups.el"))) > + (find-files "." "eshell/esh-groups\\.= el$"))) This change causes a rebuild of =E2=80=98emacs=E2=80=99, =E2=80=98emacs-min= imal=E2=80=99, and everything that depends on them (1K+ packages.) Can it be avoided somehow? One solution would be to duplicate the snippet for now in =E2=80=98emacs-ne= xt=E2=80=99. > --- /dev/null > +++ b/gnu/packages/patches/emacs27-exec-path.patch Please add a line or two at the top explaining what this patch does. Could you send an updated patch? Thanks! Ludo=E2=80=99. From unknown Wed Sep 10 18:55:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#38662] [PATCH] gnu: Add emacs-next. Resent-From: Amin Bandali Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Dec 2019 06:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38662 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 38662@debbugs.gnu.org Received: via spool by 38662-submit@debbugs.gnu.org id=B38662.157699531931809 (code B ref 38662); Sun, 22 Dec 2019 06:16:02 +0000 Received: (at 38662) by debbugs.gnu.org; 22 Dec 2019 06:15:19 +0000 Received: from localhost ([127.0.0.1]:49030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiuWI-0008Gu-FZ for submit@debbugs.gnu.org; Sun, 22 Dec 2019 01:15:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiuWD-0008GZ-M6 for 38662@debbugs.gnu.org; Sun, 22 Dec 2019 01:15:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iiuW8-0005Sm-0y; Sun, 22 Dec 2019 01:15:04 -0500 Received: from [2607:fea8:3b80:1ea:c1ac:ee7c:e121:1566] (port=59796 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iiuW7-0002Nq-JD; Sun, 22 Dec 2019 01:15:03 -0500 From: Amin Bandali References: <20191218200419.28836-1-bandali@gnu.org> <871rsypsir.fsf@gnu.org> Date: Sun, 22 Dec 2019 01:15:02 -0500 In-Reply-To: <871rsypsir.fsf@gnu.org> Message-ID: <87woaonaxl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo=E2=80=99, all, Thanks for the all feedback. Below you will find v2 with the requested changes, as well as a workaround for "EMACSLOADPATH" to use the correct version name, currently 27.0.50, for `emacs-next', which I forgot to include in my previous patch. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-emacs-next.patch Content-Transfer-Encoding: quoted-printable >From 3a03851868440c6c0bda81b30693e3ead1196bd2 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Tue, 17 Dec 2019 23:49:49 -0500 Subject: [PATCH v2] gnu: Add emacs-next. Add `emacs-next' for building latest Emacs from git. * gnu/packages/emacs.scm (emacs-next): New variable. (emacs): make the autoload deletion snippet not fail when eshell/esh-groups= .el does not exist. This enables reuse of the entire snippet field of `emacs' = for `emacs-next'. * gnu/packages/patches/emacs27-exec-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Add the above patch file to it. --- gnu/local.mk | 1 + gnu/packages/emacs.scm | 110 ++++++++++++++++++- gnu/packages/patches/emacs27-exec-path.patch | 18 +++ 3 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/emacs27-exec-path.patch diff --git a/gnu/local.mk b/gnu/local.mk index b9d97ace27..a48e71089d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -802,6 +802,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/elixir-path-length.patch \ %D%/packages/patches/elm-compiler-disable-reactor.patch \ %D%/packages/patches/elm-compiler-fix-map-key.patch \ + %D%/packages/patches/emacs27-exec-path.patch \ %D%/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index eba7f88551..ebe47d7186 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -17,6 +17,9 @@ ;;; Copyright =C2=A9 2018 Mathieu Othacehe ;;; Copyright =C2=A9 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2019 Jesse John Gildersleve +;;; Copyright =C2=A9 2019 Valentin Ignatev +;;; Copyright =C2=A9 2019 Leo Prikler +;;; Copyright =C2=A9 2019 Amin Bandali ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,6 +64,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) + #:use-module (gnu packages web) ; for jansson #:use-module (gnu packages webkit) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -83,14 +87,20 @@ "emacs-source-date-epoch.patch")) (modules '((guix build utils))) (snippet - ;; Delete the bundled byte-compiled elisp files and - ;; generated autoloads. '(with-directory-excursion "lisp" + ;; Delete the bundled byte-compiled elisp files and gener= ated + ;; autoloads. (for-each delete-file (append (find-files "." "\\.elc$") (find-files "." "loaddefs\\.el$") ;; This is the only "autoloads" file th= at ;; does not have "*loaddefs.el" name. + ;; TODO: Next time changing this packag= e, + ;; replace the following with a call to + ;; `find-files', so that `delete-file' + ;; wouldn't error out when the file is + ;; missing, making the entire snippet f= ield + ;; reusable as-is for `emacs-next' belo= w. '("eshell/esh-groups.el"))) =20 ;; Make sure Tramp looks for binaries in the right places= on @@ -211,6 +221,102 @@ large Lisp programs. It has full Unicode support for= nearly all human languages.") (license license:gpl3+))) =20 +(define-public emacs-next + (let ((commit "36abf6864604b3061c2e070f8997491fa2bce44c") + (revision "0") + (emacs-version "27.0.50")) + (package + (inherit emacs) + (name "emacs-next") + (version (git-version emacs-version revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/emacs.git") + (commit commit))) + (sha256 + (base32 "1ckn607p0clz0dhhlizvv7l03p4nminy48h53xrpz55w4rcrcm2l")) + (file-name (git-file-name name version)) + (patches (search-patches "emacs27-exec-path.patch" + "emacs-fix-scheme-indent-function.patch" + "emacs-source-date-epoch.patch")) + (modules (origin-modules (package-source emacs))) + ;; TODO: once the snippet for `emacs' is changed to not fail when + ;; eshell/esh-groups.el does not exist, replace this snippet with + ;; (snippet (origin-snippet (package-source emacs))))). + (snippet + '(with-directory-excursion "lisp" + ;; Make sure Tramp looks for binaries in the right places on + ;; remote Guix System machines, where 'getconf PATH' returns + ;; something bogus. + (substitute* "net/tramp-sh.el" + ;; Patch the line after "(defcustom tramp-remote-path". + (("\\(tramp-default-remote-path") + (format #f "(tramp-default-remote-path ~s ~s ~s ~s " + "~/.guix-profile/bin" "~/.guix-profile/sbin" + "/run/current-system/profile/bin" + "/run/current-system/profile/sbin"))) + + ;; Make sure Man looks for C header files in the right + ;; places. + (substitute* "man.el" + (("\"/usr/local/include\"" line) + (string-join + (list line + "\"~/.guix-profile/include\"" + "\"/var/guix/profiles/system/profile/include\"") + " "))) + #t)))) + (arguments + (substitute-keyword-arguments (package-arguments emacs) + ((#:phases phases) + `(modify-phases ,phases + ;; The 'reset-gzip-timestamps phase will throw a + ;; permission error if gzip files aren't writable then + (add-before + 'reset-gzip-timestamps + 'make-compressed-files-writable + (lambda _ + (for-each make-file-writable + (find-files %output ".*\\.t?gz$")) + #t)) + ;; restore the dump file that Emacs installs somewhere in + ;; libexec/ to its original state + (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp + (lambda* (#:key outputs target #:allow-other-keys) + (let* ((libexec (string-append (assoc-ref outputs "out") + "/libexec")) + ;; each of these find-files should return one file + (pdmp (find-files libexec "^emacs\\.pdmp$")) + (pdmp-real (find-files libexec + "^\\.emacs\\.pdmp-real$"))) + (for-each (lambda (wrapper real) + (delete-file wrapper) + (rename-file real wrapper)) + pdmp pdmp-real) + #t))))))) + (inputs + `(("jansson" ,jansson) + ,@(package-inputs emacs))) + (native-inputs + `(("autoconf" ,autoconf) ; needed when building from trunk + ,@(package-native-inputs emacs))) + + ;; TODO: consider changing `emacs' to use a more robust way of + ;; specifying version for "EMACSLOADPATH", so as to avoid having to + ;; duplicate native-search-paths here. + (native-search-paths + (list (search-path-specification + (variable "EMACSLOADPATH") + ;; The versioned entry is for the Emacs' builtin libraries. + (files + (list "share/emacs/site-lisp" + (string-append "share/emacs/" emacs-version "/lisp"))= )) + (search-path-specification + (variable "INFOPATH") + (files '("share/info")))))))) + (define-public emacs-minimal ;; This is the version that you should use as an input to packages that = just ;; need to byte-compile .el files. diff --git a/gnu/packages/patches/emacs27-exec-path.patch b/gnu/packages/pa= tches/emacs27-exec-path.patch new file mode 100644 index 0000000000..418aa633a1 --- /dev/null +++ b/gnu/packages/patches/emacs27-exec-path.patch @@ -0,0 +1,18 @@ +Do not capture the build-time value of $PATH in the 'emacs' executable +since this can noticeably increase the size of the closure of Emacs +with things like GCC being referenced. + +(like emacs-exec-path.patch, but for Emacs 27) + +--- a/lisp/loadup.el ++++ b/lisp/loadup.el +@@ -479,7 +479,8 @@ lost after dumping"))) + ((equal dump-mode "dump") "emacs") + ((equal dump-mode "bootstrap") "emacs") + ((equal dump-mode "pbootstrap") "bootstrap-emacs.= pdmp") +- (t (error "unrecognized dump mode %s" dump-mode))= ))) ++ (t (error "unrecognized dump mode %s" dump-mode))= )) ++ (exec-path nil)) + (message "Dumping under the name %s" output) + (condition-case () + (delete-file output) --=20 2.23.0 --=-=-=-- From unknown Wed Sep 10 18:55:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Amin Bandali Subject: bug#38662: closed (Re: [bug#38662] [PATCH] gnu: Add emacs-next.) Message-ID: References: <87lfr2j3u1.fsf@gnu.org> <20191218200419.28836-1-bandali@gnu.org> X-Gnu-PR-Message: they-closed 38662 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 38662@debbugs.gnu.org Date: Mon, 23 Dec 2019 18:27:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1577125622-25867-1" This is a multi-part message in MIME format... ------------=_1577125622-25867-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #38662: [PATCH] gnu: Add emacs-next. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 38662@debbugs.gnu.org. --=20 38662: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D38662 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1577125622-25867-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 38662-done) by debbugs.gnu.org; 23 Dec 2019 18:26:44 +0000 Received: from localhost ([127.0.0.1]:51652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijSPk-0006il-I2 for submit@debbugs.gnu.org; Mon, 23 Dec 2019 13:26:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijSPg-0006iW-1V for 38662-done@debbugs.gnu.org; Mon, 23 Dec 2019 13:26:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ijSPa-0000lI-Tz for 38662-done@debbugs.gnu.org; Mon, 23 Dec 2019 13:26:34 -0500 Received: from lns-bzn-56-82-255-208-147.adsl.proxad.net ([82.255.208.147]:35270 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ijSPZ-0006jD-I2; Mon, 23 Dec 2019 13:26:34 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Amin Bandali Subject: Re: [bug#38662] [PATCH] gnu: Add emacs-next. References: <20191218200419.28836-1-bandali@gnu.org> <871rsypsir.fsf@gnu.org> <87woaonaxl.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 =?utf-8?Q?Niv=C3=B4se?= an 228 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 23 Dec 2019 19:26:30 +0100 In-Reply-To: <87woaonaxl.fsf@gnu.org> (Amin Bandali's message of "Sun, 22 Dec 2019 01:15:02 -0500") Message-ID: <87lfr2j3u1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38662-done Cc: 38662-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Amin, Amin Bandali skribis: > Thanks for the all feedback. Below you will find v2 with the requested > changes, as well as a workaround for "EMACSLOADPATH" to use the correct > version name, currently 27.0.50, for `emacs-next', which I forgot to > include in my previous patch. > > From 3a03851868440c6c0bda81b30693e3ead1196bd2 Mon Sep 17 00:00:00 2001 > From: Amin Bandali > Date: Tue, 17 Dec 2019 23:49:49 -0500 > Subject: [PATCH v2] gnu: Add emacs-next. > > Add `emacs-next' for building latest Emacs from git. > > * gnu/packages/emacs.scm (emacs-next): New variable. > (emacs): make the autoload deletion snippet not fail when eshell/esh-grou= ps.el > does not exist. This enables reuse of the entire snippet field of `emacs= ' for > `emacs-next'. > * gnu/packages/patches/emacs27-exec-path.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add the above patch file to it. Applied, thanks! Ludo=E2=80=99. ------------=_1577125622-25867-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Dec 2019 20:05:40 +0000 Received: from localhost ([127.0.0.1]:43947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihfZk-0007Ll-EH for submit@debbugs.gnu.org; Wed, 18 Dec 2019 15:05:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:55752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihfZi-0007Lc-Pu for submit@debbugs.gnu.org; Wed, 18 Dec 2019 15:05:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34086) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihfZg-0004Ya-Cj for guix-patches@gnu.org; Wed, 18 Dec 2019 15:05:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_20, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ihfZg-0001pl-0X for guix-patches@gnu.org; Wed, 18 Dec 2019 15:05:36 -0500 Received: from [2607:fea8:3b80:1ea:70c0:38fe:5242:3c76] (port=37424 helo=darrud.hitronhub.home) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ihfZd-0008LB-V9; Wed, 18 Dec 2019 15:05:34 -0500 From: Amin Bandali To: guix-patches@gnu.org Subject: [PATCH] gnu: Add emacs-next. Date: Wed, 18 Dec 2019 15:04:19 -0500 Message-Id: <20191218200419.28836-1-bandali@gnu.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Add `emacs-next' for building latest Emacs from git. * gnu/packages/emacs.scm (emacs-next): New variable. (emacs): make the autoload deletion snippet not fail when eshell/esh-groups.el does not exist. This enables reuse of the entire snippet field of `emacs' for `emacs-next'. --- gnu/packages/emacs.scm | 64 +++++++++++++++++++- gnu/packages/patches/emacs27-exec-path.patch | 12 ++++ 2 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/emacs27-exec-path.patch diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index eba7f88551..102754deed 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -17,6 +17,9 @@ ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Jesse John Gildersleve +;;; Copyright © 2019 Valentin Ignatev +;;; Copyright © 2019 Leo Prikler +;;; Copyright © 2019 Amin Bandali ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,6 +64,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) + #:use-module (gnu packages web) ; for jansson #:use-module (gnu packages webkit) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -83,15 +87,15 @@ "emacs-source-date-epoch.patch")) (modules '((guix build utils))) (snippet - ;; Delete the bundled byte-compiled elisp files and - ;; generated autoloads. '(with-directory-excursion "lisp" + ;; Delete the bundled byte-compiled elisp files and generated + ;; autoloads. (for-each delete-file (append (find-files "." "\\.elc$") (find-files "." "loaddefs\\.el$") ;; This is the only "autoloads" file that ;; does not have "*loaddefs.el" name. - '("eshell/esh-groups.el"))) + (find-files "." "eshell/esh-groups\\.el$"))) ;; Make sure Tramp looks for binaries in the right places on ;; remote Guix System machines, where 'getconf PATH' returns @@ -211,6 +215,60 @@ large Lisp programs. It has full Unicode support for nearly all human languages.") (license license:gpl3+))) +(define-public emacs-next + (let ((commit "6008b679f65f8377a1a1b4601024ac83df013caf") + (revision "0")) + (package + (inherit emacs) + (name "emacs-next") + (version (git-version "27" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/emacs.git") + (commit commit))) + (sha256 (base32 "0niamywp3cq05hqc7k693c3d12jbqbzbfgl4aza9dja0jidv4b80")) + (file-name (git-file-name name version)) + (patches (search-patches "emacs27-exec-path.patch" + "emacs-fix-scheme-indent-function.patch" + "emacs-source-date-epoch.patch")) + (modules (origin-modules (package-source emacs))) + (snippet (origin-snippet (package-source emacs))))) + (arguments + (substitute-keyword-arguments (package-arguments emacs) + ((#:phases phases) + `(modify-phases ,phases + ;; The 'reset-gzip-timestamps phase will throw a + ;; permission error if gzip files aren't writable then + (add-before + 'reset-gzip-timestamps + 'make-compressed-files-writable + (lambda _ + (for-each make-file-writable + (find-files %output ".*\\.t?gz$")) + #t)) + ;; restore the dump file that Emacs installs somewhere in + ;; libexec/ to its original state + (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp + (lambda* (#:key outputs target #:allow-other-keys) + (let* ((libexec (string-append (assoc-ref outputs "out") + "/libexec")) + ;; each of these find-files should return one file + (pdmp (find-files libexec "^emacs\\.pdmp$")) + (pdmp-real (find-files libexec "^\\.emacs\\.pdmp-real$"))) + (for-each (lambda (wrapper real) + (delete-file wrapper) + (rename-file real wrapper)) + pdmp pdmp-real) + #t))))))) + (inputs + `(("jansson" ,jansson) + ,@(package-inputs emacs))) + (native-inputs + `(("autoconf" ,autoconf) ; needed when building from trunk + ,@(package-native-inputs emacs)))))) + (define-public emacs-minimal ;; This is the version that you should use as an input to packages that just ;; need to byte-compile .el files. diff --git a/gnu/packages/patches/emacs27-exec-path.patch b/gnu/packages/patches/emacs27-exec-path.patch new file mode 100644 index 0000000000..368fa6e33a --- /dev/null +++ b/gnu/packages/patches/emacs27-exec-path.patch @@ -0,0 +1,12 @@ +--- a/lisp/loadup.el ++++ b/lisp/loadup.el +@@ -479,7 +479,8 @@ lost after dumping"))) + ((equal dump-mode "dump") "emacs") + ((equal dump-mode "bootstrap") "emacs") + ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp") +- (t (error "unrecognized dump mode %s" dump-mode))))) ++ (t (error "unrecognized dump mode %s" dump-mode)))) ++ (exec-path nil)) + (message "Dumping under the name %s" output) + (condition-case () + (delete-file output) -- 2.23.0 ------------=_1577125622-25867-1--