summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-03-17 15:59:38 +0100
committerBastien Guerry <bzg@altern.org>2012-03-17 15:59:38 +0100
commiteea3802bba77f827877614032c9e4af29aa30f7c (patch)
tree6c8f3288303e50ddfd084211e6fbb2045c1e488e
parentf2acf329cb1ae43a6a54f8f150c136315a606ca2 (diff)
downloadorg-mode-eea3802bba77f827877614032c9e4af29aa30f7c.tar.gz
Whitespace cleanup.
-rw-r--r--contrib/babel/langs/ob-fomus.el1
-rw-r--r--contrib/babel/langs/ob-oz.el36
2 files changed, 18 insertions, 19 deletions
diff --git a/contrib/babel/langs/ob-fomus.el b/contrib/babel/langs/ob-fomus.el
index f7c6ca8..c2a5fa2 100644
--- a/contrib/babel/langs/ob-fomus.el
+++ b/contrib/babel/langs/ob-fomus.el
@@ -5,7 +5,6 @@
;; Author: Torsten Anders
;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org
-;; Version:
;;; License:
diff --git a/contrib/babel/langs/ob-oz.el b/contrib/babel/langs/ob-oz.el
index b778b4a..459f88a 100644
--- a/contrib/babel/langs/ob-oz.el
+++ b/contrib/babel/langs/ob-oz.el
@@ -1,8 +1,8 @@
;;; ob-oz.el --- org-babel functions for Oz evaluation
-;; Copyright (C) 2009-2012 Torsten Anders and Eric Schulte
+;; Copyright (C) 2009-2012 Torsten Anders and Eric Schulte
-;; Author: Torsten Anders and Eric Schulte
+;; Author: Torsten Anders and Eric Schulte
;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org
;; Version: 0.02
@@ -26,7 +26,7 @@
;;; Commentary:
-;; Org-Babel support for evaluating Oz source code.
+;; Org-Babel support for evaluating Oz source code.
;;
;; Oz code is always send to the Oz Programming Environment (OPI), the
;; Emacs mode and compiler interface for Oz programs. Therefore, only
@@ -71,7 +71,7 @@
;; arrive then in any order) I could use IDs
;; (e.g. integers). However, how do I do concurrency in Emacs Lisp,
;; and how can I define org-babel-execute:oz concurrently.
-;;
+;;
;; - Expressions are rarely used in Oz at the top-level, and using
;; them in documentation and Literate Programs will cause
;; confusion. Idea: hide expression from reader and instead show
@@ -94,10 +94,10 @@
;;
;; Interface to communicate with Oz.
-;; (1) For statements without any results: oz-send-string
+;; (1) For statements without any results: oz-send-string
;; (2) For expressions with a single result: oz-send-string-expression
;; (defined in org-babel-oz-ResultsValue.el)
-;;
+;;
;; oz-send-string-expression implements an additional very direct
;; communication between Org-babel and the Oz compiler. Communication
@@ -128,7 +128,7 @@
"Path to the contrib/scripts directory in which
StartOzServer.oz is located.")
-(defvar org-babel-oz-port 6001
+(defvar org-babel-oz-port 6001
"Port for communicating with Oz compiler.")
(defvar org-babel-oz-OPI-socket nil
"Socket for communicating with OPI.")
@@ -144,18 +144,18 @@ StartOzServer.oz is located.")
(defun org-babel-oz-create-socket ()
(message "Create OPI socket for evaluating expressions")
- ;; Start Oz directly
+ ;; Start Oz directly
(run-oz)
;; Create socket on Oz side (after Oz was started).
(oz-send-string (concat "\\insert '" org-babel-oz-server-dir "StartOzServer.oz'"))
;; Wait until socket is created before connecting to it.
;; Quick hack: wait 3 sec
- ;;
+ ;;
;; extending time to 30 secs does not help when starting Emacs for
;; the first time (and computer does nothing else)
(sit-for 3)
;; connect to OPI socket
- (setq org-babel-oz-OPI-socket
+ (setq org-babel-oz-OPI-socket
;; Creates a socket. I/O interface of Emacs sockets as for processes.
(open-network-stream "*Org-babel-OPI-socket*" nil "localhost" org-babel-oz-port))
;; install filter
@@ -166,7 +166,7 @@ StartOzServer.oz is located.")
;; oz-send-string-expression turns is into synchronous...
(defun oz-send-string-expression (string &optional wait-time)
"Similar to oz-send-string, oz-send-string-expression sends a string to the OPI compiler. However, string must be expression and this function returns the result of the expression (as string). oz-send-string-expression is synchronous, wait-time allows to specify a maximum wait time. After wait-time is over with no result, the function returns nil."
- (if (not org-babel-oz-OPI-socket)
+ (if (not org-babel-oz-OPI-socket)
(org-babel-oz-create-socket))
(let ((polling-delay 0.1)
result)
@@ -176,11 +176,11 @@ StartOzServer.oz is located.")
(let ((waited 0))
(unwind-protect
(progn
- (while
+ (while
;; stop loop if org-babel-oz-collected-result \= nil or waiting time is over
(not (or (not (equal org-babel-oz-collected-result nil))
(> waited wait-time)))
- (progn
+ (progn
(sit-for polling-delay)
;; (message "org-babel-oz: next polling iteration")
(setq waited (+ waited polling-delay))))
@@ -253,7 +253,7 @@ called by `org-babel-execute-src-block' via multiple-value-bind."
;; (when vars
;; (with-temp-buffer
;; (insert var-lines) (write-file vars-file)
-;; (oz-mode)
+;; (oz-mode)
;; ;; (inferior-oz-load-file) ; ??
;; ))
;; (current-buffer))))
@@ -262,7 +262,7 @@ called by `org-babel-execute-src-block' via multiple-value-bind."
;; TODO: testing... (simplified version of def in org-babel-prep-session:ocaml)
;;
-;; BUG: does not work yet. Error: ad-Orig-error: buffer none doesn't exist or has no process
+;; BUG: does not work yet. Error: ad-Orig-error: buffer none doesn't exist or has no process
;; UNUSED DEF
(defun org-babel-oz-initiate-session (&optional session params)
"If there is not a current inferior-process-buffer in SESSION
@@ -278,12 +278,12 @@ then create. Return the initialized session."
specifying a var of the same value."
(if (listp var)
;; (concat "[" (mapconcat #'org-babel-oz-var-to-oz var ", ") "]")
- (eval var)
- (format "%s" var) ; don't preserve string quotes.
+ (eval var)
+ (format "%s" var) ; don't preserve string quotes.
;; (format "%s" var)
))
-;; TODO:
+;; TODO:
(defun org-babel-oz-table-or-string (results)
"If the results look like a table, then convert them into an
Emacs-lisp table, otherwise return the results as a string."