emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] small bug in Babel GnuPlot on % character


From: Thierry Banel
Subject: [O] [PATCH] small bug in Babel GnuPlot on % character
Date: Sun, 07 May 2017 17:18:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

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




reply via email to

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