emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] small bug in Babel GnuPlot on % character
@ 2017-05-07 15:18 Thierry Banel
  2017-05-08  9:40 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Banel @ 2017-05-07 15:18 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] small bug in Babel GnuPlot on % character
  2017-05-07 15:18 [PATCH] small bug in Babel GnuPlot on % character Thierry Banel
@ 2017-05-08  9:40 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-05-08  9:40 UTC (permalink / raw)
  To: Thierry Banel; +Cc: emacs-orgmode

Hello,

Thierry Banel <tbanelwebmin@free.fr> writes:

> 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

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-08  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-07 15:18 [PATCH] small bug in Babel GnuPlot on % character Thierry Banel
2017-05-08  9:40 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).