* [bug#43087] [PATCH] gnu: emacs: Strip double wrap.
@ 2020-08-28 13:34 Leo Prikler
2020-08-29 11:24 ` bug#43087: " Mathieu Othacehe
0 siblings, 1 reply; 6+ messages in thread
From: Leo Prikler @ 2020-08-28 13:34 UTC (permalink / raw)
To: 43087
* gnu/packages/emacs.scm (emacs)[#:phases]: Add 'strip-double-wrap.
---
gnu/packages/emacs.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a338abc774..84c1889617 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -191,6 +191,17 @@
(rename-file real wrapper))
pdmp pdmp-real))
#t))
+ (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 (string-append
+ "bin/emacs-"
+ ,(version-major+minor (package-version emacs)))
+ "bin/emacs")
+ #t)))
(add-before 'reset-gzip-timestamps 'make-compressed-files-writable
;; The 'reset-gzip-timestamps phase will throw a permission error
;; if gzip files aren't writable then. This phase is needed when
--
2.28.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#43087: [PATCH] gnu: emacs: Strip double wrap.
2020-08-28 13:34 [bug#43087] [PATCH] gnu: emacs: Strip double wrap Leo Prikler
@ 2020-08-29 11:24 ` Mathieu Othacehe
2020-08-29 14:04 ` [bug#43087] " Mathieu Othacehe
0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Othacehe @ 2020-08-29 11:24 UTC (permalink / raw)
To: Leo Prikler; +Cc: 43087-done
Hello Leo,
> * gnu/packages/emacs.scm (emacs)[#:phases]: Add 'strip-double-wrap.
Pushed, thanks!
Mathieu
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#43087] [PATCH] gnu: emacs: Strip double wrap.
2020-08-29 11:24 ` bug#43087: " Mathieu Othacehe
@ 2020-08-29 14:04 ` Mathieu Othacehe
2020-08-29 14:25 ` Leo Prikler
0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Othacehe @ 2020-08-29 14:04 UTC (permalink / raw)
To: 43087; +Cc: leo.prikler
Hey Leo,
> Pushed, thanks!
I did revert this commit because it causes several regressions for
me. For some reason, "notmuch" and "emacs-guix" packages do not build
and Emacs refuses to load any package.
Could you have a look?
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#43087] [PATCH] gnu: emacs: Strip double wrap.
2020-08-29 14:04 ` [bug#43087] " Mathieu Othacehe
@ 2020-08-29 14:25 ` Leo Prikler
2020-08-29 15:42 ` Leo Prikler
0 siblings, 1 reply; 6+ messages in thread
From: Leo Prikler @ 2020-08-29 14:25 UTC (permalink / raw)
To: Mathieu Othacehe, 43087
Am Samstag, den 29.08.2020, 16:04 +0200 schrieb Mathieu Othacehe:
> Hey Leo,
>
> > Pushed, thanks!
>
> I did revert this commit because it causes several regressions for
> me. For some reason, "notmuch" and "emacs-guix" packages do not build
It seems this is because the phase inadvertently gets propagated to
emacs-minimal et al. just like the restore-pdmp phase. We could just
delete it where not needed, but perhaps there's a better way of doing
that. I think we should make emacs-minimal the base package and have
every other emacs package inherit it, so as to not cause too much
cross-pollution.
> and Emacs refuses to load any package.
I don't exactly know, what you mean by that. Putting aside the
bootstrapping problem of building the package [since emacs-minimal is
broken], I have no issue running this emacs-next with EMACSLOADPATH
already set from my profile.
> Could you have a look?
I'm on it ;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#43087] [PATCH] gnu: emacs: Strip double wrap.
2020-08-29 14:25 ` Leo Prikler
@ 2020-08-29 15:42 ` Leo Prikler
2020-08-31 7:52 ` Mathieu Othacehe
0 siblings, 1 reply; 6+ messages in thread
From: Leo Prikler @ 2020-08-29 15:42 UTC (permalink / raw)
To: Mathieu Othacehe, 43087
[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]
Am Samstag, den 29.08.2020, 16:25 +0200 schrieb Leo Prikler:
> Am Samstag, den 29.08.2020, 16:04 +0200 schrieb Mathieu Othacehe:
> > Hey Leo,
> >
> > > Pushed, thanks!
> >
> > I did revert this commit because it causes several regressions for
> > me. For some reason, "notmuch" and "emacs-guix" packages do not
> > build
> It seems this is because the phase inadvertently gets propagated to
> emacs-minimal et al. just like the restore-pdmp phase. We could just
> delete it where not needed, but perhaps there's a better way of doing
> that. I think we should make emacs-minimal the base package and have
> every other emacs package inherit it, so as to not cause too much
> cross-pollution.
While doing so would probably eradicate some bugs, having had a look at
the patch, that this would generate, I'm not so sure how beneficial it
would be in the long run. I decided to use the shorter approach and
just delete it.
emacs-guix now builds and seems to function well in the correct (pure)
environment. Haven't tested notmuch, but it should also work.
[-- Attachment #2: 0001-gnu-emacs-Strip-double-wrap.patch --]
[-- Type: text/x-patch, Size: 3534 bytes --]
From 3a939372bfe5281ed525fb24bef5f4bc86bfb472 Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Fri, 28 Aug 2020 15:34:00 +0200
Subject: [PATCH] gnu: emacs: Strip double wrap.
* gnu/packages/emacs.scm (emacs)[#:phases]: Add 'strip-double-wrap.
(emacs-minimal emacs-xwidgets emacs-no-x)
(emacs-no-x-toolkit guile-emacs)[#:phases]: Delete 'strip-double-wrap.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
gnu/packages/emacs.scm | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a338abc774..0cd3e04381 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -191,6 +191,17 @@
(rename-file real wrapper))
pdmp pdmp-real))
#t))
+ (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 (string-append
+ "bin/emacs-"
+ ,(version-major+minor (package-version emacs)))
+ "bin/emacs")
+ #t)))
(add-before 'reset-gzip-timestamps 'make-compressed-files-writable
;; The 'reset-gzip-timestamps phase will throw a permission error
;; if gzip files aren't writable then. This phase is needed when
@@ -278,7 +289,8 @@ languages.")
`(list "--with-gnutls=no" "--disable-build-details"))
((#:phases phases)
`(modify-phases ,phases
- (delete 'restore-emacs-pdmp)))))
+ (delete 'restore-emacs-pdmp)
+ (delete 'strip-double-wrap)))))
(inputs
`(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el"))
("ncurses" ,ncurses)))
@@ -297,7 +309,8 @@ editor (with xwidgets support)")
`(cons "--with-xwidgets" ,flags))
((#:phases phases)
`(modify-phases ,phases
- (delete 'restore-emacs-pdmp)))))
+ (delete 'restore-emacs-pdmp)
+ (delete 'strip-double-wrap)))))
(inputs
`(("webkitgtk" ,webkitgtk)
("libxcomposite" ,libxcomposite)
@@ -323,7 +336,8 @@ editor (console only)")
`(delete "--with-cairo" ,flags))
((#:phases phases)
`(modify-phases ,phases
- (delete 'restore-emacs-pdmp)))))))
+ (delete 'restore-emacs-pdmp)
+ (delete 'strip-double-wrap)))))))
(define-public emacs-no-x-toolkit
(package/inherit emacs
@@ -339,7 +353,8 @@ editor (without an X toolkit)" )
`(cons "--with-x-toolkit=no" ,flags))
((#:phases phases)
`(modify-phases ,phases
- (delete 'restore-emacs-pdmp)))))))
+ (delete 'restore-emacs-pdmp)
+ (delete 'strip-double-wrap)))))))
(define-public emacs-wide-int
(package/inherit emacs
@@ -389,7 +404,8 @@ editor (with wide ints)" )
(add-before 'build 'make-deps-dir
(lambda _
(invoke "mkdir" "-p" "src/deps")))
- (delete 'restore-emacs-pdmp))))))))
+ (delete 'restore-emacs-pdmp)
+ (delete 'strip-double-wrap))))))))
(define-public m17n-db
(package
--
2.28.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#43087] [PATCH] gnu: emacs: Strip double wrap.
2020-08-29 15:42 ` Leo Prikler
@ 2020-08-31 7:52 ` Mathieu Othacehe
0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Othacehe @ 2020-08-31 7:52 UTC (permalink / raw)
To: Leo Prikler; +Cc: 43087-done
Hey Leo,
> While doing so would probably eradicate some bugs, having had a look at
> the patch, that this would generate, I'm not so sure how beneficial it
> would be in the long run. I decided to use the shorter approach and
> just delete it.
Seems fair! Everything seems fine this time and my WM is happy. Pushed
as 68be4da83087d0faff227c61ca93c7679230c998.
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-08-31 7:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28 13:34 [bug#43087] [PATCH] gnu: emacs: Strip double wrap Leo Prikler
2020-08-29 11:24 ` bug#43087: " Mathieu Othacehe
2020-08-29 14:04 ` [bug#43087] " Mathieu Othacehe
2020-08-29 14:25 ` Leo Prikler
2020-08-29 15:42 ` Leo Prikler
2020-08-31 7:52 ` Mathieu Othacehe
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.