Commit Graph

613 Commits

Author SHA1 Message Date
Bastien Guerry 8ec508b128 Add org-notmuch.el by Matthieu Lemerre to contrib/lisp/. 2011-02-12 16:53:10 +01:00
Eric Schulte e612d0b9ff org-mime: now possible to set mail subjects using the mail_subject property 2011-01-28 12:53:36 -07:00
Eric Schulte bbde97fb1e org-mime: fixed type -- thanks Niels Giesen 2011-01-15 10:16:18 -07:00
Eric Schulte 079c4a026d org-mime: inherit of MAIL_ properties with `org-mime-use-property-inheritance'
* contrib/lisp/org-mime.el (org-mime-use-property-inheritance): User
  configurable variable to control inheritance of MAIL_ properties.
  (org-mime-send-subtree): Using new custom variable.
  (org-mime-subtree): Using new custom variable.
2011-01-14 06:37:18 -07:00
Eric Schulte b41a340e9e org-mime: now inherits MAIL_* properties
Thanks to niels giesen for this patch
2011-01-13 17:11:29 -07:00
Eric Schulte 67d6806977 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2011-01-08 14:14:37 -07:00
Eric Schulte 5e7cbe28f4 org-collector: completed and activated new :inherit keyword 2011-01-08 14:14:17 -07:00
Eric Schulte 57b21c86ff org-collector: fixed indentation to fit within 80 columns 2011-01-08 14:06:36 -07:00
Eric Schulte 33a3222795 org-collector: adding :inherit keyword for inherited properties
* contrib/lisp/org-collector.el (org-propview-get-with-inherited): New
  function for inheriting explicitly mentioned properties.
  (org-propview-collect):  Accepts explicitly mentioned properties to
  inherit.
2011-01-08 14:04:33 -07:00
Bastien Guerry 840873e475 Update contrib/scripts/ditaa.jar to ditaa v0.9 of 2009-11-24
This was suggested by Vladimir Alexiev <vladimir@sirma.bg>.
2011-01-08 10:07:27 +01:00
Carsten Dominik 8dfd845c7f Add contrib package org-eshell.el
* contrib/lisp/org-eshell.el: New file
* lisp/org.el (org-modules): Add `org-eshell'.
2011-01-04 16:06:09 +01:00
Bastien Guerry 57144fea1e Move org-special-blocks.el from contrib/lisp/ to lisp/
Carsten received the completed assignment of Chris Grays,
org-special-blocks.el author's.
2011-01-03 20:17:14 +01:00
Eric Schulte 40264e9b75 org-mime: call 'org and 'ascii hooks appropriately
patch by Niels Giesen

* contrib/lisp/org-mime.el (org-mime-compose):
2010-12-27 20:57:41 -07:00
Eric Schulte ad6c199ccc ob-mime: one-to-one mapping between output formats and hooks.
Suggested by Niels Giesen.

* contrib/lisp/org-mime.el (lambda): Removing the 'html-ascii hook as
  each hook should be used for a single format.
  (org-mime-compose): Making use of format specific hooks, and apply
  each format hook individually to the body of each mime part as
  appropriate.
2010-12-27 07:48:40 -07:00
Eric Schulte 7faadf42e9 collector: replace `org-read-prop' with `org-babel-read'
* contrib/lisp/org-collector.el (org-propview-collect): Removed
  org-read-prop and replaced with org-babel-read.
2010-12-20 12:11:46 -07:00
Eric Schulte 61470f6ae1 org-mime: hooks run in org-mode buffer when composing an email
Thanks to Ethan Ligon for suggesting this functionality.

  An example hook such as the following will record when emails have
  been composed

    (add-hook 'org-mime-send-subtree-hook
            (lambda ()
              (org-entry-put (point) "mail_composed" (current-time-string))))

* contrib/lisp/org-mime.el (org-mime-send-subtree-hook): Hooks run
  in the org-mode subtree when composing an email.
  (org-mime-send-buffer-hook): Hooks run in the org-mode buffer when
  composing an email.
2010-12-19 18:46:15 -07:00
Eric Schulte 76661a853a org-mime: adding format specific pre-export hooks
Thanks to Niels Giesen for suggesting this change.

* contrib/lisp/org-mime.el (lambda): Adding format specific pre-export
  hooks.
  (org-mime-compose): Call pre-export hooks before export.
2010-12-19 16:36:54 -07:00
Eric Schulte 96c70f3d7e org-mime: now exports subtrees, and can read mail headers from subtree properties
Much of this code is reworking of a very nice function shared on the
  mailing list by Matt Lundin.

* contrib/lisp/org-mime.el (org-mime-htmlize): Fixed indentation.
  (org-mime-try): Short macro for safely checking for properties.
  (org-mime-send-subtree): Drops the current subtree into a mail
  buffer possible exported and mime-encoded.
  (org-mime-send-buffer): Drops the current buffer into a mail
  buffer possible exported and mime-encoded.
  (org-mime-compose): Exports and mime-encodes a string of org-mode
  text for sending via email.
  (org-mime-org-buffer-htmlize): Create an email buffer containing the
  current org-mode file exported to html and encoded in both html and
  in org formats as mime alternatives.
  (org-mime-subtree): Create an email buffer containing the current
  org-mode subtree exported to a org format or to the format specified
  by the MAIL_FMT property of the subtree.
2010-12-17 14:20:44 -07:00
Eric Schulte f68f1e6055 org-mime: set message subject from buffer title
* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): Set message
  subject from buffer title.
2010-12-16 18:25:00 -07:00
Eric Schulte 943b6701c4 org-mime: insert contents *before* signature
Thanks to Rainer M. Krug for reporting

* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): Insert
  contents *before* signature.
2010-12-16 18:18:24 -07:00
Eric Schulte 3c66db85f0 org-mime: Use new org-export-string function
* contrib/lisp/org-mime.el (org-mime-htmlize): Use new
  org-export-string function.
  (org-mime-org-buffer-htmlize): Use new org-export-string function.
2010-12-16 18:12:08 -07:00
Paul M. Rodriguez 00d00fa0b0 org-velocity and org-remember
This patch supports org-capture (with fallback to org-remember) for
org-velocity.  It also effects some internal changes, principally due to
the use of `Electric-command-loop' to replace an expedient equivalent.
2010-11-15 11:22:54 +01:00
Eric Schulte a9c5797fa1 library of babel: aesthetic changes to elispgantt 2010-11-12 16:37:17 -07:00
Eric Schulte 2ae5721731 adding elispgantt to the library of babel
The =elispgantt= source block was sent to the mailing list by Eric
  Fraga.  It was modified slightly by Tom Dye.
2010-11-12 16:34:46 -07:00
Eric Schulte 859a1b277e org-mime: removed call to defunct function
* contrib/lisp/org-mime.el (org-mime-htmlize): removed call to defunct
  function
2010-10-27 12:04:10 -06:00
Eric Schulte e6c9936373 suggesting a new function org-export-string
The attached patch adds a new functions org-export-string.

,----
| org-export-string is a Lisp function in `org-exp.el'.
|
| (org-export-string STRING FMT &optional DIR)
|
| Export STRING to FMT using existing export facilities.
| During export STRING is saved to a temporary file whose location
| could vary.  Optional argument DIR can be used to force the
| directory in which the temporary file is created during export
| which can be useful for resolving relative paths.  Dir defaults
| to the value of `temporary-file-directory'.
`----

This function should be useful in user code, and can already reduce the
amount of code in ob-org.el and org-mime.el.

>From e51017e4d7051aad31384a470f0a695dca0d6716 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Sun, 17 Oct 2010 15:17:13 -0600
Subject: [PATCH] org-export-string -- exports a string of org-mode markup text

