diff mbox series

[bug#38662] gnu: Add emacs-next.

Message ID CADXmXkjP7RPSET-PkfH2TKzQEoOfTA_4JbjRQY5L14TnNwL1tA@mail.gmail.com
State Accepted
Headers show
Series [bug#38662] gnu: Add emacs-next. | expand

Commit Message

Valentin Ignatev Dec. 19, 2019, 1:38 p.m. UTC
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

Comments

Valentin Ignatev Dec. 19, 2019, 2:08 p.m. UTC | #1
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.
diff mbox series

Patch

Hardcode version in `emacs-next', use commit in `file-name'

* gnu/packages/emacs.scm (emacs-next):
Hardcode version to be 27.0.50.
Change file-name to use commit instead of version to avoid checkout collisions.

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 102754deed..86795ba046 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -221,7 +221,7 @@  languages.")
     (package
       (inherit emacs)
       (name "emacs-next")
-      (version (git-version "27" revision commit))
+      (version "27.0.50")
       (source
        (origin
          (method git-fetch)
@@ -229,7 +229,7 @@  languages.")
                (url "https://git.savannah.gnu.org/git/emacs.git")
                (commit commit)))
          (sha256 (base32 "0niamywp3cq05hqc7k693c3d12jbqbzbfgl4aza9dja0jidv4b80"))
-         (file-name (git-file-name name version))
+         (file-name (git-file-name name commit))
          (patches (search-patches "emacs27-exec-path.patch"
                                   "emacs-fix-scheme-indent-function.patch"
                                   "emacs-source-date-epoch.patch"))