lisp/ob-core.el: Inline source block / babel call results are replaceable
commit85ff663ce4c7b096158f11a868a6c3ba1e849d0c
authorCharles Berry <ccberry@ucsd.edu>
Thu, 29 Jan 2015 20:05:31 +0000 (29 12:05 -0800)
committerCharles Berry <ccberry@ucsd.edu>
Thu, 29 Jan 2015 20:05:31 +0000 (29 12:05 -0800)
tree992c65eea64e25887c0c97a9587f662b49e53b29
parentf301ac8e9f542dc179cb3681bc7a61b0f448641b
lisp/ob-core.el: Inline source block / babel call results are replaceable

* lisp/ob-core.el (org-babel-remove-inline-result): Delete results of
  current inline src block or inline babel call if it is wrapped in a
  "{{{results(.*)}}}" macro call.

* lisp/ob-core.el (org-babel-get-lob-one-liner-matches): Ensure that
  the point ends up on the same line as, and just before, `call_'
  before setting match-data.

* ob-core.el (org-babel-get-inline-src-block-matches): Use
  `org-element-context' and friends to find inline-src-block.  When
  point is in an inline-src-block (including white space determined by
  :post-blank) set match-data and return `t'.

* lisp/ob-core.el (org-babel-insert-result): Delete any `results'
  macro following current inline src block or babel call; insert
  current value in 'results' macro possibly wrapping RESULT in an
  export snippet or inline source block first.  Use of `:results list'
  or `:results table', or use of a multiline RESULT (after stripping a
  trailing newline) or a list RESULT from an inline src block or babel
  call throws an error.
lisp/ob-core.el