* lisp/org-exp.el (org-export-string): new function org-export-string
  can be used to convert a string of test in org-mode markup to a
  specified format

* contrib/lisp/org-mime.el (org-mime-htmlize): now using new
  org-export-string function for exportation

* lisp/ob-org.el (org-babel-execute:org): now using new
  org-export-string function for exportation
2010-10-22 06:48:32 -06:00
Eric Schulte b5967dfa88 library of babel: new code block for expanding headings
* contrib/babel/library-of-babel.org (Write): new code block for
  expanding headings
2010-09-21 09:49:41 -06:00
Carsten Dominik 3ad98da667 Update org-drill.el to version 1.4 2010-09-17 23:10:36 +02:00
Bastien Guerry 0307f8e81b contrib/lisp/org-wikinodes.el: fix tiny typo.
s/org-find-exact-headling-in-buffer/org-find-exact-headline-in-buffer

This was spotted by Jambunathan K.
2010-09-02 15:43:45 +02:00
Christian Egli 288d1bbb0d Make the number of printed weeks configureable
This is useful for the hipster PDA where you might want to print more
weeks than just four.
2010-08-31 08:24:40 +02:00
Carsten Dominik 580a1cb3f3 Update org-drill.el 2010-08-30 09:29:26 +02:00
Eric Schulte a89dc43e83 integrating ob-plantuml -- Thanks to Zhang Weize for this contribution!
* Makefile (LISPF): now compiling and installing ob-plantuml.el

* contrib/scripts/.gitignore : ignores the plantuml.jar file, so that
  it can be located next to ditaa.jar

* lisp/ob-plantuml.el: adding copyright notice and FSF attribution

  (org-plantuml-jar-path): now a defcustom

  (org-babel-execute:plantuml): now using org-babel-eval which
  displays error messages

* lisp/org.el (org-babel-load-languages): ob-plantuml is now part of
  org-babel-load-languages
2010-08-26 09:36:08 -06:00
Robert P. Goldman e50657d7cb Added a call to insert any bodynewline-paragraph value before the start of a line item. 2010-08-21 05:11:02 +02:00
Robert P. Goldman ee736317cb Add a test code file. 2010-08-21 05:10:46 +02:00
Robert P. Goldman e439e4da27 Substantially improved org-export-generic-fontify based on help from Carsten. 2010-08-21 05:10:28 +02:00
Robert P. Goldman daa6f98cab Partial solution to the fontification problem. Having some trouble with the MATCH-STRING calls, but mostly ok. 2010-08-21 05:10:20 +02:00
Robert P. Goldman dedea0721c Make newline-handling more flexible (per WH), declare keywords.
Followed Wes Hardaker's suggestion to make the translation of
newlines more flexible --- instead of making a boolean for
special translation of blank lines, I added the ability to
specify the translation.

Also added a macro for declaring generic translation keywords
with type information and documentation.  Hope this will make
the generic translator easier to use.
2010-08-21 05:10:11 +02:00
Robert P. Goldman adf2e016e0 Revision to handling of blank lines. Start of declaration protocol.
Followed Wes Hardaker's idea of permitting alternative rewrites for blank
lines, instead of making the blank line handler be a boolean and
hard-wiring a newline character.

Also added a declaration form, with type and documentation options, for the
keywords used in defining a generic export method.
2010-08-21 05:09:58 +02:00
Carsten Dominik 4a028cc7c0 Add org-static-mathjax to the contrib directory
Thanks to Jan Bker for this contribution.
2010-08-20 18:12:59 +02:00
Carsten Dominik 4ea5658a1a Add org-drill.el 2010-08-17 10:40:14 +02:00
Carsten Dominik 67e34d7eae Allow special blocks to start with white space before the \begin{}
* contrib/lisp/org-special-blocks.el (org-special-blocks-make-special-cookies):
Allow white space at beginning of line.
2010-08-16 13:59:24 +02:00
Carsten Dominik 2f9d095617 org-depend: Fix blocking logic
* contrib/lisp/org-depend.el (org-depend-block-todo): Fix blocking logic.

