From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: [PATCH] do not echo variable assignment for octave babel codes Date: Thu, 13 Jan 2011 20:31:29 +0000 Message-ID: <87oc7k35r2.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=54395 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdTpa-0005rj-N5 for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 15:31:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdTpZ-0001eh-Fk for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 15:31:38 -0500 Received: from vscane-a2.ucl.ac.uk ([144.82.108.42]:61295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdTpZ-0001eL-Be for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 15:31:37 -0500 Received: from [85.210.138.108] (helo=localhost) by vscane-a.ucl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1PdTpS-0001jR-Vf for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 20:31:31 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs Org mode mailing list 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)