Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
ob-julia.jl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alberto Ramos
ob-julia.jl
Commits
7681ac4b
Commit
7681ac4b
authored
Mar 02, 2013
by
G. Jay Kerns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added disclaimer about session evaluation
parent
621be9bd
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
152 additions
and
100 deletions
+152
-100
.gitignore
.gitignore
+1
-0
intro-julia.org
intro-julia.org
+132
-53
ob-julia-doc.org
ob-julia-doc.org
+19
-8
ob-julia.el
ob-julia.el
+0
-39
No files found.
.gitignore
View file @
7681ac4b
.juliahistory
*~
*.pdf
\ No newline at end of file
intro-julia.org
View file @
7681ac4b
This diff is collapsed.
Click to expand it.
ob-julia-doc.org
View file @
7681ac4b
...
...
@@ -16,14 +16,13 @@ keybindings.
* What you need to get started
- Note: :: a lot of the code blocks below have the header argument
=:eval no-export=. This means that the code block can be
evaluated interactively by =C-c C-c= with point in the code
block but will /not/ be evaluated during export. That
header argument is present because those blocks have
settings which conflict with my current setup (or are
otherwise redundant) yet are meant to be useful for other
people working through this document.
- *Note:* several code blocks below have the header argument =:eval
no-export=. This means that the code block can be evaluated
interactively by =C-c C-c= with point in the code block but will
/not/ be evaluated during export. That header argument is present
because those blocks have settings which conflict with my current
setup (or are otherwise redundant) yet are meant to be useful for
other people working through this document.
** Julia
...
...
@@ -327,6 +326,15 @@ Org manual, and see Worg too for more information.
setting with the line =#+PROPERTY: tangle yes= near the top of the
org file. See the Org manual for details.
- At the time of this writing =ob-julia.el= only supports =:session=
evaluation and does not support external process evaluation. This
means that every =SRC julia= block should have a =:session
SOMETHING= header argument. Alternatively, you can put a
buffer-wide header argument at the top of the org file, something
like this:
: #+PROPERTY: session *julia*
- You may have noticed that those =julia= code lines with no output
(for instance, lines with semicolons =;= at the end) generate an
empty line in the =#+RESULTS= below the code block. Consequently,
...
...
@@ -361,3 +369,6 @@ Org manual, and see Worg too for more information.
following line at the top of this org file.
: #+LaTeX_HEADER: \DeclareUnicodeCharacter{22EE}{\vdots}
- =ob-julia.el= does not support =rownames= and =colnames= like =ob-R.el= does.
ob-julia.el
View file @
7681ac4b
...
...
@@ -51,11 +51,6 @@
((
lambda
(
inside
)
(
if
graphics-file
inside
; julia's graphics devices don't work like R's do
; (append
; (list (org-babel-julia-construct-graphics-device-call
; graphics-file params))
; inside)
inside
)
)
(
append
(
org-babel-variable-assignments:julia
params
)
...
...
@@ -187,35 +182,6 @@ current code buffer."
(
and
(
member
"graphics"
(
cdr
(
assq
:result-params
params
)))
(
cdr
(
assq
:file
params
))))
;; The following isn't necessary with julia because
;; we write all plots from inside the code-block
;
;(defun org-babel-julia-construct-graphics-device-call (out-file params)
; "Construct the call to the graphics device."
; (let ((devices
; '((:png . "png")
; (:svg . "svg")
; (:pdf . "pdf")
; (:eps . "eps")))
; (allowed-args '(:width :horizontal))
; (device (and (string-match ".+\\.\\([^.]+\\)" out-file)
; (match-string 1 out-file)))
; (extra-args (cdr (assq :julia-dev-args params))) filearg args)
; (setq device (or (and device (cdr (assq (intern (concat ":" device))
; devices))) "png"))
; (setq filearg
; (if (member device '("postscript")) "file" "filename"))
; (setq args (mapconcat
; (lambda (pair)
; (if (member (car pair) allowed-args)
; (format ",%s=%S"
; (substring (symbol-name (car pair)) 1)
; (cdr pair)) ""))
; params ""))
; (format "%s(%s=\"%s\"%s%s%s)"
; device filearg out-file args
; (if extra-args "," "") (or extra-args ""))))
(
defvar
org-babel-julia-eoe-indicator
"print(\"org_babel_julia_eoe\")"
)
(
defvar
org-babel-julia-eoe-output
"org_babel_julia_eoe"
)
...
...
@@ -245,11 +211,6 @@ last statement in BODY, as elisp."
(
let
((
tmp-file
(
org-babel-temp-file
"julia-"
)))
(
org-babel-eval
org-babel-julia-command
(
format
org-babel-julia-write-object-command
;; don't need row-names or col-names
; (if row-names-p "TRUE" "FALSE")
; (if column-names-p
; (if row-names-p "NA" "TRUE")
; "FALSE")
(
org-babel-process-file-name
tmp-file
'noquote
)
(
format
"begin\n%s\nend"
body
)))
(
org-babel-julia-process-value-result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment