GNU bug report logs - #26802
Single source file emacs packages get a ".el.el" extension

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sat, 6 May 2017 12:53:01 UTC

Severity: normal

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

Full log


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

From: Alex Kost <alezost <at> gmail.com>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 26802 <at> debbugs.gnu.org
Subject: Re: bug#26802: [PATCH 4/4] build: emacs: Fix
 `store-file->elisp-source-file'.
Date: Sun, 21 May 2017 11:33:45 +0300
Arun Isaac (2017-05-17 22:22 +0530) wrote:

> This prevents a ".el.el" extension for source files with no version number in
> their file name.
>
> * guix/build/emacs-build-system.scm (store-file->elisp-source-file): Remove
>   ".el" extension from file name before splitting to name and version.
> ---
>  guix/build/emacs-build-system.scm | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
> index 44e8b0d31..25a3beaa2 100644
> --- a/guix/build/emacs-build-system.scm
> +++ b/guix/build/emacs-build-system.scm
> @@ -47,10 +47,13 @@
>  (define (store-file->elisp-source-file file)
>    "Convert FILE, a store file name for an Emacs Lisp source file, into a file
>  name that has been stripped of the hash and version number."
> -  (let-values (((name version)
> -                (package-name->name+version
> -                 (strip-store-file-name file))))
> -    (string-append name ".el")))
> +  (let ((extension ".el"))
> +    (let-values (((name version)
> +                  (package-name->name+version
> +                   (strip-store-file-name
> +                    (string-drop-right
> +                     file (string-length extension))))))
> +      (string-append name extension))))
>  
>  (define* (unpack #:key source #:allow-other-keys)
>    "Unpack SOURCE into the build directory.  SOURCE may be a compressed

Wow, I don't know if removing ".el" from a file name can be written in a
more simple way, but the point of the patch is great!  I didn't realize
this problem could be fixed so easily.  It looks good to me, thanks!

-- 
Alex




This bug report was last modified 8 years and 87 days ago.

Previous Next


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