unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44249] [PATCH] gnu: emacs: Make strip-double-wrap more robust
@ 2020-10-27  2:01 Morgan.J.Smith
  2020-10-27 21:13 ` Nicolas Goaziou
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Morgan.J.Smith @ 2020-10-27  2:01 UTC (permalink / raw)
  To: 44249; +Cc: Morgan Smith

From: Morgan Smith <Morgan.J.Smith@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





^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-31 20:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27  2:01 [bug#44249] [PATCH] gnu: emacs: Make strip-double-wrap more robust Morgan.J.Smith
2020-10-27 21:13 ` Nicolas Goaziou
2020-11-02  4:35   ` [bug#44249] [PATCH v2] " Morgan.J.Smith
2020-11-03  9:45     ` bug#44249: " Nicolas Goaziou
2020-11-03 12:48       ` [bug#44249] " Nicolas Goaziou
2020-11-03 14:49         ` Morgan Smith
2020-11-03 21:38           ` Nicolas Goaziou
2020-11-03 22:09             ` zimoun
2020-11-04 19:47 ` [bug#44249] [PATCH v3] " Morgan.J.Smith
2020-11-05 22:33   ` Nicolas Goaziou
2020-11-07 20:48     ` Marius Bakke
2021-01-15 13:28   ` [bug#44249] [PATCH] " Ludovic Courtès
2021-01-15 19:49     ` Morgan Smith
2021-01-16 21:54       ` Ludovic Courtès
2021-01-16 22:03         ` Morgan Smith
2021-01-31 20:30 ` bug#44249: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).