Paul Sexton writes:

> The value returned by org-depend-block-todo determines whether an item
> is considered "blocked", and thus whether it is shown dimmed (because
> this function is added to org-blocker-hook).
>
> o-d-b-t only returns true in a very limited set of conditions, so very
> often items which should show up as blocked, do not. To be honest I
> don't remember the exact details, but it did not work before I applied
> the patch, and has worked correctly ever since.
2010-08-11 11:16:11 +02:00
Ivanov Dmitry b36cf7a437 org-collector: better comments and more robust conversion of string to elisp
* contrib/lisp/org-collector.el (org-read-prop): added a more detailed
  comment, changed 2 if stements to 1 cond to make the code more
  comprehensible, added
    (condition-case nil
            (read prop)
            (error prop))
  instead of
    (read prop)
  so, if any error occurs during the conversion of prop to lisp
  expression - a string will be returned.
2010-08-10 09:22:24 -06:00
Eric Schulte 25ac9ea8dd library-of-babel: more control over exporting results to files
#+source: table
  #+begin_src emacs-lisp
    (mapcar
     (lambda (el) (number-sequence el (+ el 3)))
     (number-sequence 0 4))
  #+end_src

  writes the results out as csv file
  #+call: write(data=table, file="~/Desktop/example.csv") :results silent

  writes the results out as tab separated file
  #+call: write(data=table, file="~/Desktop/example.tsv") :results silent

  write the results out as a normal org-mode file
  #+call: write(data=table, file="~/Desktop/example.org") :results silent

* contrib/babel/library-of-babel.org: more control over exporting
  results to files
2010-08-08 22:23:53 -06:00
Carsten Dominik 251a3ca7c3 Add org-wikinodes.el as a contributed package
* contrib/lisp/org-wikinodes.el: New file.
* lisp/org-exp.el (org-export-preprocess-after-radio-targets-hook):
(org-export-define-heading-targets-headline-hook): New hooks.
* lisp/org.el (org-modules): Add entry for org-wikinodes.el.
(org-font-lock-set-keywords-hook): New hook.
(org-open-at-point-functions): New hook.
(org-find-exact-headling-in-buffer):
(org-find-exact-heading-in-directory): New functions.
(org-mode-flyspell-verify): Better cursor position for checking if
flyspell should ignore a word.
2010-08-06 15:08:45 +02:00
Eric Schulte 9c1c4b3f8d org-mime: fixed major error -- was exporting entire as text/plain mime part
Thanks to Ethan Ligon for pointing this out

* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): fixed major
  error -- was exporting entire as text/plain mime part, now when
  region is active, only that region is exported
2010-07-30 15:08:27 -06:00
Eric Schulte 6b5cf346ae org-collector: don't include tags in collected headlines
Thanks to d.tchin for bringing this issue to light

* contrib/lisp/org-collector.el (org-propview-collect): don't include
  tags in collected headlines
2010-07-23 09:36:17 -07:00
Carsten Dominik fff87c2c9f Install Paul Rodriguez' org-velocity.el
* contrib/lisp/org-velocity.el: New file.
* contrib/README: List org-velocity.el
* lisp/org.el (org-modules): Add entry for org-velocity
2010-07-21 07:50:29 +02:00
Eric Schulte 15ca30bc86 library-of-babel: improving reading text/tables in from files
* contrib/babel/library-of-babel.org(read): adding explicit format
  argument

  (gdoc-read): explicit format argument, and passing the csv
  specification through to org-table-import

  also removing org example code blocks
