[PATCH 0/2] Update Emacs to 28.1 and add socket activation

  • Done
  • quality assurance status badge
Details
8 participants
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Luis Henrique Gomes Higino
  • Maxim Cournoyer
  • Maxime Devos
  • Michael Rohleder
  • Feng Shu
  • zimoun
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 9 Apr 2022 12:29
(address . guix-patches@gnu.org)
a12fa139736fdba929f3460f26622928e9cc8eca.camel@gmail.com
Hi Guix,

as noted over at guix devel, I've updated Emacs and enabled socket activation.
I did not yet test this, so you might consider it WIP (I did test my own
config with 27.2 under socket activation slightly better), also given the
number of rebuilds I'm never quite sure if we should actually adhere to
Emacs being staging material. Anyways, please enjoy.

Yours truly

Liliana Marie Prikler (2):
gnu: emacs: Update to 28.1.
gnu: emacs: Add support for socket activation.

gnu/local.mk | 1 -
gnu/packages/emacs.scm | 337 +++++++++---------
gnu/packages/patches/emacs-exec-path.patch | 12 +-
.../emacs-ignore-empty-xim-styles.patch | 24 --
4 files changed, 176 insertions(+), 198 deletions(-)
delete mode 100644 gnu/packages/patches/emacs-ignore-empty-xim-styles.patch

--
2.34.0
L
L
Liliana Marie Prikler wrote on 9 Apr 2022 10:15
[PATCH 1/2] gnu: emacs: Update to 28.1.
(address . 54829@debbugs.gnu.org)
3bb794afd978e935896fe3df65cee98dbf940224.camel@gmail.com
* gnu/packages/emacs.scm (emacs): Update to 28.1
[origin]<patches>: Drop ‘emacs-ignore-empty-xim-styles.patch’.
[arguments]: Convert to list of G-Expressions.
Use search-input-file instead of input labels.
Inline reference to auxiliary files.
[inputs, native-inputs]: Drop labels.
* gnu/packages/patches/emacs-exec-path.patch: Update accordingly.
* gnu/packages/patches/emacs-ignore-empty-xim-styles.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it from here.
---
gnu/local.mk | 1 -
gnu/packages/emacs.scm | 330 +++++++++---------
gnu/packages/patches/emacs-exec-path.patch | 12 +-
.../emacs-ignore-empty-xim-styles.patch | 24 --
4 files changed, 169 insertions(+), 198 deletions(-)
delete mode 100644 gnu/packages/patches/emacs-ignore-empty-xim-styles.patch

