emacs-devel
[Top][All Lists]
Advanced

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

Re: Is emacsclient --eval broken?


From: Johan Bockgård
Subject: Re: Is emacsclient --eval broken?
Date: Mon, 15 Aug 2016 21:08:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> There must be something that the client cannot interpret, or maybe we
> are not prepared to deal with strings that span more than one packet
> returned by recv?

The function in server.el that splits the reply has a bug:


diff --git a/lisp/server.el b/lisp/server.el
index 59fd973..650323d 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -782,7 +782,7 @@ (defun server-reply-print (qtext proc)
       ;; We have to split the string
       (setq part (substring qtext 0 (- server-msg-size (length prefix) 1)))
       ;; Don't split in the middle of a quote sequence
-      (if (string-match "\\(^\\|[^&]\\)\\(&&\\)+$" part)
+      (if (string-match "\\(^\\|[^&]\\)&\\(&&\\)*$" part)
          ;; There is an uneven number of & at the end
          (setq part (substring part 0 -1)))
       (setq qtext (substring qtext (length part)))




reply via email to

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