2010-07-20 11:49:55 -07:00
Eric Schulte d6208a7fe5 library-of-babel: more flexible reading of files into elisp 2010-07-19 17:13:53 -07:00
Eric Schulte a618566cd6 library of babel: support for reading/writing to/from Google docs 2010-07-19 17:12:53 -07:00
Carsten Dominik d1347d01a6 Remove the various ChangeLog files
We are no longer using them - when a ChangeLog is need, we generate it
from the git history.
2010-07-19 12:59:30 +02:00
Carsten Dominik 4f26d13f52 org-mac-link-grabber.el: Add Firefox/vimperator 2010-07-06 14:00:09 +02:00
Stephen Eglen b06e81a099 2010-07-01 Stephen Eglen <stephen@gnu.org>
* contrib/README: Update list of emacs-lisp files so that list is in
sync with the files in lisp/ and in same order as 'ls -1' for
those files.
2010-07-01 13:49:41 +02:00
David Maus f98bb728aa resubmitted patch to contrib/lisp/org-mac-link-grabber.el
Anthony Lander wrote:
>[1  <text/plain; US-ASCII (7bit)>]
>This patch fixes an issue with opening AddressBook.app and
>Together.app links.

This is just a reply with the patch attached in a way the
patchtracker[1] will catch it.

  -- David

[1] http://patchwork.newartisans.com/project/org-mode/list/
2010-07-01 06:29:17 +02:00
Eric Schulte e0f0e26a43 library-of-babel: adding a booktabs latex exporting function 2010-06-30 11:53:10 -07:00
Eric Schulte 96961abd3b library-of-babel: back to a single function per table environment 2010-06-28 13:23:48 -07:00
Eric Schulte 5461d3e605 library-of-babel: adding function for LaTeX Table export
* contrib/babel/library-of-babel.org (Write): support for LaTeX table export
2010-06-28 10:08:52 -07:00
Eric Schulte 517837b3a1 library of babel: added json function for accessing local or remote json objects
A quick example of accessing remote json data from Babel code blocks.

  Evaluate the following to see a listing of parks in DC by ward.

  #+source: dc-parks
  #+begin_src emacs-lisp :var keys='(ward address) :var data=json(url="http://ogdi.cloudapp.net/v1/dc/RecreationParks?format=json")
    (append
     (list keys 'hline)
     (mapcar
      (lambda (lis) (mapcar (lambda (key) (cdr (assoc key lis))) keys))
      (cdr (car data))))
  #+end_src
2010-06-27 16:07:29 -07:00
Eric Schulte ec8edda165 babel: ob-oz is now up to date with the new naming schema
* contrib/babel/langs/ob-oz.el (ob-oz): brought ob-oz up to date with
  new naming schema
2010-06-23 16:40:48 -07:00
Eric Schulte 3429a496a3 merged with master 2010-06-22 11:55:19 -07:00
Carsten Dominik 80531d8d71 * contrib/lisp/org-special-blocks.el
(org-special-blocks-convert-latex-special-cookies): Allow arguments to
TeX macros
2010-06-22 14:51:48 +02:00
Eric Schulte 97ead27f78 babel: remove all language file reference to define language variables 2010-06-17 18:15:35 -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 e0e4d76094 renaming all org-babel* function to ob* to conform with Emacs conventions 2010-06-17 18:15:32 -07:00
Eric Schulte 04152d3a06 moving org-babel into the main org-mode lisp directory
we are keeping two things in the contrib directory

  1) the library-of-babel.org file, this is with the goal of lowering
     the barrier of entry for contribution of functions to the library
     of babel

  2) we are also keeping a langs directory in the contrib directory
     because some language files do not have FSF copyright assignment
     -- current org-babel-oz.el is the only such file
2010-06-17 18:15:32 -07:00
Eric Schulte 4096c92e89 babel: don't remove protected items on exported block cleanup
* contrib/babel/lisp/org-babel-exp.el (org-exp-res/src-name-cleanup):
  don't remove protected items on exported block cleanup