Toggle diff (398 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index a44815bdbb..9d6d81b3e0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1028,7 +1028,6 @@ dist_patch_DATA = \
%D%/packages/patches/elogind-revert-polkit-detection.patch \
%D%/packages/patches/emacs-exec-path.patch \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
- %D%/packages/patches/emacs-ignore-empty-xim-styles.patch \
%D%/packages/patches/emacs-json-reformat-fix-tests.patch \
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
%D%/packages/patches/emacs-hyperbole-toggle-messaging.patch \
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index bfb3f9790e..894b9cd7de 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -41,6 +41,7 @@
(define-module (gnu packages emacs)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
@@ -79,17 +80,16 @@ (define-module (gnu packages emacs)
(define-public emacs
(package
(name "emacs")
- (version "27.2")
+ (version "28.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/emacs/emacs-"
version ".tar.xz"))
(sha256
(base32
- "1ff182gjw9wqsbx1kj5gl2r5pbqhp4ar54g04j33fgz6g17cr9xl"))
+ "1qbmmmhnjhn4lvzsnyk7l5ganbi6wzbm38jc1a7hhyh3k78b7c98"))
(patches (search-patches "emacs-exec-path.patch"
"emacs-fix-scheme-indent-function.patch"
- "emacs-ignore-empty-xim-styles.patch"
"emacs-source-date-epoch.patch"))
(modules '((guix build utils)))
(snippet
@@ -124,179 +124,175 @@ (define-public emacs
#t))))
(build-system glib-or-gtk-build-system)
(arguments
- `(#:tests? #f ; no check target
- #:configure-flags (list "--with-modules"
- "--with-cairo"
- "--disable-build-details")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-program-file-names
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("src/callproc.c"
- "lisp/term.el"
- "lisp/htmlfontify.el"
- "lisp/textmodes/artist.el"
- "lisp/progmodes/sh-script.el")
- (("\"/bin/sh\"")
- (format #f "~s" (which "sh"))))
- (substitute* "lisp/doc-view.el"
- (("\"(gs|dvipdf|ps2pdf)\"" all what)
- (let ((ghostscript (assoc-ref inputs "ghostscript")))
- (if ghostscript
- (string-append "\"" ghostscript "/bin/" what "\"")
- all)))
- (("\"(pdftotext)\"" all what)
- (let ((poppler (assoc-ref inputs "poppler")))
- (if poppler
- (string-append "\"" poppler "/bin/" what "\"")
- all))))
- ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
- ;; respectively when looking for GVFS processes.
- (substitute* "lisp/net/tramp-gvfs.el"
- (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process)
- (format #f "(or ~a (tramp-compat-process-running-p ~s))"
- all (string-append "." process "-real"))))
- #t))
- (add-before 'configure 'fix-/bin/pwd
- (lambda _
- ;; Use `pwd', not `/bin/pwd'.
- (substitute* (find-files "." "^Makefile\\.in$")
- (("/bin/pwd")
- "pwd"))
- #t))
- (add-after 'install 'install-site-start
- ;; Use 'guix-emacs' in "site-start.el", which is used autoload the
- ;; Elisp packages found in EMACSLOADPATH.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lisp-dir (string-append out "/share/emacs/site-lisp"))
- (emacs (string-append out "/bin/emacs")))
+ (list
+ #:tests? #f ; no check target
+ #:configure-flags #~(list "--with-modules"
+ "--with-cairo"
+ "--disable-build-details")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-program-file-names
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("src/callproc.c"
+ "lisp/term.el"
+ "lisp/htmlfontify.el"
+ "lisp/textmodes/artist.el"
+ "lisp/progmodes/sh-script.el")
+ (("\"/bin/sh\"")
+ (format #f "~s" (which "sh"))))
+ (substitute* "lisp/doc-view.el"
+ (("\"(gs|dvipdf|ps2pdf|pdftotext)\"" all what)
+ (let ((replacement (search-input-file
+ inputs
+ (string-append "/bin/" what))))
+ (if replacement
+ (string-append "\"" replacement "\"")
+ all))))
+ ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
+ ;; respectively when looking for GVFS processes.
+ (substitute* "lisp/net/tramp-gvfs.el"
+ (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process)
+ (format #f "(or ~a (tramp-compat-process-running-p ~s))"
+ all (string-append "." process "-real"))))))
+ (add-before 'configure 'fix-/bin/pwd
+ (lambda _
+ ;; Use `pwd', not `/bin/pwd'.
+ (substitute* (find-files "." "^Makefile\\.in$")
+ (("/bin/pwd")
+ "pwd"))))
+ (add-after 'install 'install-site-start
+ ;; Use 'guix-emacs' in "site-start.el", which is used autoload the
+ ;; Elisp packages found in EMACSLOADPATH.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lisp-dir (string-append out "/share/emacs/site-lisp"))
+ (emacs (string-append out "/bin/emacs")))
- ;; This is duplicated from emacs-utils to prevent coupling.
- (define* (emacs-byte-compile-directory dir)
- (let ((expr `(progn
- (setq byte-compile-debug t)
- (byte-recompile-directory
- (file-name-as-directory ,dir) 0 1))))
- (invoke emacs "--quick" "--batch"
- (format #f "--eval=~s" expr))))
+ ;; This is duplicated from emacs-utils to prevent coupling.
+ (define* (emacs-byte-compile-directory dir)
+ (let ((expr `(progn
+ (setq byte-compile-debug t)
+ (byte-recompile-directory
+ (file-name-as-directory ,dir) 0 1))))
+ (invoke emacs "--quick" "--batch"
+ (format #f "--eval=~s" expr))))
- (copy-file (assoc-ref inputs "guix-emacs.el")
- (string-append lisp-dir "/guix-emacs.el"))
- (with-output-to-file (string-append lisp-dir "/site-start.el")
- (lambda ()
- (display
- (string-append
- "(when (require 'guix-emacs nil t)\n"
- " (guix-emacs-autoload-packages)\n"
- " (advice-add 'package-load-all-descriptors"
- " :after #'guix-emacs-load-package-descriptors))"))))
- ;; Remove the extraneous subdirs.el file, as it causes Emacs to
- ;; add recursively all the the sub-directories of a profile's
- ;; share/emacs/site-lisp union when added to EMACSLOADPATH,
- ;; which leads to conflicts.
- (delete-file (string-append lisp-dir "/subdirs.el"))
- ;; Byte compile the site-start files.
- (emacs-byte-compile-directory lisp-dir))
- #t))
- (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp
- ;; restore the dump file that Emacs installs somewhere in
- ;; libexec/ to its original state
- (lambda* (#:key outputs target #:allow-other-keys)
- (let* ((libexec (string-append (assoc-ref outputs "out")
- "/libexec"))
- ;; each of these ought to only match a single file,
- ;; but even if not (find-files) sorts by string<,
- ;; so the Nth element in one maps to the Nth element of
- ;; the other
- (pdmp (find-files libexec "\\.pdmp$"))
- (pdmp-real (find-files libexec "\\.pdmp-real$")))
- (for-each rename-file pdmp-real pdmp))))
- (add-after 'glib-or-gtk-wrap 'strip-double-wrap
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
- ;; twice. This also fixes a minor issue, where WMs would not be
- ;; able to track emacs back to emacs.desktop.
- (with-directory-excursion (assoc-ref outputs "out")
- (copy-file
- (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
- "bin/emacs")
- #t)))
- (add-after 'strip-double-wrap 'wrap-emacs-paths
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lisp-dirs (find-files (string-append out "/share/emacs")
- "^lisp$"
- #:directories? #t)))
- (for-each
- (lambda (prog)
- (wrap-program prog
- ;; emacs-next and variants rely on uname being in PATH for
- ;; Tramp. Tramp paths can't be hardcoded, because they
- ;; need to be portable.
- `("PATH" suffix
- ,(map (lambda (in) (string-append in "/bin"))
- (list (assoc-ref inputs "gzip")
- (assoc-ref inputs "coreutils"))))
- `("EMACSLOADPATH" suffix ,lisp-dirs)))
- (find-files (string-append out "/bin")
- ;; Matches versioned and unversioned emacs binaries.
- ;; We don't patch emacsclient, because it takes its
- ;; environment variables from emacs.
- ;; Likewise, we don't need to patch helper binaries
- ;; like etags, ctags or ebrowse.
- "^emacs(-[0-9]+(\\.[0-9]+)*)?$"))))))))
+ (copy-file #$(local-file
+ (search-auxiliary-file "emacs/guix-emacs.el"))
+ (string-append lisp-dir "/guix-emacs.el"))
+ (with-output-to-file (string-append lisp-dir "/site-start.el")
+ (lambda ()
+ (display
+ (string-append
+ "(when (require 'guix-emacs nil t)\n"
+ " (guix-emacs-autoload-packages)\n"
+ " (advice-add 'package-load-all-descriptors"
+ " :after #'guix-emacs-load-package-descriptors))"))))
+ ;; Remove the extraneous subdirs.el file, as it causes Emacs to
+ ;; add recursively all the the sub-directories of a profile's
+ ;; share/emacs/site-lisp union when added to EMACSLOADPATH,
+ ;; which leads to conflicts.
+ (delete-file (string-append lisp-dir "/subdirs.el"))
+ ;; Byte compile the site-start files.
+ (emacs-byte-compile-directory lisp-dir))
+ #t))
+ (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp
+ ;; restore the dump file that Emacs installs somewhere in
+ ;; libexec/ to its original state
+ (lambda* (#:key outputs target #:allow-other-keys)
+ (let* ((libexec (string-append (assoc-ref outputs "out")
+ "/libexec"))
+ ;; each of these ought to only match a single file,
+ ;; but even if not (find-files) sorts by string<,
+ ;; so the Nth element in one maps to the Nth element of
+ ;; the other
+ (pdmp (find-files libexec "\\.pdmp$"))
+ (pdmp-real (find-files libexec "\\.pdmp-real$")))
+ (for-each rename-file pdmp-real pdmp))))
+ (add-after 'glib-or-gtk-wrap 'strip-double-wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
+ ;; twice. This also fixes a minor issue, where WMs would not be
+ ;; able to track emacs back to emacs.desktop.
+ (with-directory-excursion (assoc-ref outputs "out")
+ (copy-file
+ (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
+ "bin/emacs")
+ #t)))
+ (add-after 'strip-double-wrap 'wrap-emacs-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lisp-dirs (find-files (string-append out "/share/emacs")
+ "^lisp$"
+ #:directories? #t)))
+ (for-each
+ (lambda (prog)
+ (wrap-program prog
+ ;; emacs-next and variants rely on uname being in PATH for
+ ;; Tramp. Tramp paths can't be hardcoded, because they
+ ;; need to be portable.
+ `("PATH" suffix
+ ,(map dirname
+ (list (search-input-file inputs "/bin/gzip")
+ ;; for coreutils
+ (search-input-file inputs "/bin/yes"))))
+ `("EMACSLOADPATH" suffix ,lisp-dirs)))
+ (find-files (string-append out "/bin")
+ ;; Matches versioned and unversioned emacs binaries.
+ ;; We don't patch emacsclient, because it takes its
+ ;; environment variables from emacs.
+ ;; Likewise, we don't need to patch helper binaries
+ ;; like etags, ctags or ebrowse.
+ "^emacs(-[0-9]+(\\.[0-9]+)*)?$"))))))))
(inputs
- `(("gnutls" ,gnutls)
- ("ncurses" ,ncurses)
+ (list gnutls
+ ncurses
- ;; Required for "core" functionality, such as dired and compression.
- ("coreutils" ,coreutils)
- ("gzip" ,gzip)
+ ;; Required for "core" functionality, such as dired and compression.
+ coreutils
+ gzip
- ;; Avoid Emacs's limited movemail substitute that retrieves POP3 email
- ;; only via insecure channels. This is not needed for (modern) IMAP.
- ("mailutils" ,mailutils)
+ ;; Avoid Emacs's limited movemail substitute that retrieves POP3
+ ;; email only via insecure channels.
+ ;; This is not needed for (modern) IMAP.
+ mailutils
- ;; TODO: Add the optional dependencies.
- ("gpm" ,gpm)
- ("libx11" ,libx11)
- ("gtk+" ,gtk+)
- ("cairo" ,cairo)
- ("pango" ,pango)
- ("harfbuzz" ,harfbuzz)
- ("libxft" ,libxft)
- ("libtiff" ,libtiff)
- ("giflib" ,giflib)
- ("libjpeg" ,libjpeg-turbo)
- ("acl" ,acl)
- ("jansson" ,jansson)
- ("gmp" ,gmp)
- ("ghostscript" ,ghostscript)
- ("poppler" ,poppler)
+ ;; TODO: Add the optional dependencies.
+ gpm
+ libx11
+ gtk+
+ cairo
+ pango
+ harfbuzz
+ libxft
+ libtiff
+ giflib
+ libjpeg-turbo
+ acl
+ jansson
+ gmp
+ ghostscript
+ poppler
- ;; When looking for libpng `configure' links with `-lpng -lz', so we
- ;; must also provide zlib as an input.
- ("libpng" ,libpng)
- ("zlib" ,zlib)
- ("librsvg" ,@(if (target-x86-64?)
- (list librsvg-bootstrap)
- (list librsvg-2.40)))
- ("libxpm" ,libxpm)
- ("libxml2" ,libxml2)
- ("libice" ,libice)
- ("libsm" ,libsm)
- ("alsa-lib" ,alsa-lib)
- ("dbus" ,dbus)
+ ;; When looking for libpng `configure' links with `-lpng -lz', so we
+ ;; must also provide zlib as an input.
+ libpng
+ zlib
+ (if (target-x86-64?)
+ librsvg-bootstrap
+ librsvg-2.40)
+ libxpm
+ libxml2
+ libice
+ libsm
+ alsa-lib
+ dbus
- ;; multilingualization support
- ("libotf" ,libotf)
- ("m17n-lib" ,m17n-lib)))
+ ;; multilingualization support
+ libotf
+ m17n-lib))
(native-inputs
- `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el"))
- ("pkg-config" ,pkg-config)
- ("texinfo" ,texinfo)))
-
+ (list pkg-config texinfo))
(native-search-paths
(list (search-path-specification
(variable "EMACSLOADPATH")
diff --git a/gnu/packages/patches/emacs-exec-path.patch b/gnu/packages/patches/emacs-exec-path.patch
index 7303599df1..9a76b0237d 100644
--- a/gnu/packages/patches/emacs-exec-path.patch
+++ b/gnu/packages/patches/emacs-exec-path.patch
@@ -4,13 +4,13 @@ with things like GCC being referenced.
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
-@@ -481,7 +481,8 @@ lost after dumping")))
+@@ -530,7 +530,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 %
This message was truncated. Download the full message here.
L
L
Liliana Marie Prikler wrote on 9 Apr 2022 12:28
[PATCH 2/2] gnu: emacs: Add support for socket activation.
(address . 54829@debbugs.gnu.org)
c5dc98fadc4aed8618615f5d8b4da03b11e320b5.camel@gmail.com
* gnu/packages/emacs.scm (emacs)[#:phases]: Add ‘enable-elogind’.
[inputs]: Add elogind.
[native-inputs]: Add autoconf.
---
gnu/packages/emacs.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 894b9cd7de..818166c552 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -52,6 +52,7 @@ (define-module (gnu packages emacs)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages gd)
#:use-module (gnu packages gettext)
@@ -131,6 +132,11 @@ (define-public emacs
"--disable-build-details")
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'enable-elogind
+ (lambda _
+ (substitute* "configure.ac"
+ (("libsystemd") "libelogind"))
+ (delete-file "configure")))
(add-after 'unpack 'patch-program-file-names
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("src/callproc.c"
@@ -273,6 +279,7 @@ (define* (emacs-byte-compile-directory dir)
gmp
ghostscript
poppler
+ elogind
;; When looking for libpng `configure' links with `-lpng -lz', so we
;; must also provide zlib as an input.
@@ -292,7 +299,7 @@ (define* (emacs-byte-compile-directory dir)
libotf
m17n-lib))
(native-inputs
- (list pkg-config texinfo))
+ (list autoconf pkg-config texinfo))
(native-search-paths
(list (search-path-specification
(variable "EMACSLOADPATH")
--
2.34.0
M
M
Maxime Devos wrote on 10 Apr 2022 12:21
Re: [bug#54829] [PATCH 1/2] gnu: emacs: Update to 28.1.
b0ab5b142518a8959c0334ab5e556759c379fcb1.camel@telenet.be
Liliana Marie Prikler schreef op za 09-04-2022 om 10:15 [+0200]:
Toggle quote (8 lines)
> +              (substitute* '("src/callproc.c"
> +                             "lisp/term.el"
> +                             "lisp/htmlfontify.el"
> +                             "lisp/textmodes/artist.el"
> +                             "lisp/progmodes/sh-script.el")
> +                (("\"/bin/sh\"")
> +                 (format #f "~s" (which "sh"))))

Unrelated to the socket activation, but for cross-compilation,
this needs to be (search-input-file inputs "bin/sh).

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlKvkBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7q/6AQCp7vSfw+n1luWji7/NBKkKwKs/
hLUuOlrw8qVE67o7+AEArkVUDxx3CX42fRwU2WYG0sf5CWjHYWz/tc4Aac7TBQo=
=U7aG
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 10 Apr 2022 12:23
e662e9068b08912b9ce779643da9fe2f4ce4c494.camel@telenet.be
Liliana Marie Prikler schreef op za 09-04-2022 om 10:15 [+0200]:
Toggle quote (5 lines)
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index bfb3f9790e..894b9cd7de 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm

It's a bit difficult to read this patch because it mixes style changes
and other changes. Could they be split?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlKwChccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qUnAQDPKhuxw/bu5ISK6OF6lp0HW12G
N1zseJD1bQ6q+l3S8gEAhXm8YYVpZsfg6aT/fH5eg8dsAXooxlqY9IqXziCCcg0=
=0NxD
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 10 Apr 2022 13:23
[PATCH v2 1/3] gnu: emacs: Update to 28.1.
b4747db801190413e60441c7abbd0405a52097ad.camel@gmail.com
* gnu/packages/emacs.scm (emacs): Update to 28.1
* gnu/packages/patches/emacs-exec-path.patch: Adjust accordingly.
* gnu/packages/patches/emacs-ignore-empty-xim-styles.patch: Delete file.
* gnu/local.mk: Remove it here.
---
gnu/local.mk | 1 -
gnu/packages/emacs.scm | 5 ++--
gnu/packages/patches/emacs-exec-path.patch | 12 +++++-----
.../emacs-ignore-empty-xim-styles.patch | 24 -------------------
4 files changed, 8 insertions(+), 34 deletions(-)
delete mode 100644 gnu/packages/patches/emacs-ignore-empty-xim-styles.patch

Toggle diff (92 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index a44815bdbb..9d6d81b3e0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1028,7 +1028,6 @@ dist_patch_DATA = \
%D%/packages/patches/elogind-revert-polkit-detection.patch \
%D%/packages/patches/emacs-exec-path.patch \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
- %D%/packages/patches/emacs-ignore-empty-xim-styles.patch \
%D%/packages/patches/emacs-json-reformat-fix-tests.patch \
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
%D%/packages/patches/emacs-hyperbole-toggle-messaging.patch \
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index bfb3f9790e..7d791250d2 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -79,17 +79,16 @@ (define-module (gnu packages emacs)
(define-public emacs
(package
(name "emacs")
- (version "27.2")
+ (version "28.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/emacs/emacs-"
version ".tar.xz"))
(sha256
(base32
- "1ff182gjw9wqsbx1kj5gl2r5pbqhp4ar54g04j33fgz6g17cr9xl"))
+ "1qbmmmhnjhn4lvzsnyk7l5ganbi6wzbm38jc1a7hhyh3k78b7c98"))
(patches (search-patches "emacs-exec-path.patch"
"emacs-fix-scheme-indent-function.patch"
- "emacs-ignore-empty-xim-styles.patch"
"emacs-source-date-epoch.patch"))
(modules '((guix build utils)))
(snippet
diff --git a/gnu/packages/patches/emacs-exec-path.patch b/gnu/packages/patches/emacs-exec-path.patch
index 7303599df1..9a76b0237d 100644
--- a/gnu/packages/patches/emacs-exec-path.patch
+++ b/gnu/packages/patches/emacs-exec-path.patch
@@ -4,13 +4,13 @@ with things like GCC being referenced.
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
-@@ -481,7 +481,8 @@ lost after dumping")))
+@@ -530,7 +530,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))))
+- (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)
+ (when (and (featurep 'native-compile)
+ (equal dump-mode "pdump"))
+ ;; Don't enable this before bootstrap is completed, as the
diff --git a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch b/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch
deleted file mode 100644
index 398e65bdc8..0000000000
--- a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Fix contributed upstream here:
-https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694.
-
-Index: emacs-26.3/src/xfns.c
-===================================================================
---- emacs-26.3.orig/src/xfns.c
-+++ emacs-26.3/src/xfns.c
-@@ -2628,6 +2628,8 @@ xic_free_xfontset (struct frame *f)
- static XIMStyle
- best_xim_style (XIMStyles *xim)
- {
-+ if (xim == NULL) goto out;
-+
- int i, j;
- int nr_supported = ARRAYELTS (supported_xim_styles);
-
-@@ -2636,6 +2638,7 @@ best_xim_style (XIMStyles *xim)
- if (supported_xim_styles[i] == xim->supported_styles[j])
- return supported_xim_styles[i];
-
-+ out:
- /* Return the default style. */
- return XIMPreeditNothing | XIMStatusNothing;
- }
--
2.34.0
L
L
Liliana Marie Prikler wrote on 10 Apr 2022 13:28
[PATCH v2 2/3] gnu: emacs: Use new package style.
3ea8d086e75ff361c82e774c71fdfcacfa78fddd.camel@gmail.com
* gnu/packages/emacs.scm (emacs)[arguments]: Convert to list of G-Expressions.
Use ‘search-input-file’ where possible.
Inline references to auxiliary files.
[inputs, native-inputs]: Drop labels.
---
gnu/packages/emacs.scm | 326 ++++++++++++++++++++---------------------
1 file changed, 162 insertions(+), 164 deletions(-)

Toggle diff (362 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7d791250d2..ae062dadf1 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -41,6 +41,7 @@
(define-module (gnu packages emacs)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
@@ -51,6 +52,7 @@ (define-module (gnu packages emacs)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages gd)
#:use-module (gnu packages gettext)
@@ -123,179 +125,175 @@ (define-public emacs
#t))))
(build-system glib-or-gtk-build-system)
(arguments
- `(#:tests? #f ; no check target
- #:configure-flags (list "--with-modules"
- "--with-cairo"
- "--disable-build-details")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-program-file-names
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("src/callproc.c"
- "lisp/term.el"
- "lisp/htmlfontify.el"
- "lisp/textmodes/artist.el"
- "lisp/progmodes/sh-script.el")
- (("\"/bin/sh\"")
- (format #f "~s" (which "sh"))))
- (substitute* "lisp/doc-view.el"
- (("\"(gs|dvipdf|ps2pdf)\"" all what)
- (let ((ghostscript (assoc-ref inputs "ghostscript")))
- (if ghostscript
- (string-append "\"" ghostscript "/bin/" what "\"")
- all)))
- (("\"(pdftotext)\"" all what)
- (let ((poppler (assoc-ref inputs "poppler")))
- (if poppler
- (string-append "\"" poppler "/bin/" what "\"")
- all))))
- ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
- ;; respectively when looking for GVFS processes.
- (substitute* "lisp/net/tramp-gvfs.el"
- (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process)
- (format #f "(or ~a (tramp-compat-process-running-p ~s))"
- all (string-append "." process "-real"))))
- #t))
- (add-before 'configure 'fix-/bin/pwd
- (lambda _
- ;; Use `pwd', not `/bin/pwd'.
- (substitute* (find-files "." "^Makefile\\.in$")
- (("/bin/pwd")
- "pwd"))
- #t))
- (add-after 'install 'install-site-start
- ;; Use 'guix-emacs' in "site-start.el", which is used autoload the
- ;; Elisp packages found in EMACSLOADPATH.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lisp-dir (string-append out "/share/emacs/site-lisp"))
- (emacs (string-append out "/bin/emacs")))
+ (list
+ #:tests? #f ; no check target
+ #:configure-flags #~(list "--with-modules"
+ "--with-cairo"
+ "--disable-build-details")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-program-file-names
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("src/callproc.c"
+ "lisp/term.el"
+ "lisp/htmlfontify.el"
+ "lisp/textmodes/artist.el"
+ "lisp/progmodes/sh-script.el")
+ (("\"/bin/sh\"")
+ (format #f "~s" (search-input-file inputs "/bin/sh"))))
+ (substitute* "lisp/doc-view.el"
+ (("\"(gs|dvipdf|ps2pdf|pdftotext)\"" all what)
+ (let ((replacement (search-input-file
+ inputs
+ (string-append "/bin/" what))))
+ (if replacement
+ (string-append "\"" replacement "\"")
+ all))))
+ ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
+ ;; respectively when looking for GVFS processes.
+ (substitute* "lisp/net/tramp-gvfs.el"
+ (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process)
+ (format #f "(or ~a (tramp-compat-process-running-p ~s))"
+ all (string-append "." process "-real"))))))
+ (add-before 'configure 'fix-/bin/pwd
+ (lambda _
+ ;; Use `pwd', not `/bin/pwd'.
+ (substitute* (find-files "." "^Makefile\\.in$")
+ (("/bin/pwd")
+ "pwd"))))
+ (add-after 'install 'install-site-start
+ ;; Use 'guix-emacs' in "site-start.el", which is used autoload the
+ ;; Elisp packages found in EMACSLOADPATH.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lisp-dir (string-append out "/share/emacs/site-lisp"))
+ (emacs (string-append out "/bin/emacs")))
- ;; This is duplicated from emacs-utils to prevent coupling.
- (define* (emacs-byte-compile-directory dir)
- (let ((expr `(progn
- (setq byte-compile-debug t)
- (byte-recompile-directory
- (file-name-as-directory ,dir) 0 1))))
- (invoke emacs "--quick" "--batch"
- (format #f "--eval=~s" expr))))
+ ;; This is duplicated from emacs-utils to prevent coupling.
+ (define* (emacs-byte-compile-directory dir)
+ (let ((expr `(progn
+ (setq byte-compile-debug t)
+ (byte-recompile-directory
+ (file-name-as-directory ,dir) 0 1))))
+ (invoke emacs "--quick" "--batch"
+ (format #f "--eval=~s" expr))))
- (copy-file (assoc-ref inputs "guix-emacs.el")
- (string-append lisp-dir "/guix-emacs.el"))
- (with-output-to-file (string-append lisp-dir "/site-start.el")
- (lambda ()
- (display
- (string-append
- "(when (require 'guix-emacs nil t)\n"
- " (guix-emacs-autoload-packages)\n"
- " (advice-add 'package-load-all-descriptors"
- " :after #'guix-emacs-load-package-descriptors))"))))
- ;; Remove the extraneous subdirs.el file, as it causes Emacs to
- ;; add recursively all the the sub-directories of a profile's
- ;; share/emacs/site-lisp union when added to EMACSLOADPATH,
- ;; which leads to conflicts.
- (delete-file (string-append lisp-dir "/subdirs.el"))
- ;; Byte compile the site-start files.
- (emacs-byte-compile-directory lisp-dir))
- #t))
- (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp
- ;; restore the dump file that Emacs installs somewhere in
- ;; libexec/ to its original state
- (lambda* (#:key outputs target #:allow-other-keys)
- (let* ((libexec (string-append (assoc-ref outputs "out")
- "/libexec"))
- ;; each of these ought to only match a single file,
- ;; but even if not (find-files) sorts by string<,
- ;; so the Nth element in one maps to the Nth element of
- ;; the other
- (pdmp (find-files libexec "\\.pdmp$"))
- (pdmp-real (find-files libexec "\\.pdmp-real$")))
- (for-each rename-file pdmp-real pdmp))))
- (add-after 'glib-or-gtk-wrap 'strip-double-wrap
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
- ;; twice. This also fixes a minor issue, where WMs would not be
- ;; able to track emacs back to emacs.desktop.
- (with-directory-excursion (assoc-ref outputs "out")
- (copy-file
- (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
- "bin/emacs")
- #t)))
- (add-after 'strip-double-wrap 'wrap-emacs-paths
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lisp-dirs (find-files (string-append out "/share/emacs")
- "^lisp$"
- #:directories? #t)))
- (for-each
- (lambda (prog)
- (wrap-program prog
- ;; emacs-next and variants rely on uname being in PATH for
- ;; Tramp. Tramp paths can't be hardcoded, because they
- ;; need to be portable.
- `("PATH" suffix
- ,(map (lambda (in) (string-append in "/bin"))
- (list (assoc-ref inputs "gzip")
- (assoc-ref inputs "coreutils"))))
- `("EMACSLOADPATH" suffix ,lisp-dirs)))
- (find-files (string-append out "/bin")
- ;; Matches versioned and unversioned emacs binaries.
- ;; We don't patch emacsclient, because it takes its
- ;; environment variables from emacs.
- ;; Likewise, we don't need to patch helper binaries
- ;; like etags, ctags or ebrowse.
- "^emacs(-[0-9]+(\\.[0-9]+)*)?$"))))))))
+ (copy-file #$(local-file
+ (search-auxiliary-file "emacs/guix-emacs.el"))
+ (string-append lisp-dir "/guix-emacs.el"))
+ (with-output-to-file (string-append lisp-dir "/site-start.el")
+ (lambda ()
+ (display
+ (string-append
+ "(when (require 'guix-emacs nil t)\n"
+ " (guix-emacs-autoload-packages)\n"
+ " (advice-add 'package-load-all-descriptors"
+ " :after #'guix-emacs-load-package-descriptors))"))))
+ ;; Remove the extraneous subdirs.el file, as it causes Emacs to
+ ;; add recursively all the the sub-directories of a profile's
+ ;; share/emacs/site-lisp union when added to EMACSLOADPATH,
+ ;; which leads to conflicts.
+ (delete-file (string-append lisp-dir "/subdirs.el"))
+ ;; Byte compile the site-start files.
+ (emacs-byte-compile-directory lisp-dir))
+ #t))
+ (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp
+ ;; restore the dump file that Emacs installs somewhere in
+ ;; libexec/ to its original state
+ (lambda* (#:key outputs target #:allow-other-keys)
+ (let* ((libexec (string-append (assoc-ref outputs "out")
+ "/libexec"))
+ ;; each of these ought to only match a single file,
+ ;; but even if not (find-files) sorts by string<,
+ ;; so the Nth element in one maps to the Nth element of
+ ;; the other
+ (pdmp (find-files libexec "\\.pdmp$"))
+ (pdmp-real (find-files libexec "\\.pdmp-real$")))
+ (for-each rename-file pdmp-real pdmp))))
+ (add-after 'glib-or-gtk-wrap 'strip-double-wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
+ ;; twice. This also fixes a minor issue, where WMs would not be
+ ;; able to track emacs back to emacs.desktop.
+ (with-directory-excursion (assoc-ref outputs "out")
+ (copy-file
+ (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
+ "bin/emacs")
+ #t)))
+ (add-after 'strip-double-wrap 'wrap-emacs-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lisp-dirs (find-files (string-append out "/share/emacs")
+ "^lisp$"
+ #:directories? #t)))
+ (for-each
+ (lambda (prog)
+ (wrap-program prog
+ ;; emacs-next and variants rely on uname being in PATH for
+ ;; Tramp. Tramp paths can't be hardcoded, because they
+ ;; need to be portable.
+ `("PATH" suffix
+ ,(map dirname
+ (list (search-input-file inputs "/bin/gzip")
+ ;; for coreutils
+ (search-input-file inputs "/bin/yes"))))
+ `("EMACSLOADPATH" suffix ,lisp-dirs)))
+ (find-files (string-append out "/bin")
+ ;; Matches versioned and unversioned emacs binaries.
+ ;; We don't patch emacsclient, because it takes its
+ ;; environment variables from emacs.
+ ;; Likewise, we don't need to patch helper binaries
+ ;; like etags, ctags or ebrowse.
+ "^emacs(-[0-9]+(\\.[0-9]+)*)?$"))))))))
(inputs
- `(("gnutls" ,gnutls)
- ("ncurses" ,ncurses)
+ (list gnutls
+ ncurses
- ;; Required for "core" functionality, such as dired and compression.
- ("coreutils" ,coreutils)
- ("gzip" ,gzip)
+ ;; Required for "core" functionality, such as dired and compression.
+ coreutils
+ gzip
- ;; Avoid Emacs's limited movemail substitute that retrieves POP3 email
- ;; only via insecure channels. This is not needed for (modern) IMAP.
- ("mailutils" ,mailutils)
+ ;; Avoid Emacs's limited movemail substitute that retrieves POP3
+ ;; email only via insecure channels.
+ ;; This is not needed for (modern) IMAP.
+ mailutils
- ;; TODO: Add the optional dependencies.
- ("gpm" ,gpm)
- ("libx11" ,libx11)
- ("gtk+" ,gtk+)
- ("cairo" ,cairo)
- ("pango" ,pango)
- ("harfbuzz" ,harfbuzz)
- ("libxft" ,libxft)
- ("libtiff" ,libtiff)
- ("giflib" ,giflib)
- ("libjpeg" ,libjpeg-turbo)
- ("acl" ,acl)
- ("jansson" ,jansson)
- ("gmp" ,gmp)
- ("ghostscript" ,ghostscript)
- ("poppler" ,poppler)
+ ;; TODO: Add the optional dependencies.
+ gpm
+ libx11
+ gtk+
+ cairo
+ pango
+ harfbuzz
+ libxft
+ libtiff
+ giflib
+ libjpeg-turbo
+ acl
+ jansson
+ gmp
+ ghostscript
+ poppler
- ;; When looking for libpng `configure' links with `-lpng -lz', so we
- ;; must also provide zlib as an input.
- ("libpng" ,libpng)
- ("zlib" ,zlib)
- ("librsvg" ,@(if (target-x86-64?)
- (list librsvg-bootstrap)
- (list librsvg-2.40)))
- ("libxpm" ,libxpm)
- ("libxml2" ,libxml2)
- ("libice" ,libice)
- ("libsm" ,libsm)
- ("alsa-lib" ,alsa-lib)
- ("dbus" ,dbus)
+ ;; When looking for libpng `configure' links with `-lpng -lz', so we
+ ;; must also provide zlib as an input.
+ libpng
+ zlib
+ (if (target-x86-64?)
+ librsvg-bootstrap
+ librsvg-2.40)
+ libxpm
+ libxml2
+ libice
+ libsm
+ alsa-lib
+ dbus
- ;; multilingualization support
- ("libotf" ,libotf)
- ("m17n-lib" ,m17n-lib)))
+ ;; multilingualization support
+ libotf
+ m17n-lib))
(native-inputs
- `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el"))
- ("pkg-config" ,pkg-config)
- ("texinfo" ,texinfo)))
-
+ (list pkg-config texinfo))
(native-search-paths
(list (search-path-specification
(variable "EMACSLOADPATH")
--
2.34.0
L
L
Liliana Marie Prikler wrote on 10 Apr 2022 13:32
[PATCH v2 3/3] gnu: emacs: Add support for socket activation.
51a736cdfab0f0d15ab57e5eb01f784a3b125786.camel@gmail.com
* gnu/packages/emacs.scm (emacs)[#:phases]: Add ‘enable-elogind’.
[inputs]: Add elogind.
[native-inputs]: Add autoconf.
---
gnu/packages/emacs.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index ae062dadf1..85154da72b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -132,6 +132,11 @@ (define-public emacs
"--disable-build-details")
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'enable-elogind
+ (lambda _
+ (substitute* "configure.ac"
+ (("libsystemd") "libelogind"))
+ (delete-file "configure")))
(add-after 'unpack 'patch-program-file-names
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("src/callproc.c"
@@ -274,6 +279,7 @@ (define* (emacs-byte-compile-directory dir)
gmp
ghostscript
poppler
+ elogind
;; When looking for libpng `configure' links with `-lpng -lz', so we
;; must also provide zlib as an input.
@@ -293,7 +299,7 @@ (define* (emacs-byte-compile-directory dir)
libotf
m17n-lib))
(native-inputs
- (list pkg-config texinfo))
+ (list autoconf pkg-config texinfo))
(native-search-paths
(list (search-path-specification
(variable "EMACSLOADPATH")
--
2.34.0
M
M
Michael Rohleder wrote on 11 Apr 2022 10:53
Re: [bug#54829] [PATCH v2 1/3] gnu: emacs: Update to 28.1.
(address . 54829@debbugs.gnu.org)
87wnfwm259.fsf@rohleder.de
Toggle quote (12 lines)
> * gnu/packages/emacs.scm (emacs): Update to 28.1
> * gnu/packages/patches/emacs-exec-path.patch: Adjust accordingly.
> * gnu/packages/patches/emacs-ignore-empty-xim-styles.patch: Delete file.
> * gnu/local.mk: Remove it here.
> ---
> gnu/local.mk | 1 -
> gnu/packages/emacs.scm | 5 ++--
> gnu/packages/patches/emacs-exec-path.patch | 12 +++++-----
> .../emacs-ignore-empty-xim-styles.patch | 24 -------------------
> 4 files changed, 8 insertions(+), 34 deletions(-)
> delete mode 100644 gnu/packages/patches/emacs-ignore-empty-xim-styles.patch

LGTM!

Building emacs, emacs-minimal, emacs-xwidgets, emacs-no-x,
emacs-no-x-toolkit, emacs-wide-int (and running them) with this v2 1/3
patch worked well me.

--
Perfection (in design) is achieved not when there is nothing more to
add, but rather when there is nothing more to take away.
-----BEGIN PGP SIGNATURE-----

iQFFBAEBCAAvFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAmJT7KIRHG1pa2VAcm9o
bGVkZXIuZGUACgkQfHr/vv7yyyWepQf+OmtF418HlWPp8+CvQT/F0HogB8oYl/59
MmLvJ7zm7H57LNjORgh1yWdetDqskEeGDQFZZfG6cWrt6ua33Bd7vSO7BL9HhdmX
dW+OBsVkrycI87QFVN/sPLTJNnmLveT6ysWiMyITKHFNDpMd5SMvHXBmRb9jcTOa
TW5L37cWtnZw8Ie5ujQYIiV9bYAQ8sFjHdZDTio5B3O6I9bwKwIxEZaGqVSJdwOi
HM0HS/xeg9dPm0HcsoF6LUm/f++XxxaW4mlPSnRkARxxIlWUNUl0GV4dRzbW1QWU
Zh5Itl/bkgjG58bycbmwUrBAhAaSkS49I37/kW11S2ap4HHr4Ne26w==
=oXEp
-----END PGP SIGNATURE-----

Z
Z
zimoun wrote on 12 Apr 2022 10:15
Re: bug#54829: [PATCH 0/2] Update Emacs to 28.1 and add socket activation
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87sfqi67ky.fsf_-_@gmail.com
Hi Liliana,

Applying patch v2 1/3, I get:

Toggle snippet (9 lines)
error: corrupt patch at line 71
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: gnu: emacs: Update to 28.1.
Patch failed at 0001 gnu: emacs: Update to 28.1.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

I do not know what is wrong. Could you provide the commit against which
this patch applies? See 'git format-patch --base='.

Moreover, since the upgrade of Emacs leads to an emacs-world rebuild, it
could be nice to also remove all the trailing #t. WDYT?


Cheers,
simon
L
L
Liliana Marie Prikler wrote on 12 Apr 2022 20:19
(name . zimoun)(address . zimon.toutoune@gmail.com)
b04d18f9bc3b8bde3b09908b2289791e6ec8dd9b.camel@gmail.com
Am Dienstag, dem 12.04.2022 um 10:15 +0200 schrieb zimoun:
Toggle quote (17 lines)
> Hi Liliana,
>
> Applying patch v2 1/3, I get:
>
> --8<---------------cut here---------------start------------->8---
> error: corrupt patch at line 71
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> Applying: gnu: emacs: Update to 28.1.
> Patch failed at 0001 gnu: emacs: Update to 28.1.
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --
> abort".
> --8<---------------cut here---------------end--------------->8---
>
> I do not know what is wrong.  Could you provide the commit against
> which this patch applies?  See 'git format-patch --base='.
I have some unfinished work below this, so it's not clean, but I'm
doing somewhat regular rebases on master. The last commit is
47b6451eb55d74161d6e5899f0079e219cfa8a00.

Toggle quote (2 lines)
> Moreover, since the upgrade of Emacs leads to an emacs-world rebuild,
> it could be nice to also remove all the trailing #t.  WDYT?
Sure, those should go towards 2/3, but perhaps I didn't catch (all of)
them.

Cheers
Z
Z
zimoun wrote on 13 Apr 2022 12:29
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
86y2091dkn.fsf@gmail.com
Hi Liliana,

On Tue, 12 Apr 2022 at 20:19, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:
Toggle quote (22 lines)
> Am Dienstag, dem 12.04.2022 um 10:15 +0200 schrieb zimoun:

>> Applying patch v2 1/3, I get:
>>
>> --8<---------------cut here---------------start------------->8---
>> error: corrupt patch at line 71
>> hint: Use 'git am --show-current-patch=diff' to see the failed patch
>> Applying: gnu: emacs: Update to 28.1.
>> Patch failed at 0001 gnu: emacs: Update to 28.1.
>> When you have resolved this problem, run "git am --continue".
>> If you prefer to skip this patch, run "git am --skip" instead.
>> To restore the original branch and stop patching, run "git am --
>> abort".
>> --8<---------------cut here---------------end--------------->8---
>>
>> I do not know what is wrong.  Could you provide the commit against
>> which this patch applies?  See 'git format-patch --base='.
>
> I have some unfinished work below this, so it's not clean, but I'm
> doing somewhat regular rebases on master. The last commit is
> 47b6451eb55d74161d6e5899f0079e219cfa8a00.

For some reasons I totally miss, the patch v2 1/3 does not apply for me
with the same message as above, even against 47b6451eb55d74161d6e5899f0.


Anyway, I can wait for v3. :-)


Cheers,
simon
L
L
Liliana Marie Prikler wrote on 10 Apr 2022 13:23
[PATCH v3 1/3] gnu: emacs: Update to 28.1.
(address . 54829@debbugs.gnu.org)
8e120cbce7a52dc7df88f2b53c0c5802439fa4d5.camel@gmail.com
* gnu/packages/emacs.scm (emacs): Update to 28.1
* gnu/packages/patches/emacs-exec-path.patch: Adjust accordingly.
* gnu/packages/patches/emacs-ignore-empty-xim-styles.patch: Delete file.
* gnu/local.mk: Remove it here.
---
gnu/local.mk | 1 -
gnu/packages/emacs.scm | 5 ++--
gnu/packages/patches/emacs-exec-path.patch | 12 +++++-----
.../emacs-ignore-empty-xim-styles.patch | 24 -------------------
4 files changed, 8 insertions(+), 34 deletions(-)
delete mode 100644 gnu/packages/patches/emacs-ignore-empty-xim-styles.patch

Toggle diff (94 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 70133e6502..585a605138 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1029,7 +1029,6 @@ dist_patch_DATA = \
%D%/packages/patches/elogind-revert-polkit-detection.patch \
%D%/packages/patches/emacs-exec-path.patch \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
- %D%/packages/patches/emacs-ignore-empty-xim-styles.patch \
%D%/packages/patches/emacs-json-reformat-fix-tests.patch \
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
%D%/packages/patches/emacs-hyperbole-toggle-messaging.patch \
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index bfb3f9790e..7d791250d2 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -79,17 +79,16 @@ (define-module (gnu packages emacs)
(define-public emacs
(package
(name "emacs")
- (version "27.2")
+ (version "28.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/emacs/emacs-"
version ".tar.xz"))
(sha256
(base32
- "1ff182gjw9wqsbx1kj5gl2r5pbqhp4ar54g04j33fgz6g17cr9xl"))
+ "1qbmmmhnjhn4lvzsnyk7l5ganbi6wzbm38jc1a7hhyh3k78b7c98"))
(patches (search-patches "emacs-exec-path.patch"
"emacs-fix-scheme-indent-function.patch"
- "emacs-ignore-empty-xim-styles.patch"
"emacs-source-date-epoch.patch"))
(modules '((guix build utils)))
(snippet
diff --git a/gnu/packages/patches/emacs-exec-path.patch b/gnu/packages/patches/emacs-exec-path.patch
index 7303599df1..9a76b0237d 100644
--- a/gnu/packages/patches/emacs-exec-path.patch
+++ b/gnu/packages/patches/emacs-exec-path.patch
@@ -4,13 +4,13 @@ with things like GCC being referenced.
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
-@@ -481,7 +481,8 @@ lost after dumping")))
+@@ -530,7 +530,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))))
+- (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)
+ (when (and (featurep 'native-compile)
+ (equal dump-mode "pdump"))
+ ;; Don't enable this before bootstrap is completed, as the
diff --git a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch b/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch
deleted file mode 100644
index 398e65bdc8..0000000000
--- a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Fix contributed upstream here:
-https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694.
-
-Index: emacs-26.3/src/xfns.c
-===================================================================
---- emacs-26.3.orig/src/xfns.c
-+++ emacs-26.3/src/xfns.c
-@@ -2628,6 +2628,8 @@ xic_free_xfontset (struct frame *f)
- static XIMStyle
- best_xim_style (XIMStyles *xim)
- {
-+ if (xim == NULL) goto out;
-+
- int i, j;
- int nr_supported = ARRAYELTS (supported_xim_styles);
-
-@@ -2636,6 +2638,7 @@ best_xim_style (XIMStyles *xim)
- if (supported_xim_styles[i] == xim->supported_styles[j])
- return supported_xim_styles[i];
-
-+ out:
- /* Return the default style. */
- return XIMPreeditNothing | XIMStatusNothing;
- }

base-commit: 5059e7f01e1d299a2a52b1649251fa49f1992385
--
2.34.0
L
L
Liliana Marie Prikler wrote on 10 Apr 2022 13:28
[PATCH v3 2/3] gnu: emacs: Use new package style.
(address . 54829@debbugs.gnu.org)
b9e5d9768567a6da6670f8dff3420f6fc5202bf8.camel@gmail.com
* gnu/packages/emacs.scm (emacs)[source]<snippet>: Drop trailing ‘#t’.
[arguments]: Convert to list of G-Expressions.
Use ‘search-input-file’ where possible.
Inline references to auxiliary files.
Drop trailing ‘#t’s.
[inputs, native-inputs]: Drop labels.
---
gnu/packages/emacs.scm | 327 ++++++++++++++++++++---------------------
1 file changed, 161 insertions(+), 166 deletions(-)

Toggle diff (365 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7d791250d2..a32fe624dd 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -41,6 +41,7 @@
(define-module (gnu packages emacs)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
@@ -51,6 +52,7 @@ (define-module (gnu packages emacs)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages gd)
#:use-module (gnu packages gettext)
@@ -119,183 +121,176 @@ (define-public emacs
(list line
"\"~/.guix-profile/include\""
"\"/var/guix/profiles/system/profile/include\"")
- " ")))
- #t))))
+ " ")))))))
(build-system glib-or-gtk-build-system)
(arguments
- `(#:tests? #f ; no check target
- #:configure-flags (list "--with-modules"
- "--with-cairo"
- "--disable-build-details")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-program-file-names
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("src/callproc.c"
- "lisp/term.el"
- "lisp/htmlfontify.el"
- "lisp/textmodes/artist.el"
- "lisp/progmodes/sh-script.el")
- (("\"/bin/sh\"")
- (format #f "~s" (which "sh"))))
- (substitute* "lisp/doc-view.el"
- (("\"(gs|dvipdf|ps2pdf)\"" all what)
- (let ((ghostscript (assoc-ref inputs "ghostscript")))
- (if ghostscript
- (string-append "\"" ghostscript "/bin/" what "\"")
- all)))
- (("\"(pdftotext)\"" all what)
- (let ((poppler (assoc-ref inputs "poppler")))
- (if poppler
- (string-append "\"" poppler "/bin/" what "\"")
- all))))
- ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
- ;; respectively when looking for GVFS processes.
- (substitute* "lisp/net/tramp-gvfs.el"
- (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process)
- (format #f "(or ~a (tramp-compat-process-running-p ~s))"
- all (string-append "." process "-real"))))
- #t))
- (add-before 'configure 'fix-/bin/pwd
- (lambda _
- ;; Use `pwd', not `/bin/pwd'.
- (substitute* (find-files "." "^Makefile\\.in$")
- (("/bin/pwd")
- "pwd"))
- #t))
- (add-after 'install 'install-site-start
- ;; Use 'guix-emacs' in "site-start.el", which is used autoload the
- ;; Elisp packages found in EMACSLOADPATH.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lisp-dir (string-append out "/share/emacs/site-lisp"))
- (emacs (string-append out "/bin/emacs")))
+ (list
+ #:tests? #f ; no check target
+ #:configure-flags #~(list "--with-modules"
+ "--with-cairo"
+ "--disable-build-details")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-program-file-names
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("src/callproc.c"
+ "lisp/term.el"
+ "lisp/htmlfontify.el"
+ "lisp/textmodes/artist.el"
+ "lisp/progmodes/sh-script.el")
+ (("\"/bin/sh\"")
+ (format #f "~s" (search-input-file inputs "/bin/sh"))))
+ (substitute* "lisp/doc-view.el"
+ (("\"(gs|dvipdf|ps2pdf|pdftotext)\"" all what)
+ (let ((replacement (search-input-file
+ inputs
+ (string-append "/bin/" what))))
+ (if replacement
+ (string-append "\"" replacement "\"")
+ all))))
+ ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
+ ;; respectively when looking for GVFS processes.
+ (substitute* "lisp/net/tramp-gvfs.el"
+ (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process)
+ (format #f "(or ~a (tramp-compat-process-running-p ~s))"
+ all (string-append "." process "-real"))))))
+ (add-before 'configure 'fix-/bin/pwd
+ (lambda _
+ ;; Use `pwd', not `/bin/pwd'.
+ (substitute* (find-files "." "^Makefile\\.in$")
+ (("/bin/pwd")
+ "pwd"))))
+ (add-after 'install 'install-site-start
+ ;; Use 'guix-emacs' in "site-start.el", which is used autoload the
+ ;; Elisp packages found in EMACSLOADPATH.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lisp-dir (string-append out "/share/emacs/site-lisp"))
+ (emacs (string-append out "/bin/emacs")))
- ;; This is duplicated from emacs-utils to prevent coupling.
- (define* (emacs-byte-compile-directory dir)
- (let ((expr `(progn
- (setq byte-compile-debug t)
- (byte-recompile-directory
- (file-name-as-directory ,dir) 0 1))))
- (invoke emacs "--quick" "--batch"
- (format #f "--eval=~s" expr))))
+ ;; This is duplicated from emacs-utils to prevent coupling.
+ (define* (emacs-byte-compile-directory dir)
+ (let ((expr `(progn
+ (setq byte-compile-debug t)
+ (byte-recompile-directory
+ (file-name-as-directory ,dir) 0 1))))
+ (invoke emacs "--quick" "--batch"
+ (format #f "--eval=~s" expr))))
- (copy-file (assoc-ref inputs "guix-emacs.el")
- (string-append lisp-dir "/guix-emacs.el"))
- (with-output-to-file (string-append lisp-dir "/site-start.el")
- (lambda ()
- (display
- (string-append
- "(when (require 'guix-emacs nil t)\n"
- " (guix-emacs-autoload-packages)\n"
- " (advice-add 'package-load-all-descriptors"
- " :after #'guix-emacs-load-package-descriptors))"))))
- ;; Remove the extraneous subdirs.el file, as it causes Emacs to
- ;; add recursively all the the sub-directories of a profile's
- ;; share/emacs/site-lisp union when added to EMACSLOADPATH,
- ;; which leads to conflicts.
- (delete-file (string-append lisp-dir "/subdirs.el"))
- ;; Byte compile the site-start files.
- (emacs-byte-compile-directory lisp-dir))
- #t))
- (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp
- ;; restore the dump file that Emacs installs somewhere in
- ;; libexec/ to its original state
- (lambda* (#:key outputs target #:allow-other-keys)
- (let* ((libexec (string-append (assoc-ref outputs "out")
- "/libexec"))
- ;; each of these ought to only match a single file,
- ;; but even if not (find-files) sorts by string<,
- ;; so the Nth element in one maps to the Nth element of
- ;; the other
- (pdmp (find-files libexec "\\.pdmp$"))
- (pdmp-real (find-files libexec "\\.pdmp-real$")))
- (for-each rename-file pdmp-real pdmp))))
- (add-after 'glib-or-gtk-wrap 'strip-double-wrap
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
- ;; twice. This also fixes a minor issue, where WMs would not be
- ;; able to track emacs back to emacs.desktop.
- (with-directory-excursion (assoc-ref outputs "out")
- (copy-file
- (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
- "bin/emacs")
- #t)))
- (add-after 'strip-double-wrap 'wrap-emacs-paths
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lisp-dirs (find-files (string-append out "/share/emacs")
- "^lisp$"
- #:directories? #t)))
- (for-each
- (lambda (prog)
- (wrap-program prog
- ;; emacs-next and variants rely on uname being in PATH for
- ;; Tramp. Tramp paths can't be hardcoded, because they
- ;; need to be portable.
- `("PATH" suffix
- ,(map (lambda (in) (string-append in "/bin"))
- (list (assoc-ref inputs "gzip")
- (assoc-ref inputs "coreutils"))))
- `("EMACSLOADPATH" suffix ,lisp-dirs)))
- (find-files (string-append out "/bin")
- ;; Matches versioned and unversioned emacs binaries.
- ;; We don't patch emacsclient, because it takes its
- ;; environment variables from emacs.
- ;; Likewise, we don't need to patch helper binaries
- ;; like etags, ctags or ebrowse.
- "^emacs(-[0-9]+(\\.[0-9]+)*)?$"))))))))
+ (copy-file #$(local-file
+ (search-auxiliary-file "emacs/guix-emacs.el"))
+ (string-append lisp-dir "/guix-emacs.el"))
+ (with-output-to-file (string-append lisp-dir "/site-start.el")
+ (lambda ()
+ (display
+ (string-append
+ "(when (require 'guix-emacs nil t)\n"
+ " (guix-emacs-autoload-packages)\n"
+ " (advice-add 'package-load-all-descriptors"
+ " :after #'guix-emacs-load-package-descriptors))"))))
+ ;; Remove the extraneous subdirs.el file, as it causes Emacs to
+ ;; add recursively all the the sub-directories of a profile's
+ ;; share/emacs/site-lisp union when added to EMACSLOADPATH,
+ ;; which leads to conflicts.
+ (delete-file (string-append lisp-dir "/subdirs.el"))
+ ;; Byte compile the site-start files.
+ (emacs-byte-compile-directory lisp-dir))))
+ (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp
+ ;; restore the dump file that Emacs installs somewhere in
+ ;; libexec/ to its original state
+ (lambda* (#:key outputs target #:allow-other-keys)
+ (let* ((libexec (string-append (assoc-ref outputs "out")
+ "/libexec"))
+ ;; each of these ought to only match a single file,
+ ;; but even if not (find-files) sorts by string<,
+ ;; so the Nth element in one maps to the Nth element of
+ ;; the other
+ (pdmp (find-files libexec "\\.pdmp$"))
+ (pdmp-real (find-files libexec "\\.pdmp-real$")))
+ (for-each rename-file pdmp-real pdmp))))
+ (add-after 'glib-or-gtk-wrap 'strip-double-wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
+ ;; twice. This also fixes a minor issue, where WMs would not be
+ ;; able to track emacs back to emacs.desktop.
+ (with-directory-excursion (assoc-ref outputs "out")
+ (copy-file
+ (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
+ "bin/emacs"))))
+ (add-after 'strip-double-wrap 'wrap-emacs-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lisp-dirs (find-files (string-append out "/share/emacs")
+ "^lisp$"
+ #:directories? #t)))
+ (for-each
+ (lambda (prog)
+ (wrap-program prog
+ ;; emacs-next and variants rely on uname being in PATH for
+ ;; Tramp. Tramp paths can't be hardcoded, because they
+ ;; need to be portable.
+ `("PATH" suffix
+ ,(map dirname
+ (list (search-input-file inputs "/bin/gzip")
+ ;; for coreutils
+ (search-input-file inputs "/bin/yes"))))
+ `("EMACSLOADPATH" suffix ,lisp-dirs)))
+ (find-files (string-append out "/bin")
+ ;; Matches versioned and unversioned emacs binaries.
+ ;; We don't patch emacsclient, because it takes its
+ ;; environment variables from emacs.
+ ;; Likewise, we don't need to patch helper binaries
+ ;; like etags, ctags or ebrowse.
+ "^emacs(-[0-9]+(\\.[0-9]+)*)?$"))))))))
(inputs
- `(("gnutls" ,gnutls)
- ("ncurses" ,ncurses)
+ (list gnutls
+ ncurses
- ;; Required for "core" functionality, such as dired and compression.
- ("coreutils" ,coreutils)
- ("gzip" ,gzip)
+ ;; Required for "core" functionality, such as dired and compression.
+ coreutils
+ gzip
- ;; Avoid Emacs's limited movemail substitute that retrieves POP3 email
- ;; only via insecure channels. This is not needed for (modern) IMAP.
- ("mailutils" ,mailutils)
+ ;; Avoid Emacs's limited movemail substitute that retrieves POP3
+ ;; email only via insecure channels.
+ ;; This is not needed for (modern) IMAP.
+ mailutils
- ;; TODO: Add the optional dependencies.
- ("gpm" ,gpm)
- ("libx11" ,libx11)
- ("gtk+" ,gtk+)
- ("cairo" ,cairo)
- ("pango" ,pango)
- ("harfbuzz" ,harfbuzz)
- ("libxft" ,libxft)
- ("libtiff" ,libtiff)
- ("giflib" ,giflib)
- ("libjpeg" ,libjpeg-turbo)
- ("acl" ,acl)
- ("jansson" ,jansson)
- ("gmp" ,gmp)
- ("ghostscript" ,ghostscript)
- ("poppler" ,poppler)
+ ;; TODO: Add the optional dependencies.
+ gpm
+ libx11
+ gtk+
+ cairo
+ pango
+ harfbuzz
+ libxft
+ libtiff
+ giflib
+ libjpeg-turbo
+ acl
+ jansson
+ gmp
+ ghostscript
+ poppler
- ;; When looking for libpng `configure' links with `-lpng -lz', so we
- ;; must also provide zlib as an input.
- ("libpng" ,libpng)
- ("zlib" ,zlib)
- ("librsvg" ,@(if (target-x86-64?)
- (list librsvg-bootstrap)
- (list librsvg-2.40)))
- ("libxpm" ,libxpm)
- ("libxml2" ,libxml2)
- ("libice" ,libice)
- ("libsm" ,libsm)
- ("alsa-lib" ,alsa-lib)
- ("dbus" ,dbus)
+ ;; When looking for libpng `configure' links with `-lpng -lz', so we
+ ;; must also provide zlib as an input.
+ libpng
+ zlib
+ (if (target-x86-64?)
+ librsvg-bootstrap
+ librsvg-2.40)
+ libxpm
+ libxml2
+ libice
+ libsm
+ alsa-lib
+ dbus
- ;; multilingualization support
- ("libotf" ,libotf)
- ("m17n-lib" ,m17n-lib)))
+ ;; multilingualization support
+ libotf
+ m17n-lib))
(native-inputs
- `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el"))
- ("pkg-config" ,pkg-config)
- ("texinfo" ,texinfo)))
-
+ (list pkg-config texinfo))
(native-search-paths
(list (search-path-specification
(variable "EMACSLOADPATH")
--
2.34.0
L
L
Liliana Marie Prikler wrote on 10 Apr 2022 13:32
[PATCH v3 3/3] gnu: emacs: Add support for socket activation.
(address . 54829@debbugs.gnu.org)
ea79ad869b1630dd0ecd9cc5d5dd04b6333e8522.camel@gmail.com
* gnu/packages/emacs.scm (emacs)[#:phases]: Add ‘enable-elogind’.
[inputs]: Add elogind.
[native-inputs]: Add autoconf.
---
gnu/packages/emacs.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a32fe624dd..847731b95d 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -131,6 +131,11 @@ (define-public emacs
"--disable-build-details")
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'enable-elogind
+ (lambda _
+ (substitute* "configure.ac"
+ (("libsystemd") "libelogind"))
+ (delete-file "configure")))
(add-after 'unpack 'patch-program-file-names
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("src/callproc.c"
@@ -271,6 +276,7 @@ (define* (emacs-byte-compile-directory dir)
gmp
ghostscript
poppler
+ elogind
;; When looking for libpng `configure' links with `-lpng -lz', so we
;; must also provide zlib as an input.
@@ -290,7 +296,7 @@ (define* (emacs-byte-compile-directory dir)
libotf
m17n-lib))
(native-inputs
- (list pkg-config texinfo))
+ (list autoconf pkg-config texinfo))
(native-search-paths
(list (search-path-specification
(variable "EMACSLOADPATH")
--
2.34.0
L
L
Luis Henrique Gomes Higino wrote on 26 Apr 2022 23:27
Other emacs packages
(address . 54829@debbugs.gnu.org)(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87k0bb5xw2.fsf@gmail.com
Hi Liliana,

I think the emacs-next packages should be updated as well on this
patch series. Also, you could add a version with
native-compilation, like we have for wide-int and xwidgets.

Regards,
--
Luis H. Higino
L
L
Ludovic Courtès wrote on 28 Apr 2022 14:15
Re: bug#54829: [PATCH 0/2] Update Emacs to 28.1 and add socket activation
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
878rrpe74s.fsf_-_@gnu.org
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

Toggle quote (4 lines)
> * gnu/packages/emacs.scm (emacs)[#:phases]: Add ‘enable-elogind’.
> [inputs]: Add elogind.
> [native-inputs]: Add autoconf.

[...]

Toggle quote (5 lines)
> + (add-after 'unpack 'enable-elogind
> + (lambda _
> + (substitute* "configure.ac"
> + (("libsystemd") "libelogind"))

I suggest making that substitution in ‘configure’…

Toggle quote (4 lines)
> (native-inputs
> - (list pkg-config texinfo))
> + (list autoconf pkg-config texinfo))

… so you don’t need this extra dependency.

Otherwise it LGTM.

Perhaps you can push to a ‘wip-emacs-28’ branch, and then ping me or
another admin on #guix so we can tell ci.guix to build it. Once it’s
built and we don’t see regressions, we can merge in ‘master’ (should
take a day or two at most I suppose).

Thanks,
Ludo’.

PS: First time it takes more than a few hours for a new Emacs version to
land in Guix! :-)
M
M
Maxime Devos wrote on 28 Apr 2022 17:06
bc72ceb2a78fe054d790cb640e44f3b978dbae22.camel@telenet.be
Ludovic Courtès schreef op do 28-04-2022 om 14:15 [+0200]:
Toggle quote (13 lines)
> > +          (add-after 'unpack 'enable-elogind
> > +            (lambda _
> > +              (substitute* "configure.ac"
> > +                (("libsystemd") "libelogind"))
>
> I suggest making that substitution in ‘configure’…
>
> >       (native-inputs
> > -     (list pkg-config texinfo))
> > +     (list autoconf pkg-config texinfo))
>
> … so you don’t need this extra dependency.

I thought the idea was to, long term, build 'configure' from source
(except for packages low on the graph where there would be bootstrap
problems)?


Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmqteRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7h9hAP0QR0bcx3cTEP2M7Q8ywySuqEHd
LTAwApxQqICKBjD2CQD9Hk7m33HMksl9yw+Fwju/oCH0W2h+4zmWqMD9M1K7AgY=
=36j/
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 28 Apr 2022 17:31
136deacc67186b6a18344a20c6e51417f2b27f8f.camel@gmail.com
Am Donnerstag, dem 28.04.2022 um 17:06 +0200 schrieb Maxime Devos:
Toggle quote (19 lines)
> Ludovic Courtès schreef op do 28-04-2022 om 14:15 [+0200]:
> > > +          (add-after 'unpack 'enable-elogind
> > > +            (lambda _
> > > +              (substitute* "configure.ac"
> > > +                (("libsystemd") "libelogind"))
> >
> > I suggest making that substitution in ‘configure’…
> >
> > >       (native-inputs
> > > -     (list pkg-config texinfo))
> > > +     (list autoconf pkg-config texinfo))
> >
> > … so you don’t need this extra dependency.
>
> I thought the idea was to, long term, build 'configure' from source
> (except for packages low on the graph where there would be bootstrap
> problems)?
>
> https://lists.gnu.org/archive/html/guix-devel/2022-04/msg00065.html
To add to this, configure doesn't exist in emacs-next variants, so I
find it better to just wrap the existing code in a (when (file-exists?
...) ...) rather than boot from blessed blobs in this particular
instance.

Cheers
L
L
Liliana Marie Prikler wrote on 28 Apr 2022 18:58
(name . Ludovic Courtès)(address . ludo@gnu.org)
1e98dfcd710c534c6d413c3730ba15cc28f63a1c.camel@gmail.com
Hi,

Am Donnerstag, dem 28.04.2022 um 14:15 +0200 schrieb Ludovic Courtès:
Toggle quote (4 lines)
> Perhaps you can push to a ‘wip-emacs-28’ branch, and then ping me or
> another admin on #guix so we can tell ci.guix to build it.  Once it’s
> built and we don’t see regressions, we can merge in ‘master’ (should
> take a day or two at most I suppose).
I pushed an ‘emacs-28’ branch (dropped the ‘wip-’ by accident), in
which emacs, emacs-next and emacs-next-pgtk are all updated. Native
compilation in emacs is still missing though, but someone with commit
access and enough time to spare could add it.

Cheers
L
L
Ludovic Courtès wrote on 28 Apr 2022 22:15
(name . Maxime Devos)(address . maximedevos@telenet.be)
87h76dars1.fsf@gnu.org
Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (20 lines)
> Ludovic Courtès schreef op do 28-04-2022 om 14:15 [+0200]:
>> > +          (add-after 'unpack 'enable-elogind
>> > +            (lambda _
>> > +              (substitute* "configure.ac"
>> > +                (("libsystemd") "libelogind"))
>>
>> I suggest making that substitution in ‘configure’…
>>
>> >       (native-inputs
>> > -     (list pkg-config texinfo))
>> > +     (list autoconf pkg-config texinfo))
>>
>> … so you don’t need this extra dependency.
>
> I thought the idea was to, long term, build 'configure' from source
> (except for packages low on the graph where there would be bootstrap
> problems)?
>
> https://lists.gnu.org/archive/html/guix-devel/2022-04/msg00065.html

Ah yes, that too. See? The power of habits, the beauty of
self-contradiction. :-)

Liliana: I guess Maxime is right, you can keep this version.

Thanks,
Ludo’.
F
F
Feng Shu wrote on 29 Apr 2022 05:22
Re: [bug#54829] [PATCH 0/2] Update Emacs to 28.1 and add socket activation
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87a6c44lq9.fsf@163.com
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (10 lines)
> Hi,
>
> Am Donnerstag, dem 28.04.2022 um 14:15 +0200 schrieb Ludovic Courtès:
>> Perhaps you can push to a ‘wip-emacs-28’ branch, and then ping me or
>> another admin on #guix so we can tell ci.guix to build it.  Once it’s
>> built and we don’t see regressions, we can merge in ‘master’ (should
>> take a day or two at most I suppose).
> I pushed an ‘emacs-28’ branch (dropped the ‘wip-’ by accident), in
> which emacs, emacs-next and emacs-next-pgtk are all updated. Native

What about add --with-xinput2 emacs-next, use version 2 of the X Input Extension for input

Toggle quote (5 lines)
> compilation in emacs is still missing though, but someone with commit
> access and enough time to spare could add it.
>
> Cheers

--
L
L
Liliana Marie Prikler wrote on 29 Apr 2022 20:53
(name . Feng Shu)(address . tumashu@163.com)
41b0bd87cdfbadc6a55d5a60cf9a1e1c2ed000f1.camel@gmail.com
Am Freitag, dem 29.04.2022 um 11:22 +0800 schrieb Feng Shu:
Toggle quote (16 lines)
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Hi,
> >
> > Am Donnerstag, dem 28.04.2022 um 14:15 +0200 schrieb Ludovic
> > Courtès:
> > > Perhaps you can push to a ‘wip-emacs-28’ branch, and then ping me
> > > or another admin on #guix so we can tell ci.guix to build it. 
> > > Once it’s built and we don’t see regressions, we can merge in
> > > ‘master’ (should take a day or two at most I suppose).
> > I pushed an ‘emacs-28’ branch (dropped the ‘wip-’ by accident), in
> > which emacs, emacs-next and emacs-next-pgtk are all updated. 
> > Native
>
> What about add --with-xinput2 emacs-next, use version 2 of the X
> Input Extension for input
I'm probably not up to date to all the Emacs stuff, but given that
"guix show xinput" only delivers 1.6, I don't think that's relevant
yet. Or is it?
T
T
tumashu wrote on 29 Apr 2022 23:56
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
2ebd12e4.2d9.1807752e04b.Coremail.tumashu@163.com
--
?????????????
<br/><br/><br/>


----- Original Message -----
From: "Liliana Marie Prikler" <liliana.prikler@gmail.com>
To: "Feng Shu" <tumashu@163.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, "Maxime Devos" <maximedevos@telenet.be>, 54829@debbugs.gnu.org, zimoun <zimon.toutoune@gmail.com>
Sent: Fri, 29 Apr 2022 20:53:03 +0200
Subject: Re: [bug#54829] [PATCH 0/2] Update Emacs to 28.1 and add socket activation

Am Freitag, dem 29.04.2022 um 11:22 +0800 schrieb Feng Shu:
Toggle quote (16 lines)
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Hi,
> >
> > Am Donnerstag, dem 28.04.2022 um 14:15 +0200 schrieb Ludovic
> > Courtès:
> > > Perhaps you can push to a ‘wip-emacs-28’ branch, and then ping me
> > > or another admin on #guix so we can tell ci.guix to build it.
> > > Once it’s built and we don’t see regressions, we can merge in
> > > ‘master’ (should take a day or two at most I suppose).
> > I pushed an ‘emacs-28’ branch (dropped the ‘wip-’ by accident), in
> > which emacs, emacs-next and emacs-next-pgtk are all updated.
> > Native
>
> What about add --with-xinput2 emacs-next, use version 2 of the X
> Input Extension for input
I'm probably not up to date to all the Emacs stuff, but given that
"guix show xinput" only delivers 1.6, I don't think that's relevant

yet. Or is it?







no, i think it use X11/extensions/XInput2.h
Attachment: file
M
M
Maxim Cournoyer wrote on 18 May 2022 06:13
Re: bug#54829: [PATCH 0/2] Update Emacs to 28.1 and add socket activation
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
8735h732cg.fsf_-_@gmail.com
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (21 lines)
> Am Freitag, dem 29.04.2022 um 11:22 +0800 schrieb Feng Shu:
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>> > Hi,
>> >
>> > Am Donnerstag, dem 28.04.2022 um 14:15 +0200 schrieb Ludovic
>> > Courtès:
>> > > Perhaps you can push to a ‘wip-emacs-28’ branch, and then ping me
>> > > or another admin on #guix so we can tell ci.guix to build it. 
>> > > Once it’s built and we don’t see regressions, we can merge in
>> > > ‘master’ (should take a day or two at most I suppose).
>> > I pushed an ‘emacs-28’ branch (dropped the ‘wip-’ by accident), in
>> > which emacs, emacs-next and emacs-next-pgtk are all updated. 
>> > Native
>>
>> What about add --with-xinput2 emacs-next, use version 2 of the X
>> Input Extension for input
> I'm probably not up to date to all the Emacs stuff, but given that
> "guix show xinput" only delivers 1.6, I don't think that's relevant
> yet. Or is it?

As it seems this change was merge, don't forget to close it if
everything mentioned here was taken care of :-)

Thanks,

Maxim
L
L
Liliana Marie Prikler wrote on 18 May 2022 19:47
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
0f7d36ab5119773a9dd5e3468e795c724536489e.camel@gmail.com
Am Mittwoch, dem 18.05.2022 um 00:13 -0400 schrieb Maxim Cournoyer:
Toggle quote (2 lines)
> As it seems this change was merge, don't forget to close it if
> everything mentioned here was taken care of :-)
Well, it's not literally "everything" related to Emacs 28, but it is at
least this series, so I'll mark it as done. Also deleted the emacs-28
branch as it's no longer relevant.

Cheers
Closed
?