From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eij9k-00086i-Nf for guix-patches@gnu.org; Mon, 05 Feb 2018 10:58:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eij9e-0002Uv-Li for guix-patches@gnu.org; Mon, 05 Feb 2018 10:58:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51020) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eij9e-0002Th-Gb for guix-patches@gnu.org; Mon, 05 Feb 2018 10:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eij9e-0004jn-1r for guix-patches@gnu.org; Mon, 05 Feb 2018 10:58:02 -0500 Subject: bug#30119: [PATCHv2] Add emacs-realgud and varia Resent-To: guix-patches@gnu.org Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87d12bbwfa.fsf@gmail.com> <87bmhi8pac.fsf@gmail.com> <87lggfvyz2.fsf@gnu.org> <87bmh4umpp.fsf@gmail.com> Date: Mon, 05 Feb 2018 16:57:51 +0100 In-Reply-To: <87bmh4umpp.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 04 Feb 2018 22:41:54 -0500") Message-ID: <87po5ja0ow.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Maxim Cournoyer Cc: 30119-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Maxim, Maxim Cournoyer skribis: > From 4e9e0f1358b65c180218412f667a2dbb4e1b2b19 Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer > 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 fi= les > 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 =E2=80=98el-files=E2=80=99 is a list of absolute file names;= previously it would fail beacuse =E2=80=98el-files=E2=80=99 was used with a diffe= rent cwd. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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 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 --=-=-=--