GNU bug report logs - #43087
[PATCH] gnu: emacs: Strip double wrap.

Previous Next

Package: guix-patches;

Reported by: Leo Prikler <leo.prikler <at> student.tugraz.at>

Date: Fri, 28 Aug 2020 13:35:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43087 in the body.
You can then email your comments to 43087 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#43087; Package guix-patches. (Fri, 28 Aug 2020 13:35:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 28 Aug 2020 13:35:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: emacs: Strip double wrap.
Date: Fri, 28 Aug 2020 15:34:00 +0200
* 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





Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Sat, 29 Aug 2020 11:25:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
bug acknowledged by developer. (Sat, 29 Aug 2020 11:25:02 GMT) Full text and rfc822 format available.

Message #10 received at 43087-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 43087-done <at> debbugs.gnu.org
Subject: Re: [bug#43087] [PATCH] gnu: emacs: Strip double wrap.
Date: Sat, 29 Aug 2020 13:24:27 +0200
Hello Leo,

> * gnu/packages/emacs.scm (emacs)[#:phases]: Add 'strip-double-wrap.

Pushed, thanks!

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#43087; Package guix-patches. (Sat, 29 Aug 2020 14:05:02 GMT) Full text and rfc822 format available.

Message #13 received at 43087 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: 43087 <at> debbugs.gnu.org
Cc: leo.prikler <at> student.tugraz.at
Subject: Re: bug#43087: [PATCH] gnu: emacs: Strip double wrap.
Date: Sat, 29 Aug 2020 16:04:23 +0200
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





Information forwarded to guix-patches <at> gnu.org:
bug#43087; Package guix-patches. (Sat, 29 Aug 2020 14:26:01 GMT) Full text and rfc822 format available.

Message #16 received at 43087 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Mathieu Othacehe <othacehe <at> gnu.org>, 43087 <at> debbugs.gnu.org
Subject: Re: bug#43087: [PATCH] gnu: emacs: Strip double wrap.
Date: Sat, 29 Aug 2020 16:25:48 +0200
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 ;)





Information forwarded to guix-patches <at> gnu.org:
bug#43087; Package guix-patches. (Sat, 29 Aug 2020 15:43:01 GMT) Full text and rfc822 format available.

Message #19 received at 43087 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Mathieu Othacehe <othacehe <at> gnu.org>, 43087 <at> debbugs.gnu.org
Subject: Re: bug#43087: [PATCH] gnu: emacs: Strip double wrap.
Date: Sat, 29 Aug 2020 17:42:21 +0200
[Message part 1 (text/plain, inline)]
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.
[0001-gnu-emacs-Strip-double-wrap.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#43087; Package guix-patches. (Mon, 31 Aug 2020 07:54:01 GMT) Full text and rfc822 format available.

Message #22 received at 43087-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 43087-done <at> debbugs.gnu.org
Subject: Re: bug#43087: [PATCH] gnu: emacs: Strip double wrap.
Date: Mon, 31 Aug 2020 09:52:58 +0200
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Sep 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.