2010-06-16 21:01:13 -07:00
Eric Schulte 512ad1e30d babel: org-babel-R is better about trimming preceding and trailing newlines
* contrib/babel/lisp/langs/org-babel-R.el (org-babel-R-evaluate):
  trimming preceding and trailing newlines of output results
2010-06-16 10:42:08 -07:00
Eric Schulte d45826943a babel: cleanup trailing newline after removed #+source and #+results lines
* contrib/babel/lisp/org-babel-exp.el (org-exp-res/src-name-cleanup):
  cleanup trailing newline after removed #+source and #+results lines
2010-06-16 10:16:22 -07:00
Eric Schulte becfc8979e babel: now using re-search-forward to find the end of source blocks
* contrib/babel/lisp/org-babel.el (org-babel-result-end): replacing
  search-forward with re-search-forward when finding the end of result
  blocks
2010-06-15 18:20:29 -07:00
Eric Schulte 689b51224f babel: make sure that source-code blocks don't consume their neighbors
* contrib/babel/lisp/org-babel.el (org-babel-where-is-src-block-result):
  on result insertion, ensure that code blocks don't overrun
  subsequent lines or source blocks
2010-06-15 16:36:07 -07:00
Eric Schulte b7e50cdc3d babel: cleaning up leftovers from block exportation
* contrib/babel/lisp/org-babel-exp.el (org-export-blocks-postblock-hook):
  adding function to cleanup leftovers after block exportation

  (org-exp-res/src-name-cleanup): function to cleanup leftovers from
  block exportation
2010-06-15 16:21:22 -07:00
Eric Schulte 74d337ef23 babel: fixed latex packages in org-babel-latex -- Thanks to William Henney
* contrib/babel/lisp/langs/org-babel-latex.el (org-babel-latex-body-to-tex-file):
  now calling `org-export-latex-fix-inputenc' to sort out encodings in
  latex package list
2010-06-14 14:45:33 -07:00
Eric Schulte 08d8331307 babel: fixed bug resulting from two inline src blocks on the same line
* contrib/babel/lisp/org-babel.el (org-babel-set-interpreters): less
  greedy regexp for inline source blocks ensures that there is no
  confusion when two inline blocks are on the same line.
2010-06-14 13:50:10 -07:00
Eric Schulte 18be132545 babel: adding buffer-wide header arguments behind #+BABEL:
e.g. placing the following at the top of your buffer

will result in all source-code blocks in the buffer having their
:session header argument set to "example"

* contrib/babel/lisp/org-babel-lob.el (org-babel-lob-execute): now
  included buffer-wide header arguments in lob header arguments

* contrib/babel/lisp/org-babel.el (org-babel-params-from-buffer): new
  function for grabbing header arguments from the top of the buffer

  (org-babel-parse-src-block-match): now includes buffer-wide header
  arguments

  (org-babel-parse-inline-src-block-match): now includes buffer-wide
  header arguments

  (org-babel-current-buffer-properties): buffer-local variable to hold
  buffer-wide header arguments
2010-06-14 12:15:11 -07:00
Eric Schulte 1da53c668a babel: bug fix in exporter wrt: contents of lob info lists
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-lob-one-liners):
  exportation of #+lob and #+call type lines is now correctly handling
  the addition of the indentation information to the info list
2010-06-11 10:16:56 -07:00
Eric Schulte a5712e4b0a babel: can open results which don't start on the first column
* contrib/babel/lisp/org-babel.el (org-babel-open-src-block-result):
  now able to handle results which don't start on the first column
2010-06-11 08:07:19 -07:00
Eric Schulte cc1c446791 babel: ensure positional invariance of the `info' list
* contrib/babel/lisp/org-babel.el (org-babel-get-src-block-info):
  ensure that info always has the same number of arguments in the same
  order
