unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 30119-done@debbugs.gnu.org
Subject: bug#30119: [PATCHv2] Add emacs-realgud and varia
Date: Mon, 05 Feb 2018 16:57:51 +0100	[thread overview]
Message-ID: <87po5ja0ow.fsf@gnu.org> (raw)
In-Reply-To: <87bmh4umpp.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 04 Feb 2018 22:41:54 -0500")

[-- Attachment #1: Type: text/plain, Size: 853 bytes --]

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> From 4e9e0f1358b65c180218412f667a2dbb4e1b2b19 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> 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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1639 bytes --]

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

  reply	other threads:[~2018-02-05 15:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  4:03 [bug#30119] [PATCH] Add emacs-realgud and varia Maxim Cournoyer
2018-01-25  5:45 ` [bug#30119] [PATCHv2] " Maxim Cournoyer
2018-01-30 21:05   ` Ludovic Courtès
2018-02-05  3:41     ` Maxim Cournoyer
2018-02-05 15:57       ` Ludovic Courtès [this message]
2018-02-07 13:42         ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87po5ja0ow.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=30119-done@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).