Commit Graph

567 Commits

Author SHA1 Message Date
Achim Gratz 091bf02514 ob-core.el: Do not ask for confirmation if cached value is current
* ob-core.el (org-babel-execute-src-block): Do not run
`org-babel-confirm-evaluate´ if source block has a cache and the
cache value is current (there is no evaluation involved in this
case).
2013-02-27 09:44:27 +01:00
Eric Schulte f51fd88554 Return expanded code on programmatic calls
* lisp/ob-core.el (org-babel-expand-src-block): Return value of expanded
  code block on non-interactive calls.
2013-02-24 09:50:46 -07:00
Grégoire Jadi 67febc3600 Unify `org-id-reverse-string' and `org-babel-reverse-string' into `org-reverse-string'
* lisp/org.el (org-reverse-string): Add `org-reverse-string' to
  reverse a string.
* lisp/org-id.el(org-id-new, org-id-decode): Replace
  `org-id-reverse-string' by `org-reverse-string'.
* lisp/ob-core.el(org-babel-trim): Replace `org-babel-reverse-string'
  by `org-reverse-string' and declare it.

TINYCHANGE
2013-02-13 16:29:09 +01:00
Bastien Guerry 019a8dee21 ob-core.el (org-babel-insert-result): Fix bug when inserting an empty string as the result
* ob-core.el (org-babel-insert-result): Fix bug when inserting
an empty string as the result.
2013-02-12 17:49:06 +01:00
Eric Schulte 728c0eb693 bring back org-ts-regep fix lost in merge
* lisp/ob-core.el (org-babel-result-regexp): Bring back Bastien's
  hackish fix from commit c17e07e9 which was accidentally dropped in a
  merge.
2013-02-09 16:05:44 -07:00
Gary Oberbrunner e2b17ccc52 Improvements to Org SQL support
* add a header-row delimiter to the tables returned from mysql
 * add new sql-specific header args for the database connection, and implements them for mysql
 * add support for :colnames (mysql only)
 * (minor) add an edebug spec to org-babel-result-cond to allow edebugging through it
 * add some doc about what header args are used
2013-02-09 14:11:45 -07:00
Eric Schulte f3be2ae163 Change syntax of babel time hash layout
The syntax of result hashes with times are now as show below.

  #+RESULTS[<TIME> HASH]:

* lisp/ob-core.el (org-babel-result-regexp): Simplified regexp given new
  time hash layout.
  (org-babel-current-result-hash): New match string.
  (org-babel-hide-hash): New match string.
  (org-babel-where-is-src-block-result): New match string, and inserting
  hashes in the new format.
2013-02-09 14:11:45 -07:00
Bastien Guerry b636982b00 Silent byte-compiler. 2013-02-08 17:21:54 +01:00
Bastien Guerry eac6af707c New commands `org-next-block' and `org-previous-block'
* ob-core.el (org-babel-next-src-block)
(org-babel-previous-src-block): Rewrite using
`org-next-block'.

* org.el (org-next-block, org-previous-block): New navigation
commands.
(org-mode-map): Bind the new commands to C-c C-F and C-c C-B
respectively.

Thanks to Bill White for suggesting this.
2013-02-08 17:11:13 +01:00
Bastien Guerry c17e07e94f ob-core.el (org-ts-regexp): Remove duplicate defconst'ing
* ob-core.el (org-ts-regexp): Remove duplicate defconst'ing.
(org-babel-result-regexp): Don't use `org-ts-regexp', use a
regexp string directly.

This is not the best solution, we should be able to use
`org-ts-regexp' here, but the dependencies makes it hard.
So let's not define org-ts-regexp twice, just use a raw
regexp instead, and add a FIXME warning about this.
2013-01-31 10:57:49 +01:00
Eric Schulte ab49324917 fix bug introduced in c1226e8
* lisp/ob-core.el (org-ts-regexp): Declare this here as well.
2013-01-30 13:53:55 -07:00
Eric Schulte c1226e80d4 option to show time stamps over result hashes
suggested by Thomas Alexander Gerds

* lisp/ob-core.el (org-babel-result-regexp): Now matching time stamp as
  well.
  (org-babel-hash-show-time): Variable controlling the display of time
  stamps.
  (org-babel-current-result-hash): With hash time stamps.
  (org-babel-hide-all-hashes): With hash time stamps.
  (org-babel-where-is-src-block-result): With hash time stamps.
2013-01-30 10:08:38 -07:00
Bastien Guerry ae7516b0e1 Sync `org-babel-temp-file' definition with maint 2012-12-23 17:47:20 +01:00
Bastien Guerry fd9b262d94 Fix more compiler warnings.
* org.el (org-clock-timestamps-up): Fix declarations.

* ob-core.el (org-split-string): Declare function.
2012-12-20 01:20:17 +01:00
Nicolas Goaziou 90de5ee463 ob-core: Fix the #+END_ directive from the :wrap param
* lisp/ob.el: Only use the :wrap argument up to the first space when creating
  the #+END_ directive.

Using an option like ":wrap SRC fundamental" was generating and end marker of
"#+END_SRC fundamental", which caused the new exporter to fail to handle to
block properly.

Patch from Michael Gauland.
2012-12-19 21:16:57 +01:00
Eric Schulte ff0081847c requiring ob now pulls in all of Babel 2012-12-12 10:48:56 -07:00
Eric Schulte 0694965865 renaming lisp/ob.el to lisp/ob-core.el 2012-12-12 10:48:56 -07:00
Renamed from lisp/ob.el (Browse further)