Commit graph

5501 commits

Author SHA1 Message Date
Carsten Dominik c201da51b8 Fix source code example bug with plain list export to HTML
* lisp/org-exp.el (org-export-format-source-code-or-example): Mark examples
by a property. o
* lisp/org-html.el (org-export-html-close-lists-maybe): Check if raw
HTML stuff was actually made from an example

Daniel Mahler writes:

> 2. I would like to embed source blocks in numbered lists, without
> breaking the numbering ie:
>
>    1) get ready
>     #+BEGIN_SRC sh
>    get_ready
>     #+END_SRC
>    2) go
>     #+BEGIN_SRC sh
>    go
>     #+END_SRC
>
>    currently the src blocks cause the numbering to reset, so all
> items in a sequence like this are numbered 1

This patch fixes this issue - but I cannot say anymore why the code in
org-export-html-close-lists-maybe does in fact work.  The code looks
wrong, but it seems to work.  What looks wrong is that i does not
check for the true indentation in the case when the line is not
protected.  It must be that this case is covered by some other code
further down in the exporter.
2010-06-18 08:49:25 +02:00
Eric Schulte 0d1aaf735f babel: declaring variable to satisfy compiler 2010-06-17 18:15:36 -07:00
Eric Schulte ffbeb7ffe6 babel: languages adding their extensions to `'org-babel-tangle-lang-exts' 2010-06-17 18:15:35 -07:00
Eric Schulte 752a59c58f babel: ensure no whitespace in language names
* lisp/babel/ob.el (org-babel-src-block-regexp):
  ensure no whitespace in language names

  (org-babel-inline-src-block-regexp):
  ensure no whitespace in language names
2010-06-17 18:15:35 -07:00
Eric Schulte 97ead27f78 babel: remove all language file reference to define language variables 2010-06-17 18:15:35 -07:00
Eric Schulte 9ae48928ca babel: removed ob-interpreters variable -- more natural evaluation decisions
Babel will now try to evaluate any source code block for which the
  required language-specific functions are defined.
2010-06-17 18:15:35 -07:00
Eric Schulte c981f6d697 babel: simplifying handling of tangle langs
- Removed the org-babel-tangle-langs variable.
  - Added the org-babel-tangle-lang-exts alist for associating
    languages with file extensions
  - Comments now only added when the :comments header argument is set
    to yes

* lisp/babel/ob-tangle.el (org-babel-tangle-w-comments):
  this is now a defcustom

  (org-babel-tangle-lang-exts): alist associating languages with file
  extension, this is also a defcustom

  (org-babel-spec-to-string): no longer using the complex tangle-lang
  variables
2010-06-17 18:15:35 -07:00
Eric Schulte cab1e23d61 babel-doc: adding c++ and sqlite as supported languages, and removing table comment 2010-06-17 18:15:35 -07:00
Eric Schulte 9c7bad1fab babel-doc: adding buffer-wide header argument documentation 2010-06-17 18:15:35 -07:00
Eric Schulte 7b19b0e547 delete trailing whitespace 2010-06-17 18:15:35 -07:00
Tom Dye b5efd50fb5 Last chance clean-up of org.texi 2010-06-17 18:15:35 -07:00
Eric Schulte 4482058c0c babel: some final compiler tweaks -- no more compiler warnings 2010-06-17 18:15:35 -07:00
Eric Schulte 32c985ffd9 babel: more compiler cleanup -- now only throwing 1 warning (which doesn't make sense anyways) 2010-06-17 18:15:35 -07:00
Eric Schulte a86734f526 babel: eliminated compiler warning about `org-babel-get-src-block-info' 2010-06-17 18:15:35 -07:00
Eric Schulte 5769cccd6a babel: ob-sqlite now handles column names
* lisp/babel/langs/ob-sqlite.el (org-babel-execute:sqlite):
  now handling column names

  (org-babel-sqlite-offset-colnames): now handling column names
2010-06-17 18:15:34 -07:00
Eric Schulte 0f633df264 babel-doc: now compiling again 2010-06-17 18:15:34 -07:00
Tom Dye 3afe60dcde babel-doc: Changed description of function that asks before switching buffers 2010-06-17 18:15:34 -07:00
Eric Schulte 7513cdb12a ob-sqlite.el -- sqlite3 support to org-babel
* lisp/babel/langs/ob-sqlite.el: sqlite3 support for org-babel
2010-06-17 18:15:34 -07:00
Tom Dye cbd9bba834 First pass through babel documentation (on airplane) 2010-06-17 18:15:34 -07:00
Eric Schulte b329b7a736 babel: uniform declare-function placement at the tops of files 2010-06-17 18:15:34 -07:00
Eric Schulte e853f11899 ob-sh: adding check of existence for session variable 2010-06-17 18:15:34 -07:00
Eric Schulte 292799681e babel: pre-setting variable for compiler
* lisp/babel/ob.el (call-process-region): declaring
  call-process-region as a variable so that we can set it's value
  later
2010-06-17 18:15:34 -07:00
Eric Schulte df5f954c79 babel: swapping function order to appease the compiler
* lisp/babel/ob-tangle.el (org-babel-spec-to-string): swap flet and
  let order to make compiler happy
