Eric Schulte
1134385a87
better handling of multiple-variable :var code block header arguments
...
* lisp/ob.el (org-babel-parse-multiple-vars): Trimming excess
white space from split variables.
2011-10-28 13:58:33 -06:00
Bastien Guerry
ecf5368afe
ob.el: Fix byte-compiler warning about free variable.
2011-10-22 15:28:01 +02:00
Eric Schulte
93bdeb9212
two more quick fixes
...
* lisp/ob.el (org-babel-balanced-split): Balance both [] and ()
groupings.
(org-babel-parse-header-arguments): Be sure to replace removed ":"
characters.
2011-10-21 11:36:06 -06:00
Eric Schulte
0bcb248ee6
quick fix for a tiny bug
...
* lisp/ob.el (org-babel-parse-header-arguments): Quick fix for a tiny bug.
2011-10-21 11:21:39 -06:00
Eric Schulte
4c3d289faf
Now allow multiple "var" specifications behind a single ":var"
...
* lisp/ob.el (org-babel-params-from-properties): Now splits multiple
var arguments behind a single ":var".
(org-babel-balanced-split): Separated balanced splitting of strings
out into a new function.
(org-babel-parse-multiple-vars): Splits multiple var arguments
behind a single ":var".
2011-10-21 11:15:18 -06:00
Eric Schulte
080e2decbc
removing `org-babel-params-from-buffer' and #+PROPERTIES: entirely
...
* lisp/ob.el: Removing `org-babel-params-from-buffer' and
#+PROPERTIES: entirely.
* lisp/ob-exp.el (org-babel-exp-src-block): Removing
`org-babel-params-from-buffer' and #+PROPERTIES: entirely.
* lisp/ob-lob.el (org-babel-lob-execute): Removing
`org-babel-params-from-buffer' and #+PROPERTIES: entirely.
2011-10-20 15:26:43 -06:00
Eric Schulte
04a978fde5
removing #+BABEL: lines in favor of general #+PROPERTIES: lines
...
* lisp/ob.el (org-babel-params-from-buffer): Removing #+BABEL: lines
in favor of general #+PROPERTIES: lines.
* doc/org.texi (Buffer-wide header arguments): Removing documentation
of the defunct #+BABEL: structure.
2011-10-20 13:42:31 -06:00
Eric Schulte
c1ac640944
fix multi-table bug in code block colname and rowname handling
...
Thanks to Nick Dokos for suggesting this fix
* lisp/ob.el (org-babel-disassemble-tables): Fix multi-table bug in
code block colname and rowname handling.
2011-10-18 10:08:48 -06:00
Eric Schulte
3e86300d6d
now including language specific header arg values in insertion options
...
* lisp/ob.el (org-babel-insert-header-arg): Now including language
specific header arg values in insertion options.
2011-10-09 09:31:32 -06:00
Eric Schulte
d7d0230bf4
Fixed typo in org-babel-insert-header-arg.
...
Thanks to Torsten Wagner for pointing this out and for suggesting
the original feature.
* lisp/ob.el (org-babel-insert-header-arg): Fixed typo.
2011-10-09 09:11:10 -06:00
Eric Schulte
9135ec76dd
New helper function for inserting common code block header arguments
...
* lisp/ob.el (org-babel-common-header-args-w-values): New variable to
hold common header arguments and their default values.
(org-babel-header-arg-names): Redefined using the new common header
arg variable.
(org-babel-insert-header-arg): New function to help when inserting
header arguments.
2011-10-08 16:31:50 -06:00
Eric Schulte
6844094edb
Don't delete variable values when checking for assignment.
...
* lisp/ob.el (org-babel-get-src-block-info): Fixing bug, accidentally
deleted variable values.
2011-09-16 09:52:34 -06:00
Eric Schulte
267015b24a
differentiate between result types and wrappers
...
* lisp/ob.el (org-babel-merge-params): Differentiate between result
types and wrappers.
2011-09-15 15:22:14 -06:00
Eric Schulte
11f07576cb
Check that functional-syntax variables are initialized.
...
* lisp/ob.el (org-babel-get-src-block-info): Check that
functional-syntax variables are initialized.
2011-09-15 09:24:29 -06:00
Eric Schulte
f075ada9a1
Adding a note for a future enhancement.
...
* lisp/ob.el (org-babel-check-src-block): Adding a note for a future
enhancement.
2011-09-15 09:11:12 -06:00
Eric Schulte
0037ef9261
more robust to code blocks with empty bodies
...
* lisp/ob.el (org-babel-parse-src-block-match): More robust to code
blocks with empty bodies.
2011-09-13 09:36:03 -06:00
Eric Schulte
597e1eb4fe
Don't error on empty code block body.
...
* lisp/ob.el (org-babel-parse-src-block-match): Don't error on empty
code block body.
2011-09-13 08:57:29 -06:00
Eric Schulte
a4e881207d
better error message for unassigned variables
...
* lisp/ob.el (org-babel-merge-params): Better error message for
unassigned variables.
2011-09-08 11:44:49 -06:00
Martyn Jago
223ac13486
Inline source block and test fixes * lisp/ob.el: Fixed late night refactoring error * testing/examples/babel.org: whitespace * testing/lisp/test-ob.el: Fixed test-org-babel/inline-src-block-regexp (regression error) Renamed test-org-babel/parse-header-args2 since duplicate test heading Made test-org-babel/parse-header-args less brittle
2011-09-06 08:53:07 -06:00
Martyn Jago
d7d052ec7c
Bug fixes to inline source block execution triggering. * lisp/ob.el: Created org-babel-get-inline-src-block-matches() to fix problems with org-ctrl-c-ctrl-c not triggering inline src block execution when point is on or after a space within the inline src block body. Also fixed execution problems where inline src block is on buffer line 1. * testing/examples/babel.org: Test data for org-babel-get-inline-src-block-matches()
...
* testing/lisp/test-ob.el: Tests for
org-babel-get-inline-src-block-matches()
2011-09-06 08:52:59 -06:00
Eric Schulte
0d580520cc
better code block demarcation
...
* lisp/ob.el (org-babel-demarcate-block): Copy headers and indent to
column of point when a block is split.
2011-09-04 17:06:07 -06:00
Eric Schulte
0b6de9a026
corrected file insertion for inline results
...
* lisp/ob.el (org-babel-insert-result): Corrected file insertion for
inline results.
2011-09-04 10:51:34 -06:00
Eric Schulte
cae9f947be
babel: don't check for header arguments in properties with leading ":"s
...
* lisp/ob.el (org-babel-params-from-properties): Don't check for
header arguments in properties with leading ":"s.
2011-08-30 14:51:00 -06:00
Nicolas Goaziou
2ff74fc5b6
ob: allow inline src blocks to start at bol
...
* lisp/ob.el (org-babel-inline-src-block-regexp): Allow regexp to
start at bol.
2011-08-29 16:05:18 -06:00
Achim Gratz
ccc99317de
backport copyright and license headers from Emacs trunk
2011-08-24 22:32:38 +02:00
Eric Schulte
21fd1523be
Don't require full variable resolution when finding results
...
* lisp/ob.el (org-babel-where-is-src-block-result): Don't try to
resolve variables when simply checking if we're inside of a code
block.
2011-08-23 09:46:32 -06:00
Eric Schulte
cb449a672e
improve export of inline code blocks
...
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Save match data
around `org-babel-exp-do-export' which now searches in this case.
(org-babel-exp-results): Position the point in the inline source
block during export evaluation.
* lisp/ob.el (org-babel-insert-result): More readable code.
2011-08-22 08:23:52 -06:00
Eric Schulte
96ad99ba07
ob: idempotent code block evaluation and result removal
...
* lisp/ob.el (org-babel-remove-result): Idempotent code block
evaluation and result removal.
2011-08-19 08:58:24 -06:00
Bastien Guerry
58f1dbccf8
Remove the "Version" header in Org libraries (leave it in org.el).
...
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Bastien Guerry
7a18799e25
Remove arch-tag at the bottom of files.
2011-08-15 20:04:38 +02:00
Bastien Guerry
904ed18bc2
Fix copyright years for elisp files in core and contrib.
...
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
David Maus
545bfddeea
Provide edebug specifications for macros
...
* org-macs.el (org-with-gensyms, org-called-interactively-p)
(with-silent-modifications, org-bound-and-true-p)
(org-unmodified, org-re, org-preserve-lc)
(org-without-partial-completion, org-with-point-at)
(org-no-warnings, org-if-unprotected, org-if-unprotected-1)
(org-if-unprotected-at, org-with-remote-undo)
(org-no-read-only, org-save-outline-visibility)
(org-with-wide-buffer, org-with-limited-levels)
(org-eval-in-environment): Provide edebug specifications.
* org-src.el (org-src-do-at-code-block): Dto.
* org-publish.el (org-publish-with-aux-preprocess-maybe): Dto.
* org-compat.el (org-xemacs-without-invisibility): Dto.
* org-clock.el (org-with-clock-position, org-with-clock): Dto.
* org-agenda.el (org-agenda-with-point-at-orig-entry)
(org-batch-agenda, org-batch-agenda-csv)
(org-batch-store-agenda-views): Dto.
* ob.el (org-babel-do-in-edit-buffer)
(org-babel-map-src-blocks, org-babel-map-inline-src-blocks): Dto.
* ob-tangle.el (org-babel-with-temp-filebuffer): Dto.
* ob-table.el (sbe): Dto.
* ob-exp.el (org-babel-exp-in-export-file): Dto.
* ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Dto.
2011-08-12 08:38:59 +02:00
Eric Schulte
dc904a834d
removed use of copy-seq from ob.el
...
* lisp/ob.el (org-babel-sha1-hash): Removed use of copy-seq.
2011-08-05 14:31:59 -04:00
Eric Schulte
41bf22f4dc
Revert "new interactive function for removing code block results"
...
This reverts commit 72817926d7
.
2011-08-01 15:45:58 -06:00
Eric Schulte
b8ae6a6bdb
Revert "fix compilation errors introduced by most recent changes"
...
This reverts commit 9ff7f80f51
.
2011-08-01 15:31:24 -06:00
Eric Schulte
274823c858
if a code block has a body, its last character must be a newline
...
* lisp/ob.el (org-babel-src-block-regexp): If a code block has a body,
its last character must be a newline.
2011-07-29 16:04:36 -06:00
Eric Schulte
9ff7f80f51
fix compilation errors introduced by most recent changes
...
* lisp/ob-exp.el (org-babel-inline-src-block-regexp): Declare this variable.
* lisp/ob.el (defvar): Wrap variable declaration in eval-when-compile.
2011-07-29 10:36:39 -06:00
Eric Schulte
72817926d7
new interactive function for removing code block results
...
* lisp/ob-keys.el (org-babel-key-bindings): Bound to C-c C-v k.
* lisp/ob.el (org-babel-map-regexp): New generic mapping macro.
(org-babel-map-inline-src-blocks): Rewritten to use new macro.
(org-babel-kill-results): Remove some or all results in the current
file.
* lisp/ob-lob.el (org-babel-map-call-lines): Map over all lob call
lines in the current file.
* doc/orgcard.tex: Document new keybinding.
2011-07-29 10:31:56 -06:00
emacs
7340cee33a
Update website to show 7.7 as current release
2011-07-28 10:33:35 +00:00
Eric Schulte
b1724e02fb
adding a function for inspecting code block information e.g., header arguments
...
* lisp/ob.el (org-babel-view-src-block-info): New function to inspect code blocks.
* lisp/ob-keys.el (org-babel-key-bindings): Key bindings for org-babel-view-src-block-info.
* doc/orgcard.tex: Documentation of new Babel function.
2011-07-25 10:50:56 -06:00
Eric Schulte
4b6bfab817
ob: only call copy-seq on proper lists
...
* lisp/ob.el (org-babel-sha1-hash): Only call copy-seq on proper
lists.
2011-07-21 11:05:33 -06:00
Eric Schulte
0b9cc74c56
ob: replaced call to defunct function `org-babel-result-hash'
...
* lisp/ob.el (org-babel-execute-src-block): Replaced call to defunct
function `org-babel-result-hash'.
2011-07-19 07:25:35 -06:00
Eric Schulte
8854497c35
ob-exp: on export resolve hashes in the current (not original) file buffer
...
* lisp/ob-exp.el (org-babel-exp-results): Resolve hashes in the
current (not original) file buffer.
* lisp/ob.el (org-babel-current-result-hash): More informative name,
and remove useless optional argument.
2011-07-18 17:08:37 -06:00
Bastien Guerry
b93da58e1f
ob.el: Bugfix about `nil' body variable when parsing block.
...
* ob.el (org-babel-strip-protective-commas): Return `nil'
instead of an error if no argument is given.
(org-babel-parse-src-block-match): Make sure body is defined
in the let construct.
2011-07-16 18:40:36 +02:00
Eric Schulte
8834bde39f
ob: strip *single* trailing newline from code block bodies
2011-07-15 09:26:43 -06:00
Eric Schulte
c6e69cd85b
ob: enforce "verbatim" as synonym for "scalar"
...
* lisp/ob-awk.el (org-babel-execute:awk): Use "verbatim" as synonym
for "scalar".
* lisp/ob-sh.el (org-babel-sh-evaluate): Use "verbatim" as synonym for
"scalar".
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Use "verbatim" as
synonym for "scalar".
* lisp/ob.el (org-babel-merge-params): Use "verbatim" as synonym for
"scalar".
2011-07-10 09:42:54 -06:00
Eric Schulte
cef17b6340
ob-clojure: parse odd parens when nested isnide lists
...
* lisp/ob.el (org-babel-script-escape): Parse odd parens when nested
isnide lists.
2011-07-10 09:42:54 -06:00
Bastien Guerry
9c05a7c781
Bump to version 7.6
2011-07-06 21:06:03 +02:00
Eric Schulte
6ddad0a91a
ob: not including export-variable headers in cache sha1
...
* lisp/ob.el (org-babel-sha1-hash): Improving code layout and removing
export-variable headers in cache sha1.
2011-07-01 12:56:22 -07:00
Eric Schulte
0a0969303a
ob: declare variable to appease compiler
...
* lisp/ob.el (org-babel-inline-lob-one-liner-regexp): Declare variable
to appease compiler.
2011-06-29 16:29:19 -07:00