GNU bug report logs - #44249
[PATCH] gnu: emacs: Make strip-double-wrap more robust

Previous Next

Package: guix-patches;

Reported by: Morgan.J.Smith <at> outlook.com

Date: Tue, 27 Oct 2020 02:18:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Morgan.J.Smith <at> outlook.com
Subject: bug#44249: closed (Re: [PATCH v2] gnu: emacs: Make
 strip-double-wrap more robust)
Date: Tue, 03 Nov 2020 09:46:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#44249: [PATCH] gnu: emacs: Make strip-double-wrap more robust

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 44249 <at> debbugs.gnu.org.

-- 
44249: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44249
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Morgan.J.Smith <at> outlook.com
Cc: 44249-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: emacs: Make strip-double-wrap more robust
Date: Tue, 03 Nov 2020 10:45:30 +0100
Hello,

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

> * gnu/packages/emacs.scm (emacs) [strip-double-wrap]:
> Use regex to find emacs executable. This works even when the version is
> changed by package transformations (ex: version=git.master)

I added missing final full stops in the commit message, and tweaked your
patter a bit. In particular, I removed the call to `string?', since
I don't think `find-files' can return a non-empty list with anything not
being a string.Let me know if you think I'm wrong.

Patch applied. Thank you.

Regards,
-- 
Nicolas Goaziou

[Message part 3 (message/rfc822, inline)]
From: Morgan.J.Smith <at> outlook.com
To: guix-patches <at> gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH] gnu: emacs: Make strip-double-wrap more robust
Date: Mon, 26 Oct 2020 22:01:45 -0400
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/emacs.scm (emacs) [strip-double-wrap]:
Use regex to find emacs executable. This works even when the version is
changed by package transformations (ex: version=git.master)
---
 gnu/packages/emacs.scm | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 4963379d74..5c89e4c6b6 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -196,17 +196,13 @@
            (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.  The version is
-             ;; accessed using using THIS-PACKAGE so it "just works" for
-             ;; inherited Emacs packages of different versions.
+             ;; able to track emacs back to emacs.desktop.
              (with-directory-excursion (assoc-ref outputs "out")
-               (copy-file (string-append
-                           "bin/emacs-"
-                           ,(let ((this-version (package-version this-package)))
-                              (or (false-if-exception
-                                   (version-major+minor+point this-version))
-                                  (version-major+minor this-version))))
-                          "bin/emacs")
+               (copy-file
+                (car
+                 (find-files
+                  "bin" (file-name-predicate "^emacs-([0-9]+\\.)+[0-9]+$")))
+                "bin/emacs")
                #t)))
          (add-before 'reset-gzip-timestamps 'make-compressed-files-writable
            ;; The 'reset-gzip-timestamps phase will throw a permission error
-- 
2.29.1




This bug report was last modified 4 years and 113 days ago.

Previous Next


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