2010-06-10 21:36:57 -07:00
Eric Schulte 9311325030 babel: all org-babel elements should now work when indented
* contrib/babel/lisp/org-babel-lob.el
  (org-babel-lob-one-liner-regexp):
  (org-babel-lob-get-info):
  (org-babel-lob-execute):
  all org-babel elements should now work when indented

* contrib/babel/lisp/org-babel-ref.el
  (org-babel-ref-at-ref-p):
  all org-babel elements should now work when indented

* contrib/babel/lisp/org-babel.el
  (org-babel-set-interpreters):
  (org-babel-execute-src-block):
  (org-babel-expand-src-block):
  (org-babel-get-src-block-info):
  (org-babel-hash-at-point):
  (org-mode-hook):
  (org-babel-parse-src-block-match):
  (org-babel-where-is-src-block-result):
  (org-babel-read-result):
  (org-babel-insert-result):
  (org-babel-result-end):
  all org-babel elements should now work when indented
2010-06-10 14:36:08 -07:00
Eric Schulte a9c4439d5a babel: removed debug line
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-src-blocks):
  removed debug line
2010-06-10 10:16:45 -07:00
Eric Schulte 8021cf9288 babel: undo two troubling unintended tab insertions in previous commit
* contrib/babel/lisp/org-babel.el (org-babel-execute-src-block):
  undo to troubling unintentional tab insertions from the previous
  commit
2010-06-10 10:04:12 -07:00
Eric Schulte 0e9e01c3fd babel: results now indented to the level of the #+results: line
Thanks to Sébastien Vauban for pointing this out -- as well as the
  previous babel commit :)

* contrib/babel/lisp/org-babel.el (org-babel-insert-result):
  results are now indented to the level of any existing #+results
  line.
2010-06-10 10:02:07 -07:00
Eric Schulte 9a3e9ad865 babel: can now find table and result lines which don't start on column 0
* contrib/babel/lisp/org-babel-ref.el (org-babel-ref-resolve-reference):
  now able to recognize #+tblname, #+resname and #+results lines which
  do not start on column 0
2010-06-10 09:45:06 -07:00
Eric Schulte 799c15ffaf babel: adding simple "echo" function to library-of-babel 2010-06-09 21:03:21 -07:00
Eric Schulte 4fb9fa323e babel: fixed bug dealing with ignoring quoted inline code blocks
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-inline-src-blocks):
  fixed bug dealing with ignoring quoted inline code blocks
2010-06-08 16:27:44 -07:00
Eric Schulte 5068f4a5cf babel: don't evaluate inline code located in verbatim or quoted environments
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-inline-src-blocks):
  only evaluate inline source code blocks if they do not appear in a
  verbatim or quoted context

  (org-babel-in-example-or-verbatim): check if the point is currently
  located in a verbatim or quoted context
2010-06-08 16:19:54 -07:00
Eric Schulte 7361f79d4c babel: no longer automatically inserting '='s around inline code results
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-results):
  removing forced verbatim '=' tags from around inline source code
  results, if users want their results displayed in this way they can
  add the '='s easily themselves, but there is no way to remove '='s
  inserted automatically by Org-babel.
2010-06-08 16:06:32 -07:00
Eric Schulte ae234f787b babel: noweb references are now expanded in the pre-export buffer
this is required because in the temporary org-mode file used during
  export code blocks may be removed entirely leading to unresolved
  references

* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-src-blocks):
  expanding noweb references during export now takes place in the
  pre-export buffer

  (org-babel-exp-inline-src-blocks): expanding noweb references during
  export now takes place in the pre-export buffer

  (org-babel-exp-results): ensure that the expanded body is passed
  through to org-babel-execute-src-block
2010-06-08 14:40:50 -07:00
Eric Schulte efbb07fe12 babel: number checking no longer fooled by strings ending in newlines
* contrib/babel/lisp/org-babel.el (org-babel-number-p): number
  checking is no longer fooled by strings ending in single newlines
