From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: [PATCH] do not echo variable assignment for octave babel codes
Date: Thu, 13 Jan 2011 20:31:29 +0000 [thread overview]
Message-ID: <87oc7k35r2.fsf@ucl.ac.uk> (raw)
Hello,
when using babel with octave code, passing variables with the =:var=
header argument creates octave code whose results are echoed onto
standard out. This is not necessarily wanted. The default behaviour, I
believe, should be to not echo anything out as the user can always
simply print out the variable in the code if desired.
The following patch simply adds a semi-colon (;) to the appropriate
place:
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index 92f16be..d46d648 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -103,7 +103,7 @@ end")
"Return list of octave statements assigning the block's variables"
(mapcar
(lambda (pair)
- (format "%s=%s"
+ (format "%s=%s;"
(car pair)
(org-babel-octave-var-to-octave (cdr pair))))
(mapcar #'cdr (org-babel-get-header params :var))))
--8<---------------cut here---------------end--------------->8---
Thanks,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.4 (release_7.4.170.gbc841.dirty)
reply other threads:[~2011-01-13 20:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87oc7k35r2.fsf@ucl.ac.uk \
--to=e.fraga@ucl.ac.uk \
--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).