all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 28787@debbugs.gnu.org
Subject: [bug#28787] [PATCH 2/2] emacs-build-system: Change how patch-el-files substitutes commands.
Date: Wed, 11 Oct 2017 15:42:18 +0100	[thread overview]
Message-ID: <20171011144218.26718-2-mail@cbaines.net> (raw)
In-Reply-To: <20171011144218.26718-1-mail@cbaines.net>

Previously the regex would match from /bin/ to a closing quote. However, this
is greedy, so will match up until the last ". This causes problems when there
are several quotes on the same line, for example:

org-effectiveness.el:
196:      (call-process "/bin/bash" nil t nil "-c" strplot)

Therefore, change . to \S so that it doesn't include whitespace
characters. Changing to a lazy quantifier would be an option, if that were
supported.

* guix/build/emacs-build-system.scm (patch-el-files): Change the regular
  expression used.
---
 guix/build/emacs-build-system.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 0260f15bb..c1d36766e 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -92,7 +92,7 @@ store in '.el' files."
          (el-dir (string-append out %install-suffix "/" elpa-name-ver))
          (substitute-cmd (lambda ()
                            (substitute* (find-files "." "\\.el$")
-                             (("\"/bin/([^.].*)\"" _ cmd)
+                             (("\"/bin/([^.]\\S*)\"" _ cmd)
                               (string-append
                                "\""
                                (or
-- 
2.14.2

  reply	other threads:[~2017-10-11 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 14:40 [bug#28787] [PATCH] emacs-build-system: Improve command patching Christopher Baines
2017-10-11 14:42 ` [bug#28787] [PATCH 1/2] emacs-build-system: Handle missing programs when patching Christopher Baines
2017-10-11 14:42   ` Christopher Baines [this message]
2017-10-13 21:40     ` [bug#28787] [PATCH 2/2] emacs-build-system: Change how patch-el-files substitutes commands Ludovic Courtès
2017-10-15 18:09       ` bug#28787: " Christopher Baines
2017-10-13 21:40   ` [bug#28787] [PATCH 1/2] emacs-build-system: Handle missing programs when patching Ludovic Courtès
2017-10-15 18:06     ` Christopher Baines

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

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

  git send-email \
    --in-reply-to=20171011144218.26718-2-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=28787@debbugs.gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.