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

From: Ludovic Courtès <[email-masked]>
Date: Sun, 31 Jan 2021 21:30:51 +0100

Hi Morgan,

[email-masked] skribis:

> From: Morgan Smith <[email-masked]>
>
> * 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)

Somehow I had forgotten about this patch, but I finally applied it!

>               (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]+$")))

Here I just remove ‘file-name-predicate’ because it’s implicit.  I
checked that it works with the currently-packaged version as well as
‘--with-branch=emacs-next=master’.

Thank you, and apologies for the long delay!

Ludo’.