emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: [PATCH] small bug in Babel GnuPlot on % character
Date: Sun, 07 May 2017 17:18:29 +0200	[thread overview]
Message-ID: <590F3AC5.8000801@free.fr> (raw)

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	other threads:[~2017-05-07 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07 15:18 Thierry Banel [this message]
2017-05-08  9:40 ` [PATCH] small bug in Babel GnuPlot on % character Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=590F3AC5.8000801@free.fr \
    --to=tbanelwebmin@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).