2010-06-07 17:59:58 -07:00
Eric Schulte ef931fcd3a babel: resolving references outside of the visible portion of narrowed buffers
Thanks to Tom Dye for pointing out the need for this fix

* contrib/babel/lisp/org-babel.el (org-babel-expand-noweb-references):
  now able to find noweb references even outside of the narrowed
  portion of the buffer when the buffer is narrowed

* contrib/babel/lisp/org-babel-ref.el (org-babel-ref-resolve-reference):
  now able to resolve references which are located outside of the
  narrowed portion of the buffer when the buffer is narrowed
2010-06-07 17:38:35 -07:00
Eric Schulte 93ab492464 babel: updating results in place and adding `prepend' and `append' :results options
Thanks to Graham Smith for pointing out the need for in-place
  results updates

* contrib/babel/lisp/org-babel.el (org-babel-merge-params): adding
  append and prepend as exclusive options to the :results header
  argument

  (org-babel-insert-result): now updating results in place, and
  honoring the `prepend' and `append' :results header arguments
2010-06-07 16:50:59 -07:00
Eric Schulte 8d7ab3a4b7 babel: adding :noeval header argument to inhibit execution of code blocks on export
* contrib/babel/lisp/org-babel.el (org-babel-header-arg-names): adding
  :noeval header argument which can be specified to inhibit the
  execution of a source block during export.

* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-do-export):
  adding :noeval header argument which can be specified to inhibit the
  execution of a source block during export.
2010-06-07 14:08:06 -07:00
Eric Schulte ac2e6fefee babel: more careful not to evaluate code blocks without sessions on export
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-do-export): now
  explicitly checking if session is equal to "none" on export
2010-06-07 13:35:28 -07:00
Eric Schulte aa794b50b9 babel: now removing existing results when exporting "code" or "none"
Thanks to Russell Adams for pointing this out

* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-do-export):
  Removing existing results on export.
2010-06-07 13:20:22 -07:00
Eric Schulte 134de59fd7 babel: cleaning up indentation
* contrib/babel/lisp/org-babel.el (org-babel-expand-src-block-maybe):
  Cleaning up indentation

* contrib/babel/lisp/org-babel.el (org-babel-load-in-session-maybe):
  Cleaning up indentation
2010-06-07 13:14:52 -07:00
Eric Schulte 9c02bf4946 babel: more robust newline regexp in `org-babel-comint-with-output'
* contrib/babel/lisp/org-babel-comint.el (org-babel-comint-with-output):
  Placing a more general regexp substitution for matching newlines
  returned by comint.  This new option should definitely cover all
  cases.
2010-06-07 12:58:38 -07:00
Eric Schulte 8318845f6d babel: stashing away text dangling after the process mark in comint buffers
* contrib/babel/lisp/org-babel-comint.el (org-babel-comint-with-output):
  If there is dangling text left after the process mark in a comint
  buffer, it will now be safely stored away during babel execution,
  and then replaced when babel is finished with the buffer.

  This commit also fixes some indentation issues.
2010-06-07 12:25:58 -07:00
Eric Schulte 909f375ba6 babel: fixing indentation in org-babel-ruby.el
* contrib/babel/lisp/langs/org-babel-ruby.el (org-babel-execute:ruby):
  fixing indentation

* contrib/babel/lisp/langs/org-babel-ruby.el (org-babel-ruby-evaluate):
  fixing indentation
2010-06-07 12:13:37 -07:00
Eric Schulte 6e34e75888 babel: small wait on new ruby sessions to allow process to start
* contrib/babel/lisp/langs/org-babel-ruby.el (org-babel-ruby-initiate-session):
   Adding a small wait after stating a new ruby session.  This avoids
   errors with `ansi-color-process-output' not being able to find the
   process mark.
2010-06-07 12:08:43 -07:00
Eric Schulte dc2baab09c babel: protecting restrictions on `org-babel-execute-subtree' 2010-06-07 11:52:04 -07:00