[PATCH emacs-team 0/4] Emacs build fixes + enable native comp by default?

  • Done
  • quality assurance status badge
Details
4 participants
  • Morgan Smith
  • Liliana Marie Prikler
  • Maxim Cournoyer
  • Morgan Smith
Owner
unassigned
Submitted by
Morgan Smith
Severity
normal

Debbugs page

Morgan Smith wrote 1 weeks ago
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB3424B48F54F2DF5F465681A9C5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
I got a couple fixes here:

1. simple fix. plz apply

2. Maybe involves a discussion. Upstream has enabled native compilation by
default so it'd be nice for us to do the same. However, this bumps the
closure size of emacs-minimal up by 500MiB which is substantial. It also
increases compile time of both emacs-minimal and now all emacs packages
substantially.

Note: You can install the other 3 patches and just leave this one out for now
if you'd like.

3 and 4. We have many packages (like emacs-stgit) that have a 'chdir' phase.
This messes with the emacs build system so those packages don't have their
autoloads generated, a description generated, the load path stuff is messed
up, and native compilation files get installed into the wrong directories.


Morgan Smith (4):
gnu: emacs->emacs-next: Don't use file that doesn't exist
gnu: emacs-minimal: Enable native compilations
guix: emacs-build-system: Add 'lisp-directory' key
Use #:lisp-directory instead of a custom phase

gnu/packages/agda.scm | 5 +-
gnu/packages/cmake.scm | 7 +-
gnu/packages/emacs-xyz.scm | 144 ++++++++--------------------
gnu/packages/emacs.scm | 153 +++++++++++++-----------------
gnu/packages/engineering.scm | 8 +-
gnu/packages/erlang.scm | 5 +-
gnu/packages/mail.scm | 6 +-
gnu/packages/music.scm | 5 +-
gnu/packages/protobuf.scm | 5 +-
gnu/packages/scheme.scm | 5 +-
gnu/packages/version-control.scm | 4 +-
guix/build-system/emacs.scm | 2 +
guix/build/emacs-build-system.scm | 6 +-
13 files changed, 120 insertions(+), 235 deletions(-)


