mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-13 22:10:18 +00:00
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
This commit is contained in:
commit
ee629299c0
|
@ -1,22 +1,6 @@
|
||||||
#+title: The Library of Babel
|
#+title: The Library of Babel
|
||||||
#+SEQ_TODO: TODO PROPOSED | DONE DEFERRED REJECTED
|
#+author: Org-mode People
|
||||||
#+OPTIONS: H:3 num:nil toc:2 \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
|
|
||||||
#+STARTUP: odd hideblocks
|
#+STARTUP: odd hideblocks
|
||||||
#+STYLE: <style type="text/css">#outline-container-1 { clear:both; }</style>
|
|
||||||
|
|
||||||
#+begin_html
|
|
||||||
<div id="logo" style="float: left; text-align: center; max-width: 340px; font-size: 8pt; margin-left: 1em;">
|
|
||||||
<p>
|
|
||||||
<img src="../../images/babel/library-of-babel.png" alt="Library of Babel"/>
|
|
||||||
<div id="attr">
|
|
||||||
The Library of Babel, by Pierre Clayette
|
|
||||||
<p>
|
|
||||||
<a href="http://downlode.org/Etext/library_of_babel.html">Full text of the Borges short story</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
#+end_html
|
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
The Library of Babel is an extensible collection of ready-made and
|
The Library of Babel is an extensible collection of ready-made and
|
||||||
|
@ -69,6 +53,25 @@ as a table in traditional Org-mode table syntax.
|
||||||
nil
|
nil
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** remote files
|
||||||
|
|
||||||
|
Read local or remote file in [[http://www.json.org/][json]] format into emacs-lisp objects.
|
||||||
|
#+srcname: json
|
||||||
|
#+begin_src emacs-lisp :var file='() :var url='()
|
||||||
|
(require 'json)
|
||||||
|
(cond
|
||||||
|
(file
|
||||||
|
(with-temp-filebuffer file
|
||||||
|
(goto-char (point-min))
|
||||||
|
(json-read)))
|
||||||
|
(url
|
||||||
|
(require 'w3m)
|
||||||
|
(with-temp-buffer
|
||||||
|
(w3m-retrieve url)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(json-read))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Plotting code
|
* Plotting code
|
||||||
|
|
||||||
** R
|
** R
|
||||||
|
|
|
@ -96,7 +96,7 @@ called by `org-babel-execute-src-block'."
|
||||||
specifying a var of the same value."
|
specifying a var of the same value."
|
||||||
(if (listp var)
|
(if (listp var)
|
||||||
(concat "[" (mapconcat #'org-babel-python-var-to-python var ", ") "]")
|
(concat "[" (mapconcat #'org-babel-python-var-to-python var ", ") "]")
|
||||||
(format "%S" var)))
|
(if (equal var 'hline) "None" (format "%S" var))))
|
||||||
|
|
||||||
(defun org-babel-python-table-or-string (results)
|
(defun org-babel-python-table-or-string (results)
|
||||||
"If the results look like a list or tuple, then convert them into an
|
"If the results look like a list or tuple, then convert them into an
|
||||||
|
@ -110,7 +110,9 @@ Emacs-lisp table, otherwise return the results as a string."
|
||||||
"\\[" "(" (replace-regexp-in-string
|
"\\[" "(" (replace-regexp-in-string
|
||||||
"\\]" ")" (replace-regexp-in-string
|
"\\]" ")" (replace-regexp-in-string
|
||||||
", " " " (replace-regexp-in-string
|
", " " " (replace-regexp-in-string
|
||||||
"'" "\"" results))))))
|
"'" "\""
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"None" "hline" results t)))))))
|
||||||
results)))
|
results)))
|
||||||
|
|
||||||
(defvar org-babel-python-buffers '(:default . nil))
|
(defvar org-babel-python-buffers '(:default . nil))
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(eval-when-compile (require 'cl))
|
(eval-when-compile (require 'cl))
|
||||||
|
(eval-and-compile
|
||||||
|
(unless (fboundp 'declare-function)
|
||||||
|
(defmacro declare-function (fn file &optional arglist fileonly))))
|
||||||
|
|
||||||
(defvar org-babel-call-process-region-original)
|
(defvar org-babel-call-process-region-original)
|
||||||
(declare-function show-all "outline" ())
|
(declare-function show-all "outline" ())
|
||||||
|
|
Loading…
Reference in a new issue