emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/exec-path-from-shell 5736cc87e4 075/114: Add sentinel to e


From: ELPA Syncer
Subject: [nongnu] elpa/exec-path-from-shell 5736cc87e4 075/114: Add sentinel to exec-path-from-shell-printf (closes #41)
Date: Tue, 5 Sep 2023 04:00:02 -0400 (EDT)

branch: elpa/exec-path-from-shell
commit 5736cc87e47052bf1bacd9ce5807e5cf3a2c6a71
Author: Tim Hill <timhill@alum.mit.edu>
Commit: Tim Hill <timhill@alum.mit.edu>

    Add sentinel to exec-path-from-shell-printf (closes #41)
---
 exec-path-from-shell.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 3384897516..4637f716e2 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -149,7 +149,7 @@ shell-escaped, so they may contain $ etc."
   (let* ((printf-bin (or (executable-find "printf") "printf"))
          (printf-command
           (concat printf-bin
-                  " '__RESULT\\000" str "' "
+                  " '__RESULT\\000" str "\\000__RESULT' "
                   (mapconcat #'exec-path-from-shell--double-quote args " ")))
          (shell (exec-path-from-shell--shell))
          (shell-args (append exec-path-from-shell-arguments
@@ -165,7 +165,7 @@ shell-escaped, so they may contain $ etc."
           (error "Non-zero exit code from shell %s invoked with args %S.  
Output was:\n%S"
                  shell shell-args (buffer-string))))
       (goto-char (point-min))
-      (if (re-search-forward "__RESULT\0\\(.*\\)" nil t)
+      (if (re-search-forward "__RESULT\0\\(.*\\)\0__RESULT" nil t)
           (match-string 1)
         (error "Expected printf output from shell, but got: %S" 
(buffer-string))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]