From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: [PATCH] small bug in Babel GnuPlot on % character Date: Sun, 07 May 2017 17:18:29 +0200 Message-ID: <590F3AC5.8000801@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7NxE-0004fE-5x for emacs-orgmode@gnu.org; Sun, 07 May 2017 11:18:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7NxA-0003y4-Ox for emacs-orgmode@gnu.org; Sun, 07 May 2017 11:18:36 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:17542) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7NxA-0003xS-J8 for emacs-orgmode@gnu.org; Sun, 07 May 2017 11:18:32 -0400 Received: from [IPv6:2a01:e35:2e21:def0:747e:be43:71a4:b636] (unknown [IPv6:2a01:e35:2e21:def0:747e:be43:71a4:b636]) by smtp6-g21.free.fr (Postfix) with ESMTP id 0F1F1780340 for ; Sun, 7 May 2017 17:18:29 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Here is a patch for a small bug in Babel GnuPlot. When GnuPlot outputs a message containing a % character, Emacs mis-interprets it. This happens when using commands such as print or fit. Example showing the bug: #+BEGIN_SRC gnuplot :file x.svg :session none print "hello %s\n" plot x #+END_SRC [PATCH] ob-gnuplot: escape % character in output lisp/ob-gnuplot.el (org-babel-execute:gnuplot): escape % percent character in output messages coming from GnuPlot --- lisp/ob-gnuplot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index a62303f..400823b 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -187,7 +187,7 @@ This function is called by `org-babel-execute-src-block'." script-file (if (member system-type '(cygwin windows-nt ms-dos)) t nil))))) - (message output)) + (message "%s" output)) (with-temp-buffer (insert (concat body "\n")) (gnuplot-mode) -- 2.1.4