[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30119: [PATCHv2] Add emacs-realgud and varia
From: |
Ludovic Courtès |
Subject: |
bug#30119: [PATCHv2] Add emacs-realgud and varia |
Date: |
Mon, 05 Feb 2018 16:57:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi Maxim,
Maxim Cournoyer <address@hidden> skribis:
> From 4e9e0f1358b65c180218412f667a2dbb4e1b2b19 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <address@hidden>
> Date: Sun, 14 Jan 2018 22:38:20 -0500
> Subject: [PATCH 3/7] emacs-build-system: Work around issue 30116.
>
> This is a temporary workaround issue 30116, where substitute* crashes on
> files containing NUL characters.
>
> * guix/build/emacs-build-system.scm (patch-el-files): Filter out elisp files
> that contain NUL characters.
I applied the whole series but there was an issue in this one, so I took
the liberty to change it as follows:
1. clarify comments;
2. make sure ‘el-files’ is a list of absolute file names; previously
it would fail beacuse ‘el-files’ was used with a different cwd.
Thanks!
Ludo’.
diff --git a/guix/build/emacs-build-system.scm
b/guix/build/emacs-build-system.scm
index 8156757be..b77984742 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -116,22 +116,21 @@ store in '.el' files."
;; strings containing NULs. Filter out such files. TODO: Remove
;; this workaround when <https://bugs.gnu.org/30116> is fixed.
(el-files (remove file-contains-nul-char?
- (find-files "." "\\.el$")))
-
- (substitute-cmd (lambda ()
+ (find-files (getcwd) "\\.el$"))))
+ (define (substitute-program-names)
(substitute* el-files
(("\"/bin/([^.]\\S*)\"" _ cmd-name)
(let ((cmd (which cmd-name)))
(unless cmd
- (error
- "patch-el-files: unable to locate "
cmd-name))
- (string-append "\"" cmd "\"")))))))
+ (error "patch-el-files: unable to locate " cmd-name))
+ (string-append "\"" cmd "\"")))))
+
(with-directory-excursion el-dir
- ;; Some old '.el' files (e.g., tex-buf.el in AUCTeX) are still encoded
- ;; with the "ISO-8859-1" locale.
- (unless (false-if-exception (substitute-cmd))
+ ;; Some old '.el' files (e.g., tex-buf.el in AUCTeX) are still
+ ;; ISO-8859-1-encoded.
+ (unless (false-if-exception (substitute-program-names))
(with-fluids ((%default-port-encoding "ISO-8859-1"))
- (substitute-cmd))))
+ (substitute-program-names))))
#t))
(define* (install #:key outputs