2010-06-17 18:15:34 -07:00
Eric Schulte 0751f2ebfa fixes 2010-06-17 18:15:34 -07:00
Eric Schulte 7dba834dbe minor bug fix 2010-06-17 18:15:34 -07:00
Tom Dye b548c3e794 Minor editorial changes to babel documentation (Seattle Airport) 2010-06-17 18:15:33 -07:00
Eric Schulte 892292c2d9 better initialization for call-process-region 2010-06-17 18:15:33 -07:00
Eric Schulte ca3f3baca6 remember the ob-comint-with-output is a macro 2010-06-17 18:15:33 -07:00
Eric Schulte 116d9cfa85 ob: adding ob-init.el to load everything 2010-06-17 18:15:33 -07:00
Eric Schulte b746686dfe ob-sh: should say declare-function not defun-function 2010-06-17 18:15:33 -07:00
Eric Schulte 0e939a7df5 babel: more compiler satisfaction 2010-06-17 18:15:33 -07:00
Eric Schulte b9a8df9d1c babel: defvar'ing `org-babel-library-of-babel' for compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 0dabebc444 babel: eval-when-compile for 'cl in more babel files 2010-06-17 18:15:33 -07:00
Eric Schulte 6fa2ab7eac babel: replacing functions like "fifth" with "nth 4" 2010-06-17 18:15:33 -07:00
Eric Schulte defa2dcb2f babel: declaring functions and variables for the compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 75a82240c6 babel: correct function name in reference resolution
* lisp/babel/ob-ref.el (org-babel-ref-resolve-reference): correcting
  mis-named function org-babel-read-file to org-babel-read-link
2010-06-17 18:15:33 -07:00
Eric Schulte 49e90002dc babel: define variables before their first use
* lisp/babel/ob.el (org-babel-interpreters): define this before it is
  first used

* lisp/babel/ob.el (org-babel-call-process-region-original): define
  this before it is first used
2010-06-17 18:15:33 -07:00
Eric Schulte 4c8f008f3f removing compilation of optional language files from the Makefile
* Makefile (LISPF): let's not compile files that won't often be used.
2010-06-17 18:15:33 -07:00
Eric Schulte 2dc30adf15 babel: call-process-region-original is no longer a free variable
* lisp/babel/ob.el (org-babel-execute-src-block):
  call-process-region-original is no longer free

  (org-babel-org-babel-call-process-region-original):
  call-process-region-original is no longer free and is now renamed
  org-babel-call-process-region-original
  (org-babel-tramp-handle-call-process-region):
  call-process-region-original is no longer free
2010-06-17 18:15:32 -07:00
Eric Schulte ea8565e2ed babel: replaced save-excursion' with with-current-buffer'
* lisp/babel/ob.el (org-babel-expand-noweb-references):
  `save-excursion' is not longer defeated by `set-buffer'
2010-06-17 18:15:32 -07:00
Eric Schulte e0b71bf8e2 babel: wrapping free language variable in result insertion code
* lisp/babel/ob.el (org-babel-execute-src-block): now passing
  additional optional argument to `org-babel-inert-results'

  (org-babel-insert-result): now accepting additional language
  variable
2010-06-17 18:15:32 -07:00
Eric Schulte 45841a8a9d babel: ensure org-babel-interpreters' is defined before org-babel-add-interpreter'
* lisp/babel/ob.el: ensure `org-babel-interpreters' is defined before `org-babel-add-interpreter'
2010-06-17 18:15:32 -07:00
Eric Schulte 6be47552ea babel: org-babel-comint-with-output' no longer assumes full-body' variable
* lisp/babel/ob-comint.el (org-babel-comint-with-output):
  Fixed egregious oversight in which we were assuming that the
  `full-body' variable would be in scope at the time of macro
  execution.  Thanks to the compiler for finding this bug.

* lisp/babel/langs/ob-R.el (org-babel-R-evaluate): now using the fixed
  `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-haskell.el (org-babel-execute:haskell): now
  using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ocaml.el (org-babel-execute:ocaml): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-octave.el (org-babel-octave-evaluate-session):
  now using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-python.el (org-babel-python-evaluate): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ruby.el (org-babel-ruby-evaluate): now using the
  fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-sh.el (org-babel-sh-evaluate): now using the
  fixed `org-babel-comint-with-output' macro
2010-06-17 18:15:32 -07:00
Eric Schulte 79ae257d98 updated makefile to compile all babel files 2010-06-17 18:15:32 -07:00
Eric Schulte 8e0faf35de ensuring the existence of a complete first sentence in the documentation of each babel function 2010-06-17 18:15:32 -07:00
Eric Schulte 0738893160 updating require and provide boilerplate for new ob* files 2010-06-17 18:15:32 -07:00
Eric Schulte 904bdaff9a ob.el now adds the lisp/langs/ directory to the load path 2010-06-17 18:15:32 -07:00
Eric Schulte 93f6360793 removing contrib/babel/org-babel-install.el -- no longer required 2010-06-17 18:15:32 -07:00
Eric Schulte 96e396ba77 new header for ob.el 2010-06-17 18:15:32 -07:00
Eric Schulte e0e4d76094 renaming all org-babel* function to ob* to conform with Emacs conventions 2010-06-17 18:15:32 -07:00