base-commit: 725917beddf8454f92d01de7a3cfcc283100f43b
--
2.48.1
Morgan Smith wrote 1 weeks ago
[PATCH 1/4] gnu: emacs->emacs-next: Don't use file that doesn't exist
(address . 76690@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB3424FB4718C01CB3C3C77910C5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
* gnu/packages/emacs.scm(emacs->emacs-next): Remove reference to deleted file
'comp-integrity-next.el'. It will now use the inherited phase that refers to
an existing file.

Change-Id: Iea026528d2293538ab6d89e02d8d8a2a86fa0f1d
---
gnu/packages/emacs.scm | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 5de87720b4..deebb7282d 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -607,28 +607,7 @@ (define* (emacs->emacs-next emacs #:optional name
(string-drop (package-name emacs)
(string-length "emacs"))))))
(version version)
- (source source)
- (arguments
- (substitute-keyword-arguments (package-arguments emacs)
- ((#:phases phases)
- #~(modify-phases #$phases
- (replace 'validate-comp-integrity
- (lambda* (#:key outputs #:allow-other-keys)
- #$(cond
- ((%current-target-system)
- #~(display
- "Cannot validate native compilation on cross builds.\n"))
- ((member (%current-system) '("armhf-linux" "i686-linux"))
- #~(display "Integrity test is broken on 32 bit systems.\n"))
- (else
- #~(invoke
- (string-append (assoc-ref outputs "out") "/bin/emacs")
- "--batch"
- "--load"
- #$(local-file
- (search-auxiliary-file
- "emacs/comp-integrity-next.el"))
- "-f" "ert-run-tests-batch-and-exit")))))))))))
+ (source source)))
(define-public emacs-next (emacs->emacs-next emacs))
(define-public emacs-next-pgtk (emacs->emacs-next emacs-pgtk))
--
2.48.1
Morgan Smith wrote 1 weeks ago
[PATCH 2/4] gnu: emacs-minimal: Enable native compilations
(address . 76690@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB34249CB04D169E65A491BE7AC5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
* gnu/packages/emacs.scm(emacs-no-x): Move native compilation settings from
here to ...
(emacs-minimal): ... here.

Change-Id: Ib549f0e7435cab0c891bb8d6cec9b1af041ab7c4
---
gnu/packages/emacs.scm | 130 ++++++++++++++++++++---------------------
1 file changed, 64 insertions(+), 66 deletions(-)

Toggle diff (176 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index deebb7282d..1e0c046989 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -154,7 +154,8 @@ (define-public emacs-minimal
(list
#:tests? #f ; no check target
#:modules (%emacs-modules build-system)
- #:configure-flags #~(list "--with-gnutls=no" "--disable-build-details")
+ #:configure-flags #~(list "--with-native-compilation=aot"
+ "--with-gnutls=no" "--disable-build-details")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'enable-elogind
@@ -239,6 +240,57 @@ (define-public emacs-minimal
(substitute* (find-files "." "^Makefile\\.in$")
(("/bin/pwd")
"pwd"))))
+ (add-after 'set-paths 'set-libgccjit-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (first-subdirectory/absolute directory)
+ (let ((files (scandir
+ directory
+ (lambda (file)
+ (and (not (member file '("." "..")))
+ (file-is-directory? (string-append
+ directory "/"
+ file)))))))
+ (and (not (null? files))
+ (string-append directory "/" (car files)))))
+ (let* ((libgccjit-libdir
+ (first-subdirectory/absolute ;; version
+ (first-subdirectory/absolute ;; host type
+ (search-input-directory inputs "lib/gcc")))))
+ (setenv "LIBRARY_PATH"
+ (string-append (getenv "LIBRARY_PATH")
+ ":" libgccjit-libdir)))))
+ (add-after 'unpack 'patch-compilation-driver
+ (lambda _
+ (substitute* "lisp/emacs-lisp/comp.el"
+ (("\\(defcustom native-comp-driver-options nil")
+ (format
+ #f "(defcustom native-comp-driver-options '(~@{~s~^ ~})"
+ (string-append
+ "-B" #$(this-package-input "binutils") "/bin/")
+ (string-append
+ "-B" #$(this-package-input "glibc") "/lib/")
+ (string-append
+ "-B" #$(this-package-input "libgccjit") "/lib/")
+ (string-append
+ "-B" #$(this-package-input "libgccjit") "/lib/gcc/"))))))
+ (add-after 'build 'build-trampolines
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "trampolines" make-flags)))
+ (add-after 'validate-runpath 'validate-comp-integrity
+ (lambda* (#:key outputs #:allow-other-keys)
+ #$(cond
+ ((%current-target-system)
+ #~(display "Cannot validate native-comp on cross builds.\n"))
+ ((member (%current-system) '("armhf-linux" "i686-linux"))
+ #~(display "Integrity test is broken on armhf.\n"))
+ (else
+ #~(invoke
+ (string-append (assoc-ref outputs "out") "/bin/emacs")
+ "--batch"
+ "--load"
+ #$(local-file
+ (search-auxiliary-file "emacs/comp-integrity.el"))
+ "-f" "ert-run-tests-batch-and-exit")))))
(add-after 'install 'install-site-start
;; Use 'guix-emacs' in "site-start.el", which is used autoload the
;; Elisp packages found in EMACSLOADPATH.
@@ -308,10 +360,17 @@ (define-public emacs-minimal
(copy-file
(car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
"bin/emacs")))))))
- (inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed))
+ (inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed
+ ;; To "unshadow" ld-wrapper in native builds
+ (make-ld-wrapper "ld-wrapper" #:binutils binutils)
+ ;; For native compilation
+ binutils
+ (libc-for-target)
+ libgccjit
+ zlib))
(native-inputs (list autoconf pkg-config texinfo))
(home-page "https://www.gnu.org/software/emacs/")
- (synopsis "The extensible text editor (minimal build for byte-compilation)")
+ (synopsis "The extensible text editor (minimal build for elisp compilation)")
(description
"GNU Emacs is an extensible and highly customizable text editor. It is
based on an Emacs Lisp interpreter with extensions for text editing. Emacs
@@ -346,70 +405,10 @@ (define-public emacs-no-x
(arguments
(substitute-keyword-arguments (package-arguments emacs-minimal)
((#:configure-flags flags #~'())
- #~(cons* "--with-modules" "--with-native-compilation=aot"
- (delete "--with-gnutls=no" #$flags)))
- ((#:phases phases)
- #~(modify-phases #$phases
- (add-after 'set-paths 'set-libgccjit-path
- (lambda* (#:key inputs #:allow-other-keys)
- (define (first-subdirectory/absolute directory)
- (let ((files (scandir
- directory
- (lambda (file)
- (and (not (member file '("." "..")))
- (file-is-directory? (string-append
- directory "/"
- file)))))))
- (and (not (null? files))
- (string-append directory "/" (car files)))))
- (let* ((libgccjit-libdir
- (first-subdirectory/absolute ;; version
- (first-subdirectory/absolute ;; host type
- (search-input-directory inputs "lib/gcc")))))
- (setenv "LIBRARY_PATH"
- (string-append (getenv "LIBRARY_PATH")
- ":" libgccjit-libdir)))))
- (add-after 'unpack 'patch-compilation-driver
- (lambda _
- (substitute* "lisp/emacs-lisp/comp.el"
- (("\\(defcustom native-comp-driver-options nil")
- (format
- #f "(defcustom native-comp-driver-options '(~@{~s~^ ~})"
- (string-append
- "-B" #$(this-package-input "binutils") "/bin/")
- (string-append
- "-B" #$(this-package-input "glibc") "/lib/")
- (string-append
- "-B" #$(this-package-input "libgccjit") "/lib/")
- (string-append
- "-B" #$(this-package-input "libgccjit") "/lib/gcc/"))))))
- (add-after 'build 'build-trampolines
- (lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "trampolines" make-flags)))
- (add-after 'validate-runpath 'validate-comp-integrity
- (lambda* (#:key outputs #:allow-other-keys)
- #$(cond
- ((%current-target-system)
- #~(display "Cannot validate native-comp on cross builds.\n"))
- ((member (%current-system) '("armhf-linux" "i686-linux"))
- #~(display "Integrity test is broken on armhf.\n"))
- (else
- #~(invoke
- (string-append (assoc-ref outputs "out") "/bin/emacs")
- "--batch"
- "--load"
- #$(local-file
- (search-auxiliary-file "emacs/comp-integrity.el"))
- "-f" "ert-run-tests-batch-and-exit")))))))))
+ #~(cons* "--with-modules" (delete "--with-gnutls=no" #$flags)))))
(inputs
(modify-inputs (package-inputs emacs-minimal)
(prepend gnutls
- ;; To "unshadow" ld-wrapper in native builds
- (make-ld-wrapper "ld-wrapper" #:binutils binutils)
- ;; For native compilation
- binutils
- (libc-for-target)
- libgccjit
;; Avoid Emacs's limited movemail substitute that retrieves POP3
;; email only via insecure channels.
@@ -429,8 +428,7 @@ (define-public emacs-no-x
libxml2
m17n-lib
sqlite
- tree-sitter
- zlib)))))
+ tree-sitter)))))
(define-public emacs
(package/inherit emacs-no-x
--
2.48.1
Morgan Smith wrote 1 weeks ago
[PATCH 3/4] guix: emacs-build-system: Add 'lisp-directory' key
(address . 76690@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB3424DD51B7BD1E0E4CC8BC33C5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
* guix/build-system/emacs.scm(emacs-build): Add 'lisp-directory' key.
* guix/build/emacs-build-system.scm(unpack): Change into 'lisp-directory'
after unpacking.

Change-Id: I3991af7188de72b29b1c6985ffe7185216cedb35
---
guix/build-system/emacs.scm | 2 ++
guix/build/emacs-build-system.scm | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)

Toggle diff (46 lines)
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 06eec43ec4..27a029f258 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -87,6 +87,7 @@ (define* (emacs-build name inputs
(test-command ''("make" "check"))
(phases '%standard-phases)
(outputs '("out"))
+ (lisp-directory ".")
(include (quote %default-include))
(exclude (quote %default-exclude))
(search-paths '())
@@ -105,6 +106,7 @@ (define* (emacs-build name inputs
(use-modules #$@(sexp->gexp modules))
(emacs-build #:name #$name
#:source #+source
+ #:lisp-directory #$lisp-directory
#:system #$system
#:test-command #$test-command
#:tests? #$tests?
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index aa083c6409..4e52122f22 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -67,7 +67,7 @@ (define (store-file->elisp-source-file file)
(strip-store-file-name file) suffix))))
(string-append name suffix))))
-(define* (unpack #:key source #:allow-other-keys)
+(define* (unpack #:key source lisp-directory #:allow-other-keys)
"Unpack SOURCE into the build directory. SOURCE may be a compressed
archive, a directory, or an Emacs Lisp file."
(if (string-suffix? ".el" source)
@@ -76,7 +76,9 @@ (define* (unpack #:key source #:allow-other-keys)
(chdir "source")
(copy-file source (store-file->elisp-source-file source))
#t)
- (gnu:unpack #:source source)))
+ (begin
+ (gnu:unpack #:source source)
+ (chdir lisp-directory))))
(define* (expand-load-path #:key (prepend-source? #t) #:allow-other-keys)
"Expand EMACSLOADPATH, so that inputs, whose code resides in subdirectories,
--
2.48.1
Morgan Smith wrote 1 weeks ago
[PATCH 4/4] Use #:lisp-directory instead of a custom phase
(address . 76690@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB342488569BE28C8BA58E6BA6C5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
Using a custom phase might not order the 'chdir' at the correct time and might
cause problems with some of the early phases in the 'emacs-build-system' (like
'ensure-package-description', 'expand-load-path', etc...)

* gnu/packages/agda.scm (emacs-agda2-mode):
* gnu/packages/cmake.scm (emacs-cmake-mode):
* gnu/packages/emacs-xyz.scm (emacs-casual-avy, emacs-casual-calc,
emacs-casual-dired, emacs-casual-info, emacs-chronometrist, emacs-edit-server,
emacs-epkg, emacs-exwm-firefox, emacs-flymake-collection, emacs-forge,
emacs-ghub, emacs-know-your-http-well, emacs-org-contrib, emacs-php-mode,
emacs-stumpwm-mode, emacs-telega-contrib, emacs-transient, emacs-treemacs,
emacs-treemacs-extra, emacs-with-editor, emacs-xenops):
* gnu/packages/engineering.scm (emacs-scad-mode):
* gnu/packages/erlang.scm (emacs-erlang):
* gnu/packages/mail.scm (emacs-notmuch):
* gnu/packages/music.scm (emacs-lilypond-mode):
* gnu/packages/protobuf.scm (emacs-protobuf-mode):
* gnu/packages/scheme.scm (emacs-gerbil-mode):
* gnu/packages/version-control.scm (emacs-stgit): Use '#:lisp-directory'
instead of a custom phase.
---
gnu/packages/agda.scm | 5 +-
gnu/packages/cmake.scm | 7 +-
gnu/packages/emacs-xyz.scm | 144 +++++++++----------------------
gnu/packages/engineering.scm | 8 +-
gnu/packages/erlang.scm | 5 +-
gnu/packages/mail.scm | 6 +-
gnu/packages/music.scm | 5 +-
gnu/packages/protobuf.scm | 5 +-
gnu/packages/scheme.scm | 5 +-
gnu/packages/version-control.scm | 4 +-
10 files changed, 49 insertions(+), 145 deletions(-)

Toggle diff (448 lines)
diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm
index c20549888d..ff23278469 100644
--- a/gnu/packages/agda.scm
+++ b/gnu/packages/agda.scm
@@ -150,10 +150,7 @@ (define-public emacs-agda2-mode
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'enter-elisp-dir
- (lambda _ (chdir "src/data/emacs-mode"))))))
+ #:lisp-directory "src/data/emacs-mode"))
(home-page "https://agda.readthedocs.io/en/latest/tools/emacs-mode.html")
(synopsis "Emacs mode for Agda")
(description "This Emacs mode enables interactive development with
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 1ddcfa4d80..8c1ee61338 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -532,12 +532,7 @@ (define-public emacs-cmake-mode
(outputs '("out"))
(build-system emacs-build-system)
(arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "Auxiliary"))))))
+ (list #:lisp-directory "Auxiliary"))
(synopsis "Emacs major mode for editing Cmake expressions")
(description "@code{cmakeos-mode} provides an Emacs major mode for editing
Cmake files. It supports syntax highlighting, indenting and refilling of
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 272be3a275..9bd0846a55 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1703,11 +1703,9 @@ (define-public emacs-with-editor
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:phases
#~(modify-phases %standard-phases
- (add-before 'install 'enter-lisp-directory
- (lambda _
- (chdir "lisp")))
(add-before 'install 'make-info
(lambda _
(with-directory-excursion "../docs"
@@ -2679,20 +2677,12 @@ (define-public emacs-ghub
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:phases
#~(modify-phases %standard-phases
(add-before 'install 'make-info
(lambda _
- (invoke "make" "info")))
- (add-after 'make-info 'enter-lisp-directory
- (lambda _
- (chdir "lisp")))
- (add-after 'expand-load-path 'add-el-dir-to-emacs-load-path
- (lambda _
- (setenv "EMACSLOADPATH"
- (string-append (getcwd)
- "/lisp:"
- (getenv "EMACSLOADPATH")))))
+ (invoke "make" "--directory=.." "info")))
(add-after 'install 'install-info
(lambda _
(let ((info (string-append #$output "/share/info")))
@@ -3143,12 +3133,10 @@ (define-public emacs-flymake-collection
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "src"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "src")))
- (add-after 'chdir 'move-checkers
+ (add-after 'unpack 'move-checkers
(lambda _
;; Move checkers to the top level, which is in the
;; EMACSLOADPATH.
@@ -5046,12 +5034,12 @@ (define-public emacs-xenops
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
+ (add-after 'unpack 'set-home
(lambda _
- (setenv "HOME" "/tmp")
- (chdir "lisp"))))))
+ (setenv "HOME" "/tmp"))))))
(synopsis "WYSIWYG LaTeX environment")
(description "This package provides a WYSIWYG LaTeX environment.
It uses @command{dvisvgm}, @command{xclip}, @command{pngpaste} and
@@ -5337,12 +5325,9 @@ (define-public emacs-chronometrist
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "elisp"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "elisp")))
(add-after 'install 'install-doc
;; Documentation consists of several Markdown files.
(lambda _
@@ -18593,11 +18578,7 @@ (define-public emacs-org-contrib
(base32 "08m3aa8vsrlkacbvindjwqzviv5r8i9a0vzsrl8rx01xq5b0zd42"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-source-directory
- (lambda _
- (chdir "lisp"))))))
+ (list #:lisp-directory "lisp"))
(propagated-inputs
(list emacs-org))
(home-page "https://git.sr.ht/~bzg/org-contrib")
@@ -20870,6 +20851,7 @@ (define-public emacs-php-mode
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:tests? #true
#:test-command #~(list "emacs" "-Q" "--batch"
"-l" "../tests/php-mode-test.el"
@@ -20879,11 +20861,8 @@ (define-public emacs-php-mode
(add-after 'unpack 'prepare-testing-bed
(lambda _
;; This file is necessary for `php-project-root' test.
- (call-with-output-file "tests/project/1/.git"
- (const #t))))
- (add-after 'prepare-testing-bed 'enter-source-directory
- (lambda _
- (chdir "lisp"))))))
+ (call-with-output-file "../tests/project/1/.git"
+ (const #t)))))))
(propagated-inputs (list emacs-projectile))
(synopsis "Major mode for editing PHP code")
(description
@@ -25026,26 +25005,17 @@ (define-public emacs-epkg
(base32 "0zdlymx44jgrzm68cnh636mpdazihqiakf5m3v1c2rhvh6cb6yg6"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
+ `(#:lisp-directory "lisp"
+ #:phases
(modify-phases %standard-phases
(add-before 'install 'make-info
;; Documentation is located in "docs/".
(lambda* (#:key outputs #:allow-other-keys)
- (with-directory-excursion "docs"
+ (with-directory-excursion "../docs"
(invoke "makeinfo" "-o" "epkg.info" "epkg.texi")
(let ((info (string-append (assoc-ref outputs "out")
"/share/info")))
- (install-file "epkg.info" info)))))
- (add-after 'make-info 'move-to-lisp-directory
- ;; Source code is located in "lisp/".
- (lambda _
- (chdir "lisp")))
- (add-after 'expand-load-path 'add-el-dir-to-emacs-load-path
- (lambda _
- (setenv "EMACSLOADPATH"
- (string-append (getcwd)
- "/lisp:"
- (getenv "EMACSLOADPATH"))))))))
+ (install-file "epkg.info" info))))))))
(native-inputs
(list texinfo))
(propagated-inputs
@@ -26522,12 +26492,7 @@ (define-public emacs-edit-server
(base32 "0m7gj224sqxjjw5sxky92fnrxg9jy4nf33kwf0aqxnfhqlgh545k"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "servers"))))))
+ (list #:lisp-directory "servers"))
(propagated-inputs (list emacs-ert-async))
(home-page "https://github.com/stsquad/emacs_chrome")
(synopsis "Server that responds to edit requests from Chromium")
@@ -27449,20 +27414,17 @@ (define-public emacs-know-your-http-well
(sha256
(base32 "1p4ibx0qgznv8ard4a9m7345ay8ij2qzmqdqiqlllndqq6mz62x5"))))
(arguments
- `(#:phases
+ `(#:lisp-directory "emacs"
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'install-json-files
(lambda* (#:key outputs #:allow-other-keys)
(for-each (lambda (directory)
- (copy-recursively directory
+ (copy-recursively (string-append "../" directory)
(string-append
- (assoc-ref outputs "out")
+ (assoc-ref outputs "out") "/"
directory)))
- '("js" "json"))))
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "emacs"))))))
+ '("js" "json")))))))
(build-system emacs-build-system)
(home-page "https://github.com/for-GET/know-your-http-well")
(synopsis "Meaning of HTTP headers codes")
@@ -28285,12 +28247,7 @@ (define-public emacs-stumpwm-mode
"0giac390bq95ag41xkxqp8jjrhfx1wpgglz7jg5rkm0wjhcwmyml"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "util/swm-emacs"))))))
+ (list #:lisp-directory "util/swm-emacs"))
(home-page "https://github.com/stumpwm/stumpwm-contrib")
(synopsis "Emacs minor-mode for Stumpwm")
(description "Emacs minor-mode for Stumpwm")
@@ -33318,20 +33275,17 @@ (define-public emacs-treemacs
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "src/elisp"
#:tests? #t
#:test-command #~(list "make" "-C" "../.." "test")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-makefile
(lambda _
- (substitute* "Makefile"
+ (substitute* "../../Makefile"
(("@\\$\\(CASK\\) exec ") "")
;; Guix does not need to prepare dependencies before testing.
(("test: prepare") "test:"))))
- (add-after 'fix-makefile 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "src/elisp")))
(add-before 'install 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(make-file-writable "treemacs-core-utils.el")
@@ -33390,7 +33344,7 @@ (define-public emacs-treemacs-extra
(package-arguments emacs-treemacs)
((#:phases phases)
#~(modify-phases #$phases
- (add-after 'chdir-elisp 'copy-extra
+ (add-after 'unpack 'copy-extra
(lambda _
(copy-recursively "../extra" ".")))))))
(propagated-inputs
@@ -33727,16 +33681,14 @@ (define-public emacs-transient
(build-system emacs-build-system)
(arguments
`(#:tests? #f ;no test suite
+ #:lisp-directory "lisp"
#:phases (modify-phases %standard-phases
(add-after 'unpack 'build-info-manual
(lambda _
- (invoke "make" "info")
+ (invoke "make" "--directory=.." "info")
;; Move the info file to lisp so that it gets
;; installed by the emacs-build-system.
- (rename-file "docs/transient.info" "lisp/transient.info")))
- (add-after 'build-info-manual 'enter-lisp-directory
- (lambda _
- (chdir "lisp"))))))
+ (rename-file "../docs/transient.info" "transient.info"))))))
(native-inputs (list texinfo))
(propagated-inputs (list emacs-compat))
(home-page "https://magit.vc/manual/transient")
@@ -33765,17 +33717,15 @@ (define-public emacs-forge
(build-system emacs-build-system)
(arguments
`(#:tests? #f ;no tests
+ #:lisp-directory "lisp"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'build-info-manual
(lambda _
- (invoke "make" "info")
+ (invoke "make" "--directory=.." "info")
;; Move the info file to lisp so that it gets installed by the
;; emacs-build-system.
- (rename-file "docs/forge.info" "lisp/forge.info")))
- (add-after 'build-info-manual 'chdir-lisp
- (lambda _
- (chdir "lisp"))))))
+ (rename-file "../docs/forge.info" "forge.info"))))))
(native-inputs
(list texinfo))
(propagated-inputs
@@ -34358,10 +34308,7 @@ (define-public emacs-exwm-firefox
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))
+ #:lisp-directory "lisp"
#:tests? #true
#:test-command #~(list "emacs" "-Q" "--batch"
"-l" "../test/exwm-firefox--tests.el"
@@ -34962,10 +34909,7 @@ (define-public emacs-casual-avy
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib emacs-avy))
(home-page "https://github.com/kickingvegas/casual-avy")
(synopsis "Transient-based porcelain for avy")
@@ -34989,10 +34933,7 @@ (define-public emacs-casual-calc
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib))
(home-page "https://github.com/kickingvegas/casual-calc")
(synopsis "Transient-based porcelain for calc")
@@ -35016,10 +34957,7 @@ (define-public emacs-casual-dired
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib))
(home-page "https://github.com/kickingvegas/casual-dired")
(synopsis "Transient-based porcelain for Dired")
@@ -35043,10 +34981,7 @@ (define-public emacs-casual-info
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib))
(home-page "https://github.com/kickingvegas/casual-info")
(synopsis "Transient-based porcelain for info reader")
@@ -37641,11 +37576,10 @@ (define-public emacs-telega-contrib
(name "emacs-telega-contrib")
(arguments
(list
+ #:lisp-directory "contrib"
#:exclude #~(list "telega-live-location.el")
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'enter-subdirectory
- (lambda _ (chdir "contrib")))
(add-before 'install-license-files 'leave-subdirectory
(lambda _ (chdir ".."))))))
(inputs '())
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 234f4a2b03..3442705149 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3121,13 +3121,7 @@ (define-public emacs-scad-mode
(inputs '())
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "contrib")
- #t)))))
+ (list #:lisp-directory "contrib"))
(synopsis "Emacs major mode for editing editing OpenSCAD code")
(description "@code{scad-mode} provides an Emacs major mode for editing
OpenSCAD code. It supports syntax highlighting, indenting and refilling of
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 8ca46e8bdc..0d86863c94 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -204,10 +204,7 @@ (define-public emacs-erlang
(source (package-source erlang))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'expand-load-path 'change-working-directory
- (lambda _ (chdir "lib/tools/emacs") #t)))))
+ (list #:lisp-directory "lib/tools/emacs"))
(home-page "https://www.erlang.org/")
(synopsis "Erlang major mode for Emacs")
(description
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index cffbca087a..16763ebd44 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1533,14 +1533,12 @@ (define-public emacs-notmuch
(list notmuch))
(arguments
(list
+ #:lisp-directory "emacs"
#:exclude #~(cons* "make-deps.el" "rstdoc.el" %default-exclude)
#:include #~(cons* "notmuch-logo.svg" %default-include)
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "emacs")))
- (add-after 'chdir 'patch-paths
+ (add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((notmuch (search-input-file inputs "/bin/notmuch")))
(substitute* "notmuch-lib.el"
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index bf47489d34..b8a6a2375f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1759,10 +1759,7 @@ (define-public emacs-lilypond-mode
(build-system emacs-build-system)
(
This message was truncated. Download the full message here.
Liliana Marie Prikler wrote 1 weeks ago
Re: [bug#76690] [PATCH 2/4] gnu: emacs-minimal: Enable native compilations
06be95a10f7210180a36b8a173e36029ece1be9e.camel@gmail.com
Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
Toggle quote (7 lines)
> * gnu/packages/emacs.scm(emacs-no-x): Move native compilation
> settings from
> here to ...
> (emacs-minimal): ... here.
>
> Change-Id: Ib549f0e7435cab0c891bb8d6cec9b1af041ab7c4
> ---
Note: enabling native compilation for emacs-minimal will likely not do
what you think it does. Unless you use emacs-minimal itself as your
emacs (rather than e.g. emacs-no-x), you will not see any benefit from
this patch.

Cheers
Liliana Marie Prikler wrote 1 weeks ago
Re: [bug#76690] [PATCH 1/4] gnu: emacs->emacs-next: Don't use file that doesn't exist
059dfd96182f5e20b1dcd0c722e2f88dcdd4fba3.camel@gmail.com
Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
Toggle quote (6 lines)
> * gnu/packages/emacs.scm(emacs->emacs-next): Remove reference to
> deleted file 'comp-integrity-next.el'.  It will now use the inherited
> phase that refers to an existing file.
>
> Change-Id: Iea026528d2293538ab6d89e02d8d8a2a86fa0f1d
> ---
Nice catch.

Thanks
Liliana Marie Prikler wrote 1 weeks ago
Re: [bug#76690] [PATCH 3/4] guix: emacs-build-system: Add 'lisp-directory' key
0d8a0111db0a2a956b747b03d65f9cba4157b6e8.camel@gmail.com
Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
Toggle quote (55 lines)
> * guix/build-system/emacs.scm(emacs-build): Add 'lisp-directory' key.
> * guix/build/emacs-build-system.scm(unpack): Change into 'lisp-
> directory'
> after unpacking.
>
> Change-Id: I3991af7188de72b29b1c6985ffe7185216cedb35
> ---
>  guix/build-system/emacs.scm       | 2 ++
>  guix/build/emacs-build-system.scm | 6 ++++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/guix/build-system/emacs.scm b/guix/build-
> system/emacs.scm
> index 06eec43ec4..27a029f258 100644
> --- a/guix/build-system/emacs.scm
> +++ b/guix/build-system/emacs.scm
> @@ -87,6 +87,7 @@ (define* (emacs-build name inputs
>                        (test-command ''("make" "check"))
>                        (phases '%standard-phases)
>                        (outputs '("out"))
> +                      (lisp-directory ".")
>                        (include (quote %default-include))
>                        (exclude (quote %default-exclude))
>                        (search-paths '())
> @@ -105,6 +106,7 @@ (define* (emacs-build name inputs
>            (use-modules #$@(sexp->gexp modules))
>            (emacs-build #:name #$name
>                         #:source #+source
> +                       #:lisp-directory #$lisp-directory
>                         #:system #$system
>                         #:test-command #$test-command
>                         #:tests? #$tests?
> diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-
> build-system.scm
> index aa083c6409..4e52122f22 100644
> --- a/guix/build/emacs-build-system.scm
> +++ b/guix/build/emacs-build-system.scm
> @@ -67,7 +67,7 @@ (define (store-file->elisp-source-file file)
>                      (strip-store-file-name file) suffix))))
>        (string-append name suffix))))
>  
> -(define* (unpack #:key source #:allow-other-keys)
> +(define* (unpack #:key source lisp-directory #:allow-other-keys)
>    "Unpack SOURCE into the build directory.  SOURCE may be a
> compressed
>  archive, a directory, or an Emacs Lisp file."
>    (if (string-suffix? ".el" source)
> @@ -76,7 +76,9 @@ (define* (unpack #:key source #:allow-other-keys)
>          (chdir "source")
>          (copy-file source (store-file->elisp-source-file source))
>          #t)
> -      (gnu:unpack #:source source)))
> +      (begin
> +        (gnu:unpack #:source source)
> +        (chdir lisp-directory))))
I would use (and=> lisp-directory chdir) and allow chdir to be #f.

Cheers
Liliana Marie Prikler wrote 1 weeks ago
Re: [bug#76690] [PATCH 4/4] Use #:lisp-directory instead of a custom phase
b47fc47ef680f6b9c65727d1eed1ee3ebb7bdf3c.camel@gmail.com
Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
Toggle quote (28 lines)
> Using a custom phase might not order the 'chdir' at the correct time
> and might
> cause problems with some of the early phases in the 'emacs-build-
> system' (like
> 'ensure-package-description', 'expand-load-path', etc...)
>
> * gnu/packages/agda.scm (emacs-agda2-mode):
> * gnu/packages/cmake.scm (emacs-cmake-mode):
> * gnu/packages/emacs-xyz.scm (emacs-casual-avy, emacs-casual-calc,
> emacs-casual-dired, emacs-casual-info, emacs-chronometrist, emacs-
> edit-server,
> emacs-epkg, emacs-exwm-firefox, emacs-flymake-collection, emacs-
> forge,
> emacs-ghub, emacs-know-your-http-well, emacs-org-contrib, emacs-php-
> mode,
> emacs-stumpwm-mode, emacs-telega-contrib, emacs-transient, emacs-
> treemacs,
> emacs-treemacs-extra, emacs-with-editor, emacs-xenops):
> * gnu/packages/engineering.scm (emacs-scad-mode):
> * gnu/packages/erlang.scm (emacs-erlang):
> * gnu/packages/mail.scm (emacs-notmuch):
> * gnu/packages/music.scm (emacs-lilypond-mode):
> * gnu/packages/protobuf.scm (emacs-protobuf-mode):
> * gnu/packages/scheme.scm (emacs-gerbil-mode):
> * gnu/packages/version-control.scm (emacs-stgit): Use '#:lisp-
> directory'
> instead of a custom phase.
> ---
Note: ChangeLog continuation lines should end with a closing
parenthesis.
Each file should have a message, even if that is "Likewise."

Not sure if one patch is the right approach here. I think one patch
per package might be a better idea.

Cheers
Morgan Smith wrote 1 weeks ago
Re: [bug#76690] [PATCH 2/4] gnu: emacs-minimal: Enable native compilations
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
CH3PR84MB3424B2382FD894C059BD2B1EC5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (13 lines)
> Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
>> * gnu/packages/emacs.scm(emacs-no-x): Move native compilation
>> settings from
>> here to ...
>> (emacs-minimal): ... here.
>>
>> Change-Id: Ib549f0e7435cab0c891bb8d6cec9b1af041ab7c4
>> ---
> Note: enabling native compilation for emacs-minimal will likely not do
> what you think it does. Unless you use emacs-minimal itself as your
> emacs (rather than e.g. emacs-no-x), you will not see any benefit from
> this patch.

emacs-minimal is the default-emacs in the emacs-build-system.
Currently, we disable native-compilation of loaded elisp because we want
to use the ahead-of-time native compilation that occurs when building a
package. However, if we don't build our packages with an emacs that
supports native compilation, then we are effectively disabling the
native compliation feature for all packages.

Toggle quote (2 lines)
>
> Cheers
Morgan Smith wrote 1 weeks ago
Re: [bug#76690] [PATCH 4/4] Use #:lisp-directory instead of a custom phase
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
CH3PR84MB34242A89E8D26C86E87E212AC5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (36 lines)
> Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
>> Using a custom phase might not order the 'chdir' at the correct time
>> and might
>> cause problems with some of the early phases in the 'emacs-build-
>> system' (like
>> 'ensure-package-description', 'expand-load-path', etc...)
>>
>> * gnu/packages/agda.scm (emacs-agda2-mode):
>> * gnu/packages/cmake.scm (emacs-cmake-mode):
>> * gnu/packages/emacs-xyz.scm (emacs-casual-avy, emacs-casual-calc,
>> emacs-casual-dired, emacs-casual-info, emacs-chronometrist, emacs-
>> edit-server,
>> emacs-epkg, emacs-exwm-firefox, emacs-flymake-collection, emacs-
>> forge,
>> emacs-ghub, emacs-know-your-http-well, emacs-org-contrib, emacs-php-
>> mode,
>> emacs-stumpwm-mode, emacs-telega-contrib, emacs-transient, emacs-
>> treemacs,
>> emacs-treemacs-extra, emacs-with-editor, emacs-xenops):
>> * gnu/packages/engineering.scm (emacs-scad-mode):
>> * gnu/packages/erlang.scm (emacs-erlang):
>> * gnu/packages/mail.scm (emacs-notmuch):
>> * gnu/packages/music.scm (emacs-lilypond-mode):
>> * gnu/packages/protobuf.scm (emacs-protobuf-mode):
>> * gnu/packages/scheme.scm (emacs-gerbil-mode):
>> * gnu/packages/version-control.scm (emacs-stgit): Use '#:lisp-
>> directory'
>> instead of a custom phase.
>> ---
> Note: ChangeLog continuation lines should end with a closing
> parenthesis.
> Each file should have a message, even if that is "Likewise."
>
> Not sure if one patch is the right approach here. I think one patch
> per package might be a better idea.

I've attached the relevant patches to this email. Let me know if you'd
rather I use 'git send-email' (and how I should do that without filling
up everyone's inbox).

Toggle quote (4 lines)
>
> I would use (and=> lisp-directory chdir) and allow chdir to be #f.
>

Done! See attached

Toggle quote (1 lines)
> Cheers
From d83841617a4b4583cbd3439e662bed75577593b0 Mon Sep 17 00:00:00 2001
Message-ID: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 14:31:29 -0500
Subject: [PATCH v2 01/31] guix: emacs-build-system: Add 'lisp-directory' key

* guix/build-system/emacs.scm(emacs-build): Add 'lisp-directory' key.
* guix/build/emacs-build-system.scm(unpack): Change into 'lisp-directory'
after unpacking.

Change-Id: I3991af7188de72b29b1c6985ffe7185216cedb35
---
guix/build-system/emacs.scm | 2 ++
guix/build/emacs-build-system.scm | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)

Toggle diff (50 lines)
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 06eec43ec4..f5b2cec445 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -87,6 +87,7 @@ (define* (emacs-build name inputs
(test-command ''("make" "check"))
(phases '%standard-phases)
(outputs '("out"))
+ (lisp-directory #f)
(include (quote %default-include))
(exclude (quote %default-exclude))
(search-paths '())
@@ -105,6 +106,7 @@ (define* (emacs-build name inputs
(use-modules #$@(sexp->gexp modules))
(emacs-build #:name #$name
#:source #+source
+ #:lisp-directory #$lisp-directory
#:system #$system
#:test-command #$test-command
#:tests? #$tests?
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index aa083c6409..d2cf08c4d4 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -67,7 +67,7 @@ (define (store-file->elisp-source-file file)
(strip-store-file-name file) suffix))))
(string-append name suffix))))
-(define* (unpack #:key source #:allow-other-keys)
+(define* (unpack #:key source lisp-directory #:allow-other-keys)
"Unpack SOURCE into the build directory. SOURCE may be a compressed
archive, a directory, or an Emacs Lisp file."
(if (string-suffix? ".el" source)
@@ -76,7 +76,9 @@ (define* (unpack #:key source #:allow-other-keys)
(chdir "source")
(copy-file source (store-file->elisp-source-file source))
#t)
- (gnu:unpack #:source source)))
+ (begin
+ (gnu:unpack #:source source)
+ (and=> lisp-directory chdir))))
(define* (expand-load-path #:key (prepend-source? #t) #:allow-other-keys)
"Expand EMACSLOADPATH, so that inputs, whose code resides in subdirectories,

base-commit: 725917beddf8454f92d01de7a3cfcc283100f43b
prerequisite-patch-id: b74e1301201f7e4a2c31e98ad1be38f8c22d6d36
prerequisite-patch-id: 1fc8f754851e8b0bcc1a2f3dd2fe898afc9a7736
--
2.48.1
From 04e003bc1e853fefc4c917a3161d8bb33cf9233a Mon Sep 17 00:00:00 2001
Message-ID: <04e003bc1e853fefc4c917a3161d8bb33cf9233a.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:11 -0500
Subject: [PATCH v2 02/31] gnu: emacs-agda2-mode: Use '#:lisp-directory'.

* gnu/packages/agda.scm (emacs-agda2-mode): Use '#:lisp-directory'.

Change-Id: I8840159c4780d9bcc2e5e13615c353a3836cae10
---
gnu/packages/agda.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm
index c20549888d..ff23278469 100644
--- a/gnu/packages/agda.scm
+++ b/gnu/packages/agda.scm
@@ -150,10 +150,7 @@ (define-public emacs-agda2-mode
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'enter-elisp-dir
- (lambda _ (chdir "src/data/emacs-mode"))))))
+ #:lisp-directory "src/data/emacs-mode"))
(home-page "https://agda.readthedocs.io/en/latest/tools/emacs-mode.html")
(synopsis "Emacs mode for Agda")
(description "This Emacs mode enables interactive development with
--
2.48.1
From 4949dfe27feff34e9b43b02709879c8baff0df5b Mon Sep 17 00:00:00 2001
Message-ID: <4949dfe27feff34e9b43b02709879c8baff0df5b.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:11 -0500
Subject: [PATCH v2 03/31] gnu: emacs-cmake-mode: Use '#:lisp-directory'.

* gnu/packages/cmake.scm (emacs-cmake-mode): Use '#:lisp-directory'.

Change-Id: I09668b4377f524e16d9c3e2696893b3e775f634b
---
gnu/packages/cmake.scm | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 1ddcfa4d80..8c1ee61338 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -532,12 +532,7 @@ (define-public emacs-cmake-mode
(outputs '("out"))
(build-system emacs-build-system)
(arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "Auxiliary"))))))
+ (list #:lisp-directory "Auxiliary"))
(synopsis "Emacs major mode for editing Cmake expressions")
(description "@code{cmakeos-mode} provides an Emacs major mode for editing
Cmake files. It supports syntax highlighting, indenting and refilling of
--
2.48.1
From d639f3a44c3cfd395d7de0485bfd13a63bf8220c Mon Sep 17 00:00:00 2001
Message-ID: <d639f3a44c3cfd395d7de0485bfd13a63bf8220c.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:11 -0500
Subject: [PATCH v2 04/31] gnu: emacs-with-editor: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-with-editor): Use
'#:lisp-directory'.

Change-Id: Ia559ab6b003981faca27bf8f502e320ef5032555
---
gnu/packages/emacs-xyz.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 272be3a275..919c52592a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1703,11 +1703,9 @@ (define-public emacs-with-editor
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:phases
#~(modify-phases %standard-phases
- (add-before 'install 'enter-lisp-directory
- (lambda _
- (chdir "lisp")))
(add-before 'install 'make-info
(lambda _
(with-directory-excursion "../docs"
--
2.48.1
From 5c3d1002306b7051acc912b66012eb1768569981 Mon Sep 17 00:00:00 2001
Message-ID: <5c3d1002306b7051acc912b66012eb1768569981.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:11 -0500
Subject: [PATCH v2 05/31] gnu: emacs-ghub: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-ghub): Use '#:lisp-directory'.

Change-Id: I07b7a94e5eadd64e6ce6813ff1d080b116b285e3
---
gnu/packages/emacs-xyz.scm | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 919c52592a..e4b06f2214 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -2677,20 +2677,12 @@ (define-public emacs-ghub
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:phases
#~(modify-phases %standard-phases
(add-before 'install 'make-info
(lambda _
- (invoke "make" "info")))
- (add-after 'make-info 'enter-lisp-directory
- (lambda _
- (chdir "lisp")))
- (add-after 'expand-load-path 'add-el-dir-to-emacs-load-path
- (lambda _
- (setenv "EMACSLOADPATH"
- (string-append (getcwd)
- "/lisp:"
- (getenv "EMACSLOADPATH")))))
+ (invoke "make" "--directory=.." "info")))
(add-after 'install 'install-info
(lambda _
(let ((info (string-append #$output "/share/info")))
--
2.48.1
From 8c7bc3e7f5b9514633ff45538ea529d92b51da4c Mon Sep 17 00:00:00 2001
Message-ID: <8c7bc3e7f5b9514633ff45538ea529d92b51da4c.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:12 -0500
Subject: [PATCH v2 06/31] gnu: emacs-flymake-collection: Use
'#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-flymake-collection): Use
'#:lisp-directory'.

Change-Id: I4a7355cf663ac4f43438d877ff3417e243ff621a
---
gnu/packages/emacs-xyz.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e4b06f2214..b4f0bb9134 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3133,12 +3133,10 @@ (define-public emacs-flymake-collection
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "src"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "src")))
- (add-after 'chdir 'move-checkers
+ (add-after 'unpack 'move-checkers
(lambda _
;; Move checkers to the top level, which is in the
;; EMACSLOADPATH.
--
2.48.1
From af756658c2300416f6ba0ce3f528373b318b2169 Mon Sep 17 00:00:00 2001
Message-ID: <af756658c2300416f6ba0ce3f528373b318b2169.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:12 -0500
Subject: [PATCH v2 07/31] gnu: emacs-xenops: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-xenops): Use '#:lisp-directory'.

Change-Id: I3ea4e620f5fb96a1ad4f7cd7c47233fd113edb44
---
gnu/packages/emacs-xyz.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index b4f0bb9134..161a23ee0c 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5034,12 +5034,12 @@ (define-public emacs-xenops
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
+ (add-after 'unpack 'set-home
(lambda _
- (setenv "HOME" "/tmp")
- (chdir "lisp"))))))
+ (setenv "HOME" "/tmp"))))))
(synopsis "WYSIWYG LaTeX environment")
(description "This package provides a WYSIWYG LaTeX environment.
It uses @command{dvisvgm}, @command{xclip}, @command{pngpaste} and
--
2.48.1
From b601dba1ed3eb1dbbba706a7646734e26da39dde Mon Sep 17 00:00:00 2001
Message-ID: <b601dba1ed3eb1dbbba706a7646734e26da39dde.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:12 -0500
Subject: [PATCH v2 08/31] gnu: emacs-chronometrist: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-chronometrist): Use
'#:lisp-directory'.

Change-Id: Ieb241549460a4fee0764bc30951f0c40d8bde1c9
---
gnu/packages/emacs-xyz.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 161a23ee0c..ea3c4e41c5 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5325,12 +5325,9 @@ (define-public emacs-chronometrist
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "elisp"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "elisp")))
(add-after 'install 'install-doc
;; Documentation consists of several Markdown files.
(lambda _
--
2.48.1
From e0d359dd35ee508e26dfdae7ff9dd3df6f6c7d5d Mon Sep 17 00:00:00 2001
Message-ID: <e0d359dd35ee508e26dfdae7ff9dd3df6f6c7d5d.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:12 -0500
Subject: [PATCH v2 09/31] gnu: emacs-org-contrib: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-org-contrib): Use
'#:lisp-directory'.

Change-Id: I9d489850ced426676849e33e33fe7e3f8eb3426e
---
gnu/packages/emacs-xyz.scm | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ea3c4e41c5..7adff140ad 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -18578,11 +18578,7 @@ (define-public emacs-org-contrib
(base32 "08m3aa8vsrlkacbvindjwqzviv5r8i9a0vzsrl8rx01xq5b0zd42"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-source-directory
- (lambda _
- (chdir "lisp"))))))
+ (list #:lisp-directory "lisp"))
(propagated-inputs
(list emacs-org))
(home-page "https://git.sr.ht/~bzg/org-contrib")
--
2.48.1
From 0bc121a8e0743c3c2523ff1fbea47f680e007f1c Mon Sep 17 00:00:00 2001
Message-ID: <0bc121a8e0743c3c2523ff1fbea47f680e007f1c.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:12 -0500
Subject: [PATCH v2 10/31] gnu: emacs-php-mode: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-php-mode): Use '#:lisp-directory'.

Change-Id: Ifdd056e0e380697df277ec7c6791c6730704c78a
---
gnu/packages/emacs-xyz.scm | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7adff140ad..5d05221d1b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20851,6 +20851,7 @@ (define-public emacs-php-mode
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "lisp"
#:tests? #true
#:test-command #~(list "emacs" "-Q" "--batch"
"-l" "../tests/php-mode-test.el"
@@ -20860,11 +20861,8 @@ (define-public emacs-php-mode
(add-after 'unpack 'prepare-testing-bed
(lambda _
;; This file is necessary for `php-project-root' test.
- (call-with-output-file "tests/project/1/.git"
- (const #t))))
- (add-after 'prepare-testing-bed 'enter-source-directory
- (lambda _
- (chdir "lisp"))))))
+ (call-with-output-file "../tests/project/1/.git"
+ (const #t)))))))
(propagated-inputs (list emacs-projectile))
(synopsis "Major mode for editing PHP code")
(description
--
2.48.1
From 9ff30ff8ca38ceda1f79408ad057367c4b198292 Mon Sep 17 00:00:00 2001
Message-ID: <9ff30ff8ca38ceda1f79408ad057367c4b198292.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:13 -0500
Subject: [PATCH v2 11/31] gnu: emacs-epkg: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-epkg): Use '#:lisp-directory'.

Change-Id: If7ccb4a86e5104993ba4dcaae8c03cb8ee57713d
---
gnu/packages/emacs-xyz.scm | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 5d05221d1b..85b39ac59e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -25005,26 +25005,17 @@ (define-public emacs-epkg
(base32 "0zdlymx44jgrzm68cnh636mpdazihqiakf5m3v1c2rhvh6cb6yg6"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
+ `(#:lisp-directory "lisp"
+ #:phases
(modify-phases %standard-phases
(add-before 'install 'make-info
;; Documentation is located in "docs/".
(lambda* (#:key outputs #:allow-other-keys)
- (with-directory-excursion "docs"
+ (with-directory-excursion "../docs"
(invoke "makeinfo" "-o" "epkg.info" "epkg.texi")
(let ((info (string-append (assoc-ref outputs "out")
"/share/info")))
- (install-file "epkg.info" info)))))
- (add-after 'make-info 'move-to-lisp-directory
- ;; Source code is located in "lisp/".
- (lambda _
- (chdir "lisp")))
- (add-after 'expand-load-path 'add-el-dir-to-emacs-load-path
- (lambda _
- (setenv "EMACSLOADPATH"
- (string-append (getcwd)
- "/lisp:"
- (getenv "EMACSLOADPATH"))))))))
+ (install-file "epkg.info" info))))))))
(native-inputs
(list texinfo))
(propagated-inputs
--
2.48.1
From c4a2f6f2531bf432ef261f1cff64d15e02d0d4ae Mon Sep 17 00:00:00 2001
Message-ID: <c4a2f6f2531bf432ef261f1cff64d15e02d0d4ae.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:13 -0500
Subject: [PATCH v2 12/31] gnu: emacs-edit-server: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-edit-server): Use
'#:lisp-directory'.

Change-Id: Id7538c97bb4f919f3f81c8e5f11f9356716607f7
---
gnu/packages/emacs-xyz.scm | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 85b39ac59e..e81f34ebe3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -26492,12 +26492,7 @@ (define-public emacs-edit-server
(base32 "0m7gj224sqxjjw5sxky92fnrxg9jy4nf33kwf0aqxnfhqlgh545k"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "servers"))))))
+ (list #:lisp-directory "servers"))
(propagated-inputs (list emacs-ert-async))
(home-page "https://github.com/stsquad/emacs_chrome")
(synopsis "Server that responds to edit requests from Chromium")
--
2.48.1
From 72bfad24eec8b529a21123008a5391edec4e1680 Mon Sep 17 00:00:00 2001
Message-ID: <72bfad24eec8b529a21123008a5391edec4e1680.1740953814.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:13 -0500
Subject: [PATCH v2 13/31] gnu: emacs-know-your-http-well: Use
'#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-know-your-http-well): Use
'#:lisp-directory'.

Change-Id: I401730ca43726880edf2e67e21fbc21455197587
---
gnu/packages/emacs-xyz.scm | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e81f34ebe3..98d9a2f2a7 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27414,20 +27414,17 @@ (define-public emacs-know-your-http-well
(sha256
(base32 "1p4ibx0qgznv8ard4a9m7345ay8ij2qzmqdqiqlllndqq6mz62x5"))))
(arguments
- `(#:phases
+ `(#:lisp-directory "emacs"
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'install-json-files
(lambda* (#:key outputs #:allow-other-keys)
(for-each (lambda (directory)
- (copy-recursively directory
+ (copy-recursively (string-append "../" directory)
(string-append
- (assoc-ref outputs "out")
+ (assoc-ref outputs "out") "/"
directory)))
- '("js" "json"))))
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "emacs"))))))
+ '("js" "json")))))))
(build-system emacs-build-system)
(home-page "https://github.com/for-GET/know-your-http-well")
(synopsis "Meaning of HTTP headers codes")
--
2.48.1
From 33034afcb79a30b5b2e89e2732decbb637544a1d Mon Sep 17 00:00:00 2001
Message-ID: <33034afcb79a30b5b2e89e2732decbb637544a1d.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:13 -0500
Subject: [PATCH v2 14/31] gnu: emacs-stumpwm-mode: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-stumpwm-mode): Use
'#:lisp-directory'.

Change-Id: Id13b77f343b2edde7ca8a730e970273e80f58a1a
---
gnu/packages/emacs-xyz.scm | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 98d9a2f2a7..cf25871ecb 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -28247,12 +28247,7 @@ (define-public emacs-stumpwm-mode
"0giac390bq95ag41xkxqp8jjrhfx1wpgglz7jg5rkm0wjhcwmyml"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "util/swm-emacs"))))))
+ (list #:lisp-directory "util/swm-emacs"))
(home-page "https://github.com/stumpwm/stumpwm-contrib")
(synopsis "Emacs minor-mode for Stumpwm")
(description "Emacs minor-mode for Stumpwm")
--
2.48.1
From f733493570fa24c1287eeaf1de6fae4881c58e44 Mon Sep 17 00:00:00 2001
Message-ID: <f733493570fa24c1287eeaf1de6fae4881c58e44.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:14 -0500
Subject: [PATCH v2 15/31] gnu: emacs-treemacs: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-treemacs): Use '#:lisp-directory'.

Change-Id: I1e7803f35fde714d9590b63b0ef6ce1ed5d1643e
---
gnu/packages/emacs-xyz.scm | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index cf25871ecb..504177e41a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -33275,20 +33275,17 @@ (define-public emacs-treemacs
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "src/elisp"
#:tests? #t
#:test-command #~(list "make" "-C" "../.." "test")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-makefile
(lambda _
- (substitute* "Makefile"
+ (substitute* "../../Makefile"
(("@\\$\\(CASK\\) exec ") "")
;; Guix does not need to prepare dependencies before testing.
(("test: prepare") "test:"))))
- (add-after 'fix-makefile 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "src/elisp")))
(add-before 'install 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(make-file-writable "treemacs-core-utils.el")
--
2.48.1
From cafd2dde3a25bcd9647a941653f58c8989872619 Mon Sep 17 00:00:00 2001
Message-ID: <cafd2dde3a25bcd9647a941653f58c8989872619.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:14 -0500
Subject: [PATCH v2 16/31] gnu: emacs-treemacs-extra: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-treemacs-extra): Use
'#:lisp-directory'.

Change-Id: I1e03a7d2feb03e6f0a5634c9dee06d45d152391d
---
gnu/packages/emacs-xyz.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 504177e41a..e440827dc1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -33344,7 +33344,7 @@ (define-public emacs-treemacs-extra
(package-arguments emacs-treemacs)
((#:phases phases)
#~(modify-phases #$phases
- (add-after 'chdir-elisp 'copy-extra
+ (add-after 'unpack 'copy-extra
(lambda _
(copy-recursively "../extra" ".")))))))
(propagated-inputs
--
2.48.1
From d1fc6844b9f37bff8cd42ec25c6b7e4100b9f032 Mon Sep 17 00:00:00 2001
Message-ID: <d1fc6844b9f37bff8cd42ec25c6b7e4100b9f032.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:14 -0500
Subject: [PATCH v2 17/31] gnu: emacs-transient: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-transient): Use '#:lisp-directory'.

Change-Id: I6ad22a39e7a6e778e8d77c79230419befd65427f
---
gnu/packages/emacs-xyz.scm | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e440827dc1..7ef2d28a0e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -33681,16 +33681,14 @@ (define-public emacs-transient
(build-system emacs-build-system)
(arguments
`(#:tests? #f ;no test suite
+ #:lisp-directory "lisp"
#:phases (modify-phases %standard-phases
(add-after 'unpack 'build-info-manual
(lambda _
- (invoke "make" "info")
+ (invoke "make" "--directory=.." "info")
;; Move the info file to lisp so that it gets
;; installed by the emacs-build-system.
- (rename-file "docs/transient.info" "lisp/transient.info")))
- (add-after 'build-info-manual 'enter-lisp-directory
- (lambda _
- (chdir "lisp"))))))
+ (rename-file "../docs/transient.info" "transient.info"))))))
(native-inputs (list texinfo))
(propagated-inputs (list emacs-compat))
(home-page "https://magit.vc/manual/transient")
--
2.48.1
From c50ce3902456a09a47c2fadffa66ff2dcd1fb281 Mon Sep 17 00:00:00 2001
Message-ID: <c50ce3902456a09a47c2fadffa66ff2dcd1fb281.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:14 -0500
Subject: [PATCH v2 18/31] gnu: emacs-forge: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-forge): Use '#:lisp-directory'.

Change-Id: I8d5bda9cff4122e54fad0a41846f532aabb9b7fc
---
gnu/packages/emacs-xyz.scm | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7ef2d28a0e..d8b43418fa 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -33717,17 +33717,15 @@ (define-public emacs-forge
(build-system emacs-build-system)
(arguments
`(#:tests? #f ;no tests
+ #:lisp-directory "lisp"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'build-info-manual
(lambda _
- (invoke "make" "info")
+ (invoke "make" "--directory=.." "info")
;; Move the info file to lisp so that it gets installed by the
;; emacs-build-system.
- (rename-file "docs/forge.info" "lisp/forge.info")))
- (add-after 'build-info-manual 'chdir-lisp
- (lambda _
- (chdir "lisp"))))))
+ (rename-file "../docs/forge.info" "forge.info"))))))
(native-inputs
(list texinfo))
(propagated-inputs
--
2.48.1
From 0354648d3438927188c43f156d5df57211bdbe1f Mon Sep 17 00:00:00 2001
Message-ID: <0354648d3438927188c43f156d5df57211bdbe1f.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:14 -0500
Subject: [PATCH v2 19/31] gnu: emacs-exwm-firefox: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-exwm-firefox): Use
'#:lisp-directory'.

Change-Id: I5d2e4739b8a8f51fcc8e3fc4ea6b4233635a5e57
---
gnu/packages/emacs-xyz.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index d8b43418fa..c87ca49d45 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -34308,10 +34308,7 @@ (define-public emacs-exwm-firefox
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))
+ #:lisp-directory "lisp"
#:tests? #true
#:test-command #~(list "emacs" "-Q" "--batch"
"-l" "../test/exwm-firefox--tests.el"
--
2.48.1
From c269e1b8c466e0950e43398f1889d14b99277ef4 Mon Sep 17 00:00:00 2001
Message-ID: <c269e1b8c466e0950e43398f1889d14b99277ef4.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:15 -0500
Subject: [PATCH v2 20/31] gnu: emacs-casual-avy: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-casual-avy): Use '#:lisp-directory'.

Change-Id: Ibc306ede41f52e4b9a7240f16d5ea4c67daa965b
---
gnu/packages/emacs-xyz.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index c87ca49d45..edceef213d 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -34909,10 +34909,7 @@ (define-public emacs-casual-avy
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib emacs-avy))
(home-page "https://github.com/kickingvegas/casual-avy")
(synopsis "Transient-based porcelain for avy")
--
2.48.1
From ad1f2fb203690e4639a5f7854e98369c4105d881 Mon Sep 17 00:00:00 2001
Message-ID: <ad1f2fb203690e4639a5f7854e98369c4105d881.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:15 -0500
Subject: [PATCH v2 21/31] gnu: emacs-casual-calc: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-casual-calc): Use
'#:lisp-directory'.

Change-Id: Ib823c05f173afe86b4443716dad9b2c0d4c7d8d1
---
gnu/packages/emacs-xyz.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index edceef213d..0805d5d76a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -34933,10 +34933,7 @@ (define-public emacs-casual-calc
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib))
(home-page "https://github.com/kickingvegas/casual-calc")
(synopsis "Transient-based porcelain for calc")
--
2.48.1
From e4fcd4d14d7ac11b7716f09ed1f3a0afe7dfe64a Mon Sep 17 00:00:00 2001
Message-ID: <e4fcd4d14d7ac11b7716f09ed1f3a0afe7dfe64a.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:15 -0500
Subject: [PATCH v2 22/31] gnu: emacs-casual-dired: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-casual-dired): Use
'#:lisp-directory'.

Change-Id: I84b9d957b6523286bdedb1e457b9767491188088
---
gnu/packages/emacs-xyz.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0805d5d76a..7d615202a3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -34957,10 +34957,7 @@ (define-public emacs-casual-dired
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib))
(home-page "https://github.com/kickingvegas/casual-dired")
(synopsis "Transient-based porcelain for Dired")
--
2.48.1
From 166eb4b9fd751925c88d0880443a97ae4fe9daa7 Mon Sep 17 00:00:00 2001
Message-ID: <166eb4b9fd751925c88d0880443a97ae4fe9daa7.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:15 -0500
Subject: [PATCH v2 23/31] gnu: emacs-casual-info: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-casual-info): Use
'#:lisp-directory'.

Change-Id: I99a5ce0498b20ac9144843bae363a95a415d8601
---
gnu/packages/emacs-xyz.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7d615202a3..8bf774c976 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -34981,10 +34981,7 @@ (define-public emacs-casual-info
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _ (chdir "lisp"))))))
+ #:lisp-directory "lisp"))
(propagated-inputs (list emacs-casual-lib))
(home-page "https://github.com/kickingvegas/casual-info")
(synopsis "Transient-based porcelain for info reader")
--
2.48.1
From 5c1b3fd5529dc0501872b87154597f6205135dfc Mon Sep 17 00:00:00 2001
Message-ID: <5c1b3fd5529dc0501872b87154597f6205135dfc.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:16 -0500
Subject: [PATCH v2 24/31] gnu: emacs-telega-contrib: Use '#:lisp-directory'.

* gnu/packages/emacs-xyz.scm (emacs-telega-contrib): Use
'#:lisp-directory'.

Change-Id: I5386c33e365a011019b0a9b004beb87512b68495
---
gnu/packages/emacs-xyz.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8bf774c976..9bd0846a55 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -37576,11 +37576,10 @@ (define-public emacs-telega-contrib
(name "emacs-telega-contrib")
(arguments
(list
+ #:lisp-directory "contrib"
#:exclude #~(list "telega-live-location.el")
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'enter-subdirectory
- (lambda _ (chdir "contrib")))
(add-before 'install-license-files 'leave-subdirectory
(lambda _ (chdir ".."))))))
(inputs '())
--
2.48.1
From dbc233a311e0476cff07e51df9fd870f60813a2e Mon Sep 17 00:00:00 2001
Message-ID: <dbc233a311e0476cff07e51df9fd870f60813a2e.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:16 -0500
Subject: [PATCH v2 25/31] gnu: emacs-scad-mode: Use '#:lisp-directory'.

* gnu/packages/engineering.scm (emacs-scad-mode): Use
'#:lisp-directory'.

Change-Id: Ifc4257992edcfcca523d6b4a78f6bca41d614b53
---
gnu/packages/engineering.scm | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 234f4a2b03..3442705149 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3121,13 +3121,7 @@ (define-public emacs-scad-mode
(inputs '())
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir-elisp
- ;; Elisp directory is not in root of the source.
- (lambda _
- (chdir "contrib")
- #t)))))
+ (list #:lisp-directory "contrib"))
(synopsis "Emacs major mode for editing editing OpenSCAD code")
(description "@code{scad-mode} provides an Emacs major mode for editing
OpenSCAD code. It supports syntax highlighting, indenting and refilling of
--
2.48.1
From d04b4a8595e5438bf51f95f79d61ebcbf6ce56fd Mon Sep 17 00:00:00 2001
Message-ID: <d04b4a8595e5438bf51f95f79d61ebcbf6ce56fd.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:16 -0500
Subject: [PATCH v2 26/31] gnu: emacs-erlang: Use '#:lisp-directory'.

* gnu/packages/erlang.scm (emacs-erlang): Use '#:lisp-directory'.

Change-Id: I8740df89586a8718c003e409b0db6cc5c60d99a2
---
gnu/packages/erlang.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 8ca46e8bdc..0d86863c94 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -204,10 +204,7 @@ (define-public emacs-erlang
(source (package-source erlang))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'expand-load-path 'change-working-directory
- (lambda _ (chdir "lib/tools/emacs") #t)))))
+ (list #:lisp-directory "lib/tools/emacs"))
(home-page "https://www.erlang.org/")
(synopsis "Erlang major mode for Emacs")
(description
--
2.48.1
From 737fcee2882be2bb4db04fcffcd41cf74e528c41 Mon Sep 17 00:00:00 2001
Message-ID: <737fcee2882be2bb4db04fcffcd41cf74e528c41.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:16 -0500
Subject: [PATCH v2 27/31] gnu: emacs-notmuch: Use '#:lisp-directory'.

* gnu/packages/mail.scm (emacs-notmuch): Use '#:lisp-directory'.

Change-Id: I7cfdf87f368c979bc076adc6a7ecad08886a2bb9
---
gnu/packages/mail.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index cffbca087a..16763ebd44 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1533,14 +1533,12 @@ (define-public emacs-notmuch
(list notmuch))
(arguments
(list
+ #:lisp-directory "emacs"
#:exclude #~(cons* "make-deps.el" "rstdoc.el" %default-exclude)
#:include #~(cons* "notmuch-logo.svg" %default-include)
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "emacs")))
- (add-after 'chdir 'patch-paths
+ (add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((notmuch (search-input-file inputs "/bin/notmuch")))
(substitute* "notmuch-lib.el"
--
2.48.1
From d5867ac4ab5b629447f784ff1844726cbdbc5867 Mon Sep 17 00:00:00 2001
Message-ID: <d5867ac4ab5b629447f784ff1844726cbdbc5867.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:16 -0500
Subject: [PATCH v2 28/31] gnu: emacs-lilypond-mode: Use '#:lisp-directory'.

* gnu/packages/music.scm (emacs-lilypond-mode): Use '#:lisp-directory'.

Change-Id: I9c81488d386e70689165d160b255c4db5d420cf5
---
gnu/packages/music.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index bf47489d34..b8a6a2375f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1759,10 +1759,7 @@ (define-public emacs-lilypond-mode
(build-system emacs-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (add-before 'expand-load-path 'change-working-directory
- (lambda _ (chdir "elisp"))))))
+ #:lisp-directory "elisp"))
(home-page (package-home-page lilypond))
(synopsis "Major mode for editing GNU LilyPond music scores")
(description
--
2.48.1
From c2694284c6ad217f40ef35b64709e9d7b9a4da40 Mon Sep 17 00:00:00 2001
Message-ID: <c2694284c6ad217f40ef35b64709e9d7b9a4da40.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:16 -0500
Subject: [PATCH v2 29/31] gnu: emacs-protobuf-mode: Use '#:lisp-directory'.

* gnu/packages/protobuf.scm (emacs-protobuf-mode): Use
'#:lisp-directory'.

Change-Id: If9b39106954fa66b64ef333def79989a61ac0e68
---
gnu/packages/protobuf.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index d4b48e585b..310fd1dde0 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -579,10 +579,7 @@ (define-public emacs-protobuf-mode
(source (package-source protobuf))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'expand-load-path 'change-working-directory
- (lambda _ (chdir "editors") #t)))))
+ (list #:lisp-directory "editors"))
(home-page "https://github.com/protocolbuffers/protobuf")
(synopsis "Protocol buffers major mode for Emacs")
(description
--
2.48.1
From 1c5a643145630641436e7e3804c9847f1830a88d Mon Sep 17 00:00:00 2001
Message-ID: <1c5a643145630641436e7e3804c9847f1830a88d.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:17 -0500
Subject: [PATCH v2 30/31] gnu: emacs-gerbil-mode: Use '#:lisp-directory'.

* gnu/packages/scheme.scm (emacs-gerbil-mode): Use '#:lisp-directory'.

Change-Id: If6d2721b6a0124fa65e4f6eb59489c18d3f6fbf8
---
gnu/packages/scheme.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 811f74e6d6..8340198135 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -1346,10 +1346,7 @@ (define-public emacs-gerbil-mode
(version "1.0")
(build-system emacs-build-system)
(arguments
- (list #:phases #~(modify-phases %standard-phases
- (add-before 'install 'change-directory
- (lambda _
- (chdir "etc"))))))
+ (list #:lisp-directory "etc"))
(synopsis "Emacs major-mode for editing Gerbil code")
(description
"Gerbil mode provides font-lock, indentation, navigation, and REPL for
--
2.48.1
From afe7b9102706ae94041658ff01ec125ddb9a920a Mon Sep 17 00:00:00 2001
Message-ID: <afe7b9102706ae94041658ff01ec125ddb9a920a.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:17 -0500
Subject: [PATCH v2 31/31] gnu: emacs-stgit: Use '#:lisp-directory'.

* gnu/packages/version-control.scm (emacs-stgit): Use
'#:lisp-directory'.

Change-Id: Ib8367e7822a4a17190552164cb7fa2ffcfd918bf
---
gnu/packages/version-control.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9ecb5cf98a..068b7f41d5 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2170,11 +2170,9 @@ (define-public emacs-stgit
(build-system emacs-build-system)
(arguments
(list
+ #:lisp-directory "contrib"
#:phases
#~(modify-phases %standard-phases
- (add-before 'install 'enter-lisp-directory
- (lambda _
- (chdir "contrib")))
(add-before 'install-license-files 'leave-lisp-directory
(lambda _
(chdir ".."))))))
--
2.48.1
Liliana Marie Prikler wrote 1 weeks ago
Re: [bug#76690] [PATCH 2/4] gnu: emacs-minimal: Enable native compilations
(name . Morgan Smith)(address . morgan.j.smith@outlook.com)
f498f47129c64e3780a0e6a9b13a0ee0e1fb6e89.camel@gmail.com
Am Sonntag, dem 02.03.2025 um 16:51 -0500 schrieb Morgan Smith:
Toggle quote (20 lines)
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
> > > * gnu/packages/emacs.scm(emacs-no-x): Move native compilation
> > > settings from here to ...
> > > (emacs-minimal): ... here.
> > >
> > > Change-Id: Ib549f0e7435cab0c891bb8d6cec9b1af041ab7c4
> > > ---
> > Note: enabling native compilation for emacs-minimal will likely not
> > do what you think it does.  Unless you use emacs-minimal itself as
> > your emacs (rather than e.g. emacs-no-x), you will not see any
> > benefit from this patch.
>
> emacs-minimal is the default-emacs in the emacs-build-system.
> Currently, we disable native-compilation of loaded elisp because we
> want to use the ahead-of-time native compilation that occurs when
> building a package.  However, if we don't build our packages with an
> emacs that supports native compilation, then we are effectively
> disabling the native compliation feature for all packages.
Yeah, as I thought, you're overestimating the benefits of this patch.
Natively compiled Emacs packages are incompatible across variants, so
your emacs-minimal AOT'd package won't work with emacs, emacs-pgtk or
emacs-next.

Cheers
Maxim Cournoyer wrote 1 weeks ago
Re: [bug#76690] [PATCH emacs-team 0/4] Emacs build fixes + enable native comp by default?
(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
87tt89ejo7.fsf@gmail.com
Hi Morgan,

Morgan Smith <Morgan.J.Smith@outlook.com> writes:

Thanks for working on this!

[...]

Toggle quote (6 lines)
> 2. Maybe involves a discussion. Upstream has enabled native compilation by
> default so it'd be nice for us to do the same. However, this bumps the
> closure size of emacs-minimal up by 500MiB which is substantial. It also
> increases compile time of both emacs-minimal and now all emacs packages
> substantially.

I think following the default behavior makes most sense here; otherwise
we'll have many users wondering why it's not enabled by default and how
to do so.

The time to build packages is not a big concern. As for the size of
emacs-minimal; that's a bit unfortunate, but one could argue that
'emacs-minimal' is an oxymoron to start with ;-).

--
Thanks,
Maxim
Maxim Cournoyer wrote 1 weeks ago
Re: [bug#76690] [PATCH 4/4] Use #:lisp-directory instead of a custom phase
(name . Morgan Smith)(address . morgan.j.smith@outlook.com)
87ldtleiw0.fsf@gmail.com
Hello,

Morgan Smith <morgan.j.smith@outlook.com> writes:

[...]

Toggle quote (4 lines)
> I've attached the relevant patches to this email. Let me know if you'd
> rather I use 'git send-email' (and how I should do that without filling
> up everyone's inbox).

We accept both, but for various reasons (email notification to teams,
ease of applying, and extra commit metadata as enforced by our git
config template), using 'git send-email' is preferable.

See info '(guix) Sending a Patch Series' for more details; since here we
already have an issue created it's down to something like:

Toggle snippet (3 lines)
git send-email --to=76690@debbugs.gnu.org origin/master

Assuming your feature branch is tracking the remote master branch.

Another option is to use mumi; you currently must manually format
patches first to send them though:

Toggle snippet (5 lines)
git format-patch origin/master -o your-branch-patches
mumi current 76690
mumi send-email your-branch-patches/*.patch

I hope that helps.

--
Thanks,
Maxim
Liliana Marie Prikler wrote 2 days ago
(name . Morgan Smith)(address . morgan.j.smith@outlook.com)
d3eddb067aa28026b96f4729a575482d2ae340a1.camel@gmail.com
Am Sonntag, dem 02.03.2025 um 17:20 -0500 schrieb Morgan Smith:
Toggle quote (1 lines)
> Done!  See attached
Aaaaaaaaaaaand it's pushed.

Cheers
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76690@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76690
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help