6 years agonew testing macro for in-file execution with temp text
Eric Schulte [Fri, 18 Nov 2011 18:29:47 +0000 (11:29 -0700)]
new testing macro for in-file execution with temp text

* testing/org-test.el (org-test-with-temp-text-in-file): A new testing
  macros for temp-text tests which require a file name (e.g., for

6 years agoorg-odt.el: Rescale a large images so that it fits in text area
Jambunathan K [Thu, 17 Nov 2011 18:28:27 +0000 (23:58 +0530)]
org-odt.el: Rescale a large images so that it fits in text area

* contrib/lisp/org-odt.el (org-export-odt-max-image-size): New
(org-odt-image-size-from-file): Honor above variable.

Ivars Finvers <> says -
   One minor issue that I came across in using the ODT
exporter relates to the size of embedded images.  I often need
to include plots of simulation results in my documents.  These
plots can be larger than a normal page, which causes problems
in the text flow.  In LaTeX, I've grown used to being able to
automatically rescale a plot to match the maximum text width
of the document.  It would be useful to have such a feature
for the ODT exporter.

6 years agoMerge branch 'master' of
Carsten Dominik [Thu, 17 Nov 2011 17:06:20 +0000 (18:06 +0100)]
Merge branch 'master' of

6 years agoUse prefix arg 0 to inhibit note taking for TODO change
Carsten Dominik [Thu, 17 Nov 2011 07:56:11 +0000 (08:56 +0100)]
Use prefix arg 0 to inhibit note taking for TODO change

* lisp/org.el (org-todo): Interpret 0 prefix arg as note inhibitor.

Sometimes I want to quickly make a few TODOs done in the agenda and I
want to bypass the note taking I have normally set up.  With this
change, I can press `0 t d' in the agenda to do this.

6 years agoDon't match partial names when resolving code or data references
Eric Schulte [Wed, 16 Nov 2011 13:15:31 +0000 (06:15 -0700)]
Don't match partial names when resolving code or data references

* lisp/ob.el (org-babel-named-src-block-regexp-for-name): Ensure that
  partial names are not matched.
  (org-babel-named-data-regexp-for-name): Ensure that partial names
  are not matched.
* testing/lisp/test-ob.el (test-ob/do-not-resolve-to-partial-names-data):
  Test to ensure that partial names are not matched.

6 years agoresolve named code blocks before named data
Eric Schulte [Wed, 16 Nov 2011 03:13:41 +0000 (20:13 -0700)]
resolve named code blocks before named data

* lisp/ob-ref.el (org-babel-ref-resolve): Search for named code blocks
  before named data.
* lisp/ob.el (org-babel-named-data-regexp-for-name): New function for
  finding named data.
* testing/lisp/test-ob.el (test-ob/resolve-code-blocks-before-data-blocks):
  Test to ensure that named references are resolved in the correct

6 years agoGracefully handle results which are neither lists nor strings.
Eric Schulte [Tue, 15 Nov 2011 22:30:35 +0000 (15:30 -0700)]
Gracefully handle results which are neither lists nor strings.

* lisp/ob.el (org-babel-insert-result): Gracefully handle results
  which are neither lists nor strings.

6 years ago* doc/org.texi: Changed DATA to NAME in Working With Source Code section
Thomas Dye [Tue, 15 Nov 2011 17:49:08 +0000 (07:49 -1000)]
* doc/org.texi: Changed DATA to NAME in Working With Source Code section

6 years agoignore org-id file generated during testing
Eric Schulte [Tue, 15 Nov 2011 18:19:39 +0000 (11:19 -0700)]
ignore org-id file generated during testing

6 years agofix bug missing references to example blocks
Eric Schulte [Tue, 15 Nov 2011 18:18:26 +0000 (11:18 -0700)]
fix bug missing references to example blocks

* lisp/ob-ref.el (org-babel-ref-resolve): Don't change location when
  looking at the contents.
* testing/lisp/test-ob.el (test-ob/catches-all-references): Test
  enforcing the correct behavior.

6 years agoCreate visibility overlays properly
Milan Zamazal [Mon, 31 Oct 2011 21:40:28 +0000 (22:40 +0100)]
Create visibility overlays properly

* org.el (org-set-outline-overlay-data): Use outline-flag-region to make a
region invisible.  This ensures all necessary actions, especially adding
isearch-open-invisible property, are applied.

6 years agofix compilation warning
Eric Schulte [Tue, 15 Nov 2011 15:38:41 +0000 (08:38 -0700)]
fix compilation warning

* lisp/ob-lob.el (org-babel-in-example-or-verbatim): Fix compilation

6 years agorevert changes to interactive function `org-test-run-all-tests'
Eric Schulte [Mon, 14 Nov 2011 21:52:22 +0000 (14:52 -0700)]
revert changes to interactive function `org-test-run-all-tests'

6 years agoChanges to fix sandboxed tests to suit the standard code block syntax, and some chang...
Martyn Jago [Mon, 14 Nov 2011 21:14:50 +0000 (21:14 +0000)]
Changes to fix sandboxed tests to suit the standard code block syntax, and some changes to reduce ID testing scope and improve result gathering. * testing/org-test.el: Add org as an executable language for sand-boxed testing to suit the standard code block syntax. Use .org-test-id-locations as ID file temporarily whilst testing. Add `org-test-update-id-locations' to do just that. Clear *Messages* buffer and temporarily set `message-log-max to t to ensure capturing entire test backtrace.

* testing/.gitignore: ignore testing/.org-test-id-locations

6 years agonamed code blocks are replaced with their results
Eric Schulte [Mon, 14 Nov 2011 17:31:58 +0000 (10:31 -0700)]
named code blocks are replaced with their results

* lisp/ob.el (org-babel-find-named-result): Downcase "name" before comparison.
* testing/lisp/test-ob.el (test-ob/does-not-replace-a-block-with-the-results):
  Test that named code blocks are replaced with their results.

6 years agofix typo
Eric Schulte [Mon, 14 Nov 2011 17:24:02 +0000 (10:24 -0700)]
fix typo

* lisp/ob-lisp.el (org-babel-execute:lisp): Fixed typo.
  (org-babel-lisp-vector-to-list): Fixed typo.

6 years ago* doc/org.texi: Minor change to :var table
Tom Dye [Sat, 12 Nov 2011 18:23:39 +0000 (08:23 -1000)]
* doc/org.texi: Minor change to :var table

6 years ago* doc/org.texi: More changes to :var table (some examples were wrong)
Tom Dye [Sat, 12 Nov 2011 18:13:09 +0000 (08:13 -1000)]
* doc/org.texi: More changes to :var table (some examples were wrong)

6 years ago* doc/org.texi: Cleaned up :var table
Tom Dye [Sat, 12 Nov 2011 17:52:32 +0000 (07:52 -1000)]
* doc/org.texi: Cleaned up :var table

6 years agoIndicate tests with missing dependencies by adding a expected failing test
Eric Schulte [Sun, 13 Nov 2011 19:30:25 +0000 (12:30 -0700)]
Indicate tests with missing dependencies by adding a expected failing test

* testing/lisp/test-ob-R.el (featurep): Signal missing dependencies
  with an error rather than a throw.
* testing/org-test.el (missing-test-dependency): Define the error
  signal for missing dependencies.
  (org-test-for-executable): Signal missing dependencies with an error
  rather than a throw.
  (org-test-load): Define an expected failing test for each file with
  missing dependencies.

6 years agoFix don't load symlinks (Emacs interlocking files) * testing/org-test.el: During...
Martyn Jago [Sun, 13 Nov 2011 16:03:51 +0000 (16:03 +0000)]
Fix don't load symlinks (Emacs interlocking files) * testing/org-test.el: During test development various interlocking files may be present in testing/lisp directory (since they are being edited by emacs). Currently org-test-load will attempt to load these

6 years agoAvoid loading (and failing) symbolic links (interlocking files) * testing/org-test...
Martyn Jago [Sun, 13 Nov 2011 14:43:34 +0000 (14:43 +0000)]
Avoid loading (and failing) symbolic links (interlocking files) * testing/org-test.el: During test development various interlocking files may be present in testing/lisp directory (since they are being edited by emacs). Currently org-test-load will attempt to load these and fail.

6 years agotests protecting nested code blocks
Eric Schulte [Fri, 11 Nov 2011 21:24:23 +0000 (14:24 -0700)]
tests protecting nested code blocks

* testing/lisp/test-ob.el (test-org-babel/nested-code-block):
  Evaluation of a nested block.
  (test-org-babel/partial-nested-code-block): Evaluation of a
  partially nested block.

6 years agofixed whitespace errors in org.texi
Eric Schulte [Thu, 10 Nov 2011 17:33:31 +0000 (10:33 -0700)]
fixed whitespace errors in org.texi

6 years agodocumentation now builds successfully
Eric Schulte [Thu, 10 Nov 2011 17:32:32 +0000 (10:32 -0700)]
documentation now builds successfully

6 years agoTom's documentation updates for the new code block syntax
Eric Schulte [Thu, 10 Nov 2011 17:23:10 +0000 (10:23 -0700)]
Tom's documentation updates for the new code block syntax

6 years agopassing all tests after code block syntax changes
Eric Schulte [Thu, 10 Nov 2011 17:12:30 +0000 (10:12 -0700)]
passing all tests after code block syntax changes

* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Some valid
  execution contexts (e.g., call lines) look like commented lines.
* lisp/ob.el (org-babel-get-src-block-info): Empty match string
  doesn't count.
  (org-babel-process-params): Always process parameters, even if you
  don't to table splitting.
* testing/lisp/test-ob-C.el (ob-C/table): Ignore failures for this C
* testing/lisp/test-ob-fortran.el (ob-fortran/input-var): Ignore
  failures for this fortran test.

6 years agoproperty names ending in plus accumulate
Eric Schulte [Mon, 7 Nov 2011 21:49:42 +0000 (14:49 -0700)]
property names ending in plus accumulate

This results in the following behavior.

  #+property: var  foo=1
  #+property: var+ bar=2

  #+begin_src emacs-lisp
    (+ foo bar)

  : 3

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)

  : foo=1 bar=2

  * overwriting a file-wide property
    :var:      foo=7

  #+begin_src emacs-lisp

  : 7

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)

  : foo=7

  * appending to a file-wide property
    :var+:      baz=3

  #+begin_src emacs-lisp
    (+ foo bar baz)

  : 6

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)

  : foo=1 bar=2 baz=3

* lisp/org.el (org-update-property-plist): Updates a given property
  list with a property name and a property value.
  (org-set-regexps-and-options): Use org-update-property-plist.
  (org-entry-get): Use org-update-property-plist.
* testing/examples/ Example file for testing
  appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
  property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
  characters as well as groups of two characters.
  (org-babel-parse-multiple-vars): Split variables on single spaces.

6 years agoStandardized code block keywords
Eric Schulte [Fri, 28 Oct 2011 23:52:48 +0000 (23:52 +0000)]
Standardized code block keywords

Nick Dokos <> writes:

> Eric Schulte <> wrote:
>> The attached updated patch fixes a bug in the original.
> Minor problem in applying:
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----

The attached version fixes these issues, Thanks -- Eric

>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE

Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.

- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
  block may still be labeled with #+results:, and tables named with
  #+tblname: will be considered to be named results

The following function may be used to update an existing Org-mode
buffer to the new syntax.

  (defun update-org-buffer ()
    "Update an Org-mode buffer to the new data, code block and call line syntax."
      (flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
                                  "\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
             (update (re new)
                     (goto-char (point-min))
                     (while (re-search-forward re nil t)
                       (replace-match new nil nil nil 1))))
        (let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
              (lob-re (to-re '("LOB")))
              (case-fold-search t))
          (update old-re "name")
          (update lob-re "call")))))

Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
      is installed on your system many of the important variables will
      be pre-defined with a defvar and *will not* have their values
      automatically updated, these include the following.
      - org-babel-data-names
      - org-babel-result-regexp
      - org-babel-src-block-regexp
      - org-babel-src-name-regexp
      - org-babel-src-name-w-name-regexp
      It may be necessary to either remove the source code of older
      versions of Org-mode, or to explicitly evaluate the ob.el file.

* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
  regular expression.
  (org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
  looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
  (org-babel-get-src-block-info): Updated match strings.
  (org-babel-data-names): Simplified acceptable names.
  (org-babel-find-named-block): Indentation.
  (org-babel-find-named-result): Updated to not return a code block as
  a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
  references to old syntactic elements.
  (org-additional-option-like-keywords): Removing references to old
  syntactic elements.
* contrib/babel/ Updated to make use of the new
* testing/examples/ Updated to make use of the new
* testing/examples/ Updated to make use of the new syntax.
* testing/examples/ Updated to make use of the new
* testing/examples/ Updated to make use of the new
* testing/lisp/test-ob.el: Removed two bad tests which tested the
  literal values of old regular expressions rather than their

6 years agoFix function call order in previous patch
Carsten Dominik [Mon, 14 Nov 2011 07:35:12 +0000 (08:35 +0100)]
Fix function call order in previous patch

* lisp/org-agenda.el (org-agenda-get-todos): Swap calls to `org-trim' and

6 years agoorg-agenda: Do not break TODO list view with empty tasks
Nicolas Goaziou [Sun, 13 Nov 2011 23:36:23 +0000 (00:36 +0100)]
org-agenda: Do not break TODO list view with empty tasks

* lisp/org-agenda.el (org-agenda-get-todos): Prevent an error when
  encountering tasks with only the TODO keyword.

6 years agoorg-xhtml.el: Merge commit 2f50b1
Jambunathan K [Sun, 13 Nov 2011 20:19:15 +0000 (01:49 +0530)]
org-xhtml.el: Merge commit 2f50b1

6 years agoorg-xhtml.el: Bring over few commits (contd.)
Jambunathan K [Sun, 13 Nov 2011 19:29:17 +0000 (00:59 +0530)]
org-xhtml.el: Bring over few commits (contd.)

Bring over following commits:

6 years agoorg-lparse.el & co: Bring over few commits (contd.)
Jambunathan K [Sun, 13 Nov 2011 08:46:42 +0000 (14:16 +0530)]
org-lparse.el & co: Bring over few commits (contd.)

Bring over following commits:

6 years agoAllow cdlatex expansions at a list item or an headline
Nicolas Goaziou [Sat, 12 Nov 2011 14:04:19 +0000 (15:04 +0100)]
Allow cdlatex expansions at a list item or an headline

* lisp/org.el (org-try-cdlatex-tab): Don't try to expand a LaTeX
environment when at an item or an headline, but allow LaTeX
(org-cycle): Try to call `cdlatex-tab' before cycling item's or
headline's visibility, in order to catch LaTeX fragments within.

This patch is based on the report and work of Maik Beckmann.

6 years agoorg-lparse.el & co: Bring over few commits
Jambunathan K [Sun, 13 Nov 2011 06:15:24 +0000 (11:45 +0530)]
org-lparse.el & co: Bring over few commits

Bring over following commits:

6 years agoorg-lparse.el: Fix issues with formatting of custom links
Jambunathan K [Sat, 12 Nov 2011 21:03:35 +0000 (02:33 +0530)]
org-lparse.el: Fix issues with formatting of custom links

* contrib/lisp/org-lparse.el (org-lparse-format-org-link): Fix
issues with formatting of custom links - pass the right
backend to the custom formatter.

Fix for bug reported by Christian Moe here:

TODO: Modify `org-bbdb-export' to support odt backend.  Review contrib
modules for odt compatibility.

6 years agoorg-xhtml.el: Minor fix
Jambunathan K [Sat, 12 Nov 2011 20:54:44 +0000 (02:24 +0530)]
org-xhtml.el: Minor fix

* contrib/lisp/org-xhtml.el (org-xhtml-begin-environment)
(org-xhtml-end-environment): Fix param list.

Continue commit 2e0e462d1460f4a4e55e180a4f090c5db7ca63af.

Support for annotation blocks for xhtml backend still needs to
be ported.  See org-exp-blocks.el for more information.

6 years agoRequire a newline and spaces before a code block.
Eric Schulte [Fri, 11 Nov 2011 21:17:19 +0000 (14:17 -0700)]
Require a newline and spaces before a code block.

* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Require a
  newline and spaces before a code block.

6 years agoexecute call lines when executing an entire buffer
Eric Schulte [Wed, 9 Nov 2011 21:35:04 +0000 (14:35 -0700)]
execute call lines when executing an entire buffer

* lisp/ob-lob.el (org-babel-map-call-lines): Allow mapping of code
  over all call lines in a buffer.
* lisp/ob.el (org-babel-execute-buffer): Execute call lines when
  executing an entire buffer.

6 years agodon't disassemble tables twice on export
Eric Schulte [Wed, 9 Nov 2011 21:11:24 +0000 (14:11 -0700)]
don't disassemble tables twice on export

* lisp/ob.el (org-babel-process-params): Don't disassemble tables

6 years agoorg.texi: Clarify documentation regarding TODO state change logging.
Jason Dunsmore [Wed, 9 Nov 2011 20:06:09 +0000 (14:06 -0600)]
org.texi: Clarify documentation regarding TODO state change logging.

6 years agoMerge branch 'timestamps-without-dayname'
Carsten Dominik [Wed, 9 Nov 2011 18:18:02 +0000 (19:18 +0100)]
Merge branch 'timestamps-without-dayname'

6 years agoAllow time stampes without day name
Carsten Dominik [Thu, 13 Oct 2011 09:42:45 +0000 (11:42 +0200)]
Allow time stampes without day name

* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Make space after date optional.
* lisp/org.el (org-set-regexps-and-options):
(org-ctrl-c-ctrl-c): Make `C-c C-c' on date fix the time stamp

* doc/org.texi (Creating timestamps): Document the effect of `C-c C-c'
on a timestamp.

6 years agocall lines are more careful about being in example or verbatim blocks
Eric Schulte [Wed, 9 Nov 2011 02:42:59 +0000 (19:42 -0700)]
call lines are more careful about being in example or verbatim blocks

* lisp/ob-lob.el (org-babel-lob-execute-maybe): Don't execute a call
  inside a verbatim block.
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Check for example

6 years agofix whitespace errors
Eric Schulte [Tue, 8 Nov 2011 20:52:11 +0000 (13:52 -0700)]
fix whitespace errors

6 years agoconstruct a table from the output of maxima code block
Litvinov Sergey [Sun, 2 Oct 2011 01:37:14 +0000 (01:37 +0000)]
construct a table from the output of maxima code block

Please consider a patch to construct a table from the output of maxima
code block.

>From a0305117f4e793c93d7d10bc7aab04f96bd62e9c Mon Sep 17 00:00:00 2001
From: Litvinov Sergey <>
Date: Sat, 1 Oct 2011 22:29:18 +0200
Subject: [PATCH] [ob-maxima] Construct a table from the output of the code block. Add
 ert tests.

6 years agofix whitespace errors
Eric Schulte [Tue, 8 Nov 2011 20:44:23 +0000 (13:44 -0700)]
fix whitespace errors

6 years agocpp->c++-mode, ob-C mode tests
Litvinov Sergey [Thu, 4 Aug 2011 01:08:56 +0000 (01:08 +0000)]
cpp->c++-mode, ob-C mode tests

The first patch maps cpp language code to c++-mode. The second patch
adds tests for ob-C.

>From fba6eef6944766e675e4abe1d11d347b9a728031 Mon Sep 17 00:00:00 2001
From: Sergey Litvinov <>
Date: Wed, 3 Aug 2011 22:03:19 +0200
Subject: [PATCH 2/2] Add tests for ob-C.el

6 years agoExtend ob-maxima: add input variables and graphic output
Litvinov Sergey [Tue, 8 Nov 2011 20:36:25 +0000 (13:36 -0700)]
Extend ob-maxima: add input variables and graphic output

* lisp/ob-maxima.el (org-babel-tangle-lang-exts): Maxima extension.
  (org-babel-maxima-expand): Add input variables and graphic output.
  (org-babel-execute:maxima): Add input variables and graphic output.
  (org-babel-maxima-var-to-maxima): Add input variables and graphic
  (org-babel-maxima-graphical-output-file): Add input variables and
  graphic output.
  (org-babel-maxima-elisp-to-maxima): Add input variables and graphic
* testing/examples/ Examples for new Maxima

6 years agobring ob-fortran into the core -- FSF assignment completion
Eric Schulte [Tue, 8 Nov 2011 21:18:57 +0000 (14:18 -0700)]
bring ob-fortran into the core -- FSF assignment completion

  Thanks to Sergey Litvinov for contributing this language support!

* lisp/ob-fortran.el: Adding support for Fortran code blocks.
* Makefile (LISPF): Compile Fortran support.
* lisp/org.el (org-babel-load-languages): Adding fortran to this list.

6 years agoAdd support for embedding an equation via a link to its *.odf file
Jambunathan K [Mon, 7 Nov 2011 23:37:00 +0000 (05:07 +0530)]
Add support for embedding an equation via a link to its *.odf file

* contrib/lisp/org-odt.el (org-odt-is-formula-link-p):
Recognize *.mml and *.mathml as mathml files.  Recognize *.odf
files as OpenDocument formula file.
(org-odt-copy-formula-file): Use `org-odt-zip-extract-one' to
handle ODF formula files.
(org-export-odt-format-formula): If a ODF formula link has no
caption or label, embed it inline.  Otherwise embed it as

6 years agoorg-exp.el (org-export-push-to-kill-ring): Minor fix to docstring
Jambunathan K [Mon, 7 Nov 2011 21:43:06 +0000 (03:13 +0530)]
org-exp.el (org-export-push-to-kill-ring): Minor fix to docstring

6 years agoAdd command to export LaTeX fragments to OpenDocument formula file
Jambunathan K [Mon, 7 Nov 2011 21:33:03 +0000 (03:03 +0530)]
Add command to export LaTeX fragments to OpenDocument formula file

* contrib/lisp/org-lparse.el (org-lparse-and-open): Add a new
param `file-or-buf' to accommodate
* contrib/lisp/org-odt.el (org-export-as-odf)
(org-export-as-odf-and-open): New interactive commands.
(org-export-odt-convert): Add autoload cookie.

6 years agoorg-odt.el: Preparing for introducing `org-export-as-odf'
Jambunathan K [Mon, 7 Nov 2011 19:15:59 +0000 (00:45 +0530)]
org-odt.el: Preparing for introducing `org-export-as-odf'

* contrib/lisp/org-odt.el (org-odt-update-styles-file)
(org-odt-write-mimetype-file): New.  Extracted out of
(org-odt-save-as-outfile): Use above routines.
(org-odt-init-outfile): Misc changes.

Preparing for introducing `org-export-as-odf'.  The new
command will create OpenDocument Formula files out of LaTeX
fragments.  Dynamic variable `org-lparse-backend' will be set
to 'odf during this command.

6 years agoAnnotate Dvipng images/Math formula and strengthen error handling
Jambunathan K [Sun, 6 Nov 2011 18:51:58 +0000 (00:21 +0530)]
Annotate Dvipng images/Math formula and strengthen error handling

* contrib/lisp/org-odt.el (org-odt-encode-plain-text): New.
(org-odt-format-source-code-or-example-plain): Use it.
(org-odt-format-object-description): New.  Format svg:title
and svg:desc elements out of plain text.
(org-export-odt-format-formula, org-export-odt-format-image):
Check whether the incoming formula or image is generated out
of a latex fragment.  If yes, pass the latex fragment for
downstream processing.
(org-odt-format-frame): Check if the object that is enclosed
in the frame has metadata associated with it.  If yes, dump it
as part of svg:title and svg:desc elements.
(org-odt-protect-latex-fragment): New after advice for
`org-format-latex-as-mathml'.  Fixes the following bug

6 years agoorg-footnote: Remove opportunity to have inline footnotes at beginning of line
Nicolas Goaziou [Sun, 6 Nov 2011 13:14:12 +0000 (14:14 +0100)]
org-footnote: Remove opportunity to have inline footnotes at beginning of line

* lisp/org-footnote.el (org-footnote-new): Cannot insert an inline
footnote at beginning of line anymore.
(org-footnote-at-reference-p): Don't recognize inline footnotes at
beginning of line.

It is technically possible to allow inline footnotes at beginning of
line, their syntax being different enough from standard references.
Though, after normalizing them, they will become standard footnotes
still at beginning of line, which will break them.

6 years agoCorrectly fontify headlines with special keywords
Nicolas Goaziou [Thu, 3 Nov 2011 20:23:59 +0000 (21:23 +0100)]
Correctly fontify headlines with special keywords

* lisp/org.el (org-set-font-lock-defaults): Fix small error in
  matching group that prevented fontification of keywords like
  org-comment-string and stars in headlines.

6 years agoMerge branch 'master' of
Carsten Dominik [Thu, 3 Nov 2011 07:57:36 +0000 (08:57 +0100)]
Merge branch 'master' of

6 years agoMake it possible to check before invisible edits
Carsten Dominik [Thu, 3 Nov 2011 07:57:26 +0000 (08:57 +0100)]
Make it possible to check before invisible edits

* lisp/org.el (org-catch-invisible-edits): New option.
(org-delete-char): Call `org-check-before-invisible-edit'.
(org-check-before-invisible-edit): New function.

6 years agoorg-odt.el: Minor modifications to reflect change in package layout
Jambunathan K [Mon, 31 Oct 2011 19:19:06 +0000 (00:49 +0530)]
org-odt.el: Minor modifications to reflect change in package layout

* contrib/lisp/org-odt.el (org-odt-data-dir): Modified to
reflect change in ELPA package layout.

6 years agoorg-odt.el: Protect label references against downstream expansion
Jambunathan K [Wed, 2 Nov 2011 18:02:49 +0000 (23:32 +0530)]
org-odt.el: Protect label references against downstream expansion

* contrib/lisp/org-odt.el
(org-export-odt-preprocess-label-references): Mark label as
protected text and protect it from being expanded downstream.

Fixes bug reported by Myles English here:

6 years agoRespect export options for subtree export title
Suvayu Ali [Tue, 1 Nov 2011 23:26:07 +0000 (00:26 +0100)]
Respect export options for subtree export title

* org-exp.el (org-solidify-link-text): Respect org-export-with-tags
  when forming the export title during subtree export.


6 years agoGlobalize some variables to make them available in buffers not in Org mode
Nicolas Goaziou [Tue, 1 Nov 2011 10:40:11 +0000 (11:40 +0100)]
Globalize some variables to make them available in buffers not in Org mode

* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format,
  org-heading-keyword-maybe-regexp-format): Globalize variables so
  they are accessible even in buffers not in Org mode.

6 years agoDon't use default-description if link description function is defined
David Maus [Tue, 1 Nov 2011 05:24:42 +0000 (06:24 +0100)]
Don't use default-description if link description function is defined

* org.el (org-insert-link): Don't use default-description if a
`org-make-link-description-function' is defined.

6 years agoAllow multi-line properties to be specified in property blocks
Eric Schulte [Sun, 30 Oct 2011 16:04:17 +0000 (10:04 -0600)]
Allow multi-line properties to be specified in property blocks

    var foo=1,
  #+begin_src emacs-lisp
    (+ foo bar baz qux)

  : 10

* lisp/org.el (org-set-regexps-and-options): Use property blocks for
  multi-line properties.

6 years agoorg-odt.el: Fix a regression in export of src blocks
Jambunathan K [Mon, 31 Oct 2011 08:38:03 +0000 (14:08 +0530)]
org-odt.el: Fix a regression in export of src blocks

* contrib/lisp/org-odt.el
(org-odt-format-source-line-with-line-number-and-label): When
numbering was turned off, src blocks were getting stripped
from export.  Fixed this regression.

6 years agoorg-odt.el: Put label generation and reference under user control
Jambunathan K [Sun, 30 Oct 2011 22:00:52 +0000 (03:30 +0530)]
org-odt.el: Put label generation and reference under user control

* contrib/lisp/org-odt.el (org-odt-begin-table)
(org-export-odt-format-formula, org-export-odt-format-image)
(org-odt-entity-frame-styles, org-odt-format-entity): Use
"__Table__", "__Figure__", "__MathFormula__",
"__DvipngImage__" as internal category handles.
(org-odt-label-styles, org-odt-category-map-alist): New
(org-odt-entity-labels-alist): Add label style as an
additional entry.  Update docstring.
(org-odt-get-label-category-and-style): New defun.
(org-odt-format-entity-caption, org-odt-init-outfile):
(org-odt-label-def-ref-spec): Removed.  Superceded by
(org-odt-get-label-definition): Removed

Give user more control over how labels are generated and
referenced.  This is accomplished by mapping each label to a
category-handle which in turn is used to locate the category,
counter and style to be associated with label.

6 years agoreplace missing copyright year
Eric Schulte [Sun, 30 Oct 2011 16:09:11 +0000 (10:09 -0600)]
replace missing copyright year

6 years agoAdding :colnames and :noquote parameters
Jonathan Bisson [Sun, 30 Oct 2011 13:25:49 +0000 (14:25 +0100)]
Adding :colnames and :noquote parameters

6 years agoorg.el: Don't throw an error when editing takes place at the first point of the buffer.
Bastien Guerry [Sun, 30 Oct 2011 08:58:37 +0000 (09:58 +0100)]
org.el: Don't throw an error when editing takes place at the first point of the buffer.

* org.el (org-self-insert-command): Don't throw an error when
editing takes place at the first point of the buffer.

Thanks to Carsten Dominik for pointing this error.

6 years agoorg.el: Unfold invisible region at point or right before point when editing.
Bastien Guerry [Sat, 29 Oct 2011 14:08:27 +0000 (16:08 +0200)]
org.el: Unfold invisible region at point or right before point when editing.

* org.el (org-self-insert-command): Unfold invisible region at
point or right before point when editing.

Thanks to Suvayu Ali for discussing this.

6 years agoorg-faces.el (org-agenda-filter-tags): Use the 'modeline face as default.
Bastien Guerry [Sat, 29 Oct 2011 23:36:59 +0000 (01:36 +0200)]
org-faces.el (org-agenda-filter-tags): Use the 'modeline face as default.

* org-faces.el (org-agenda-filter-tags): Use the 'modeline face as

6 years agoMerge branch 'master' of
Bastien Guerry [Sat, 29 Oct 2011 13:01:10 +0000 (15:01 +0200)]
Merge branch 'master' of

6 years agoorg-html.el (org-html-expand): Return nil if STRING is nil.
Bastien Guerry [Sat, 29 Oct 2011 13:00:52 +0000 (15:00 +0200)]
org-html.el (org-html-expand): Return nil if STRING is nil.

* org-html.el (org-html-expand): Prevent a nil value for
STRING to return an error, just return nil.

6 years agoorg-latex.el: Allow "/" character in the #+LaTeX_CLASS option.
Bastien Guerry [Sat, 29 Oct 2011 12:43:52 +0000 (14:43 +0200)]
org-latex.el: Allow "/" character in the #+LaTeX_CLASS option.

* org-latex.el (org-export-latex-set-initial-vars): Allow "/"
character in the #+LaTeX_CLASS option.

Thanks to Richard Lewis for a request about this.

6 years agoorg-footnote: Don't store text-properties of footnote definitions
Nicolas Goaziou [Sat, 29 Oct 2011 12:21:56 +0000 (14:21 +0200)]
org-footnote: Don't store text-properties of footnote definitions

* lisp/org-footnote.el (org-footnote-at-reference-p,
  org-footnote-at-definition-p): Don't store text-properties of footnote definitions.

6 years agoorg-html.el: Bugfix: Convert special characters in some meta tag.
Bastien Guerry [Sat, 29 Oct 2011 12:17:56 +0000 (14:17 +0200)]
org-html.el: Bugfix: Convert special characters in some meta tag.

* org-html.el (org-export-as-html): Convert special characters
in meta tag "author", "date", "keyword" and "description".

Thanks to Pavel Panchekha for raising this issue.

6 years agoorg-capture.el: improve docstring for `org-capture-before-finalize-hook'.
Bastien Guerry [Sat, 29 Oct 2011 12:07:18 +0000 (14:07 +0200)]
org-capture.el: improve docstring for `org-capture-before-finalize-hook'.

* org-capture.el (org-capture-before-finalize-hook): Docstring
improvement: mention that the buffer is widened when this hook
is run.

Thanks to Paul for a suggestion about this.

6 years agoDon't output DIV preamble tags when contents is empty.
Sebastien Vauban [Thu, 29 Sep 2011 19:49:11 +0000 (21:49 +0200)]
Don't output DIV preamble tags when contents is empty.

* org-html.el (org-export-as-html): Make sure the div for
preamble is not inserted when the preamble is empty.

6 years agoSmall improvements over the previous commit.
Bastien Guerry [Sat, 29 Oct 2011 11:23:20 +0000 (13:23 +0200)]
Small improvements over the previous commit.

Use org-propertize instead of propertize and
use a better default for tags in the mode-line
when filtering.

6 years agoAdd custom face for highlighting tags used in agenda filtering.
Sebastien Vauban [Thu, 27 Oct 2011 21:08:04 +0000 (23:08 +0200)]
Add custom face for highlighting tags used in agenda filtering.

* org-agenda.el (org-agenda-set-mode-name): Highlight tags
used for filtering (shown in the mode-line).

* org-faces.el: Add face `org-agenda-filter-tags'.

6 years agoorg.texi: Add @cindex for "appointment".
Bastien Guerry [Sat, 29 Oct 2011 10:53:52 +0000 (12:53 +0200)]
org.texi: Add @cindex for "appointment".

* org.texi (Timestamps, Weekly/daily agenda)
(Weekly/daily agenda): Add @cindex for "appointment".

6 years agoorg-odt.el: Add support for annotation blocks
Jambunathan K [Fri, 28 Oct 2011 22:12:30 +0000 (03:42 +0530)]
org-odt.el: Add support for annotation blocks

* contrib/lisp/org-lparse.el (org-lparse-special-blocks): New
variable.  Add "annotation" blocks in addition to the already
existing "list-table" blocks.
(org-lparse-get-block-params): New helper routine to read
params passed to a special block.  Used in conjunction with
OpenDocument annotations and with parsing of "#+ATTR_ODT:..."
lines attached to images.
(org-lparse-par-open-stashed): New let-bound variable.
(org-do-lparse): Bind `org-lparse-par-open-stashed'.  Treat
all blocks listed in `org-lparse-special-blocks' as special
environments.  Honor options passed as part of
(org-lparse-preprocess-after-blockquote-hook): Handle all
blocks listed in `org-lparse-special-blocks' specially.
(org-lparse-strip-experimental-blocks-maybe-hook): New hook
that hooks up to `org-export-preprocess-hook'.  Removes blocks
listed under `org-lparse-special-blocks' while exporting to
formats other than "odt" or "xhtml".
(org-lparse-begin-environment, org-lparse-end-environment):
Modified signature to accomodate block params.
(org-lparse-stash-pop-paragraph-state): New helper routines
for use with emitting of OpenDocument annotations.
(org-lparse-list-table-enable): Removed.  "list tables" are
now always enabled.

* contrib/lisp/org-odt.el (org-odt-begin-annotation)
(org-odt-end-annotation): New routines.
(org-odt-begin-environment, org-odt-end-environment): Handle
block params.  Handle the new "annotation" block.
(org-odt-format-author, org-odt-iso-date-from-org-timestamp):
New helper routnes for emitting author and comment timestamps
with annotation blocks.
(org-odt-update-meta-file): Use above routines.
(org-export-odt-format-image): Use
`org-lparse-get-block-params' to parse inline image attributes.
(org-odt-format-date): Removed.  Superceded by


6 years agobetter handling of multiple-variable :var code block header arguments
Eric Schulte [Fri, 28 Oct 2011 19:57:47 +0000 (13:57 -0600)]
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.

6 years agoAdd a way to search for a link search without impacting buffer visibility
Nicolas Goaziou [Wed, 26 Oct 2011 17:53:06 +0000 (19:53 +0200)]
Add a way to search for a link search without impacting buffer visibility

* lisp/org.el (org-link-search): Add an optional argument preventing
  function from revealing context around match.

6 years agoFix compiler warnings.
Bastien Guerry [Fri, 28 Oct 2011 15:26:22 +0000 (17:26 +0200)]
Fix compiler warnings.

6 years ago* org-agenda.el (calendar-check-holidays): Declare function.
Bastien Guerry [Fri, 28 Oct 2011 14:53:36 +0000 (16:53 +0200)]
* org-agenda.el (calendar-check-holidays): Declare function.

Thanks to Achim Gratz for spotting this.

6 years agoorg.el: Fix bug when matching the face property before following a link.
Bastien Guerry [Fri, 28 Oct 2011 14:42:20 +0000 (16:42 +0200)]
org.el: Fix bug when matching the face property before following a link.

* org.el (org-return): Fix bug when matching the face property
before following a link.

Thanks to Paul Sexton for the analysis and the fix.

6 years agoMerge branch 'master' of
Bastien Guerry [Fri, 28 Oct 2011 13:17:06 +0000 (15:17 +0200)]
Merge branch 'master' of

6 years agoFix holidays symbol in org-class
Matt Lundin [Fri, 28 Oct 2011 17:57:42 +0000 (17:57 +0000)]
Fix holidays symbol in org-class

* lisp/org-agenda.el: (org-class): Fix holidays symbol in org-class.
  This was resulting in an "Bad sexp..." warning.

6 years agoSave complex heading regexp for column view
Carsten Dominik [Fri, 28 Oct 2011 12:47:32 +0000 (14:47 +0200)]
Save complex heading regexp for column view

* lisp/org.el (org-scan-tags): Also remember `org-complex-heading-regexp'
in a property.

6 years agoMerge branch 'master' of
Bastien Guerry [Fri, 28 Oct 2011 09:18:21 +0000 (11:18 +0200)]
Merge branch 'master' of

6 years agoTurn off auto insert and TeX master query for export
Carsten Dominik [Fri, 28 Oct 2011 08:03:33 +0000 (10:03 +0200)]
Turn off auto insert and TeX master query for export

* lisp/org-latex.el (org-export-as-latex): Turn off auto-insert and
set TeX-master to t when creating new TeX buffers.
* lisp/org-docbook.el (org-export-as-docbook):
* lisp/org-html.el (org-export-as-html): Turn off auto-insert
when creating new buffers.

6 years agoMerge branch 'master' of
Bastien Guerry [Thu, 27 Oct 2011 16:23:08 +0000 (18:23 +0200)]
Merge branch 'master' of

6 years agoMerge branch 'master' of
Carsten Dominik [Thu, 27 Oct 2011 16:13:33 +0000 (18:13 +0200)]
Merge branch 'master' of

6 years agoFix remote references that contain pointers to first/last rows/columns
Carsten Dominik [Thu, 27 Oct 2011 15:30:47 +0000 (17:30 +0200)]
Fix remote references that contain pointers to first/last rows/columns

* lisp/org-table.el (org-table-formula-handle-first/last-rc): Do not
expand pointers to first/last row/column that are inside a call
to `remote'.
(org-table-get-remote-range): Expand pointers to first/last

Wu Feng writes:

> Hello,
> First, please check below simple example, I defined two tables (T1 and
> T2). In table-2, I remotely refer to the @>$1 (last row, column 1) and
> $LR2 (last row, column 2) of T1.
> | 11 | 12 |
> | 21 | 22 |
> | 31 | 32 |
> | xxx | xxx | xxx | xxx |
> | #   |  21 |  32 |     |
> #+TBLFM: @>$3=remote(T1,$LR2)::@>$2=remote(T1,@>$1)
> Obviously, the expected results are:
> - remote(T1,@>$1) is replaced by 31
> - remote(T1,$LR2) is replaced by 32
> But I got 21 for remote(T1,@>$1). The $LR version works perfectly
> (though the manual says $LR is out-dated)
> Below are debug info when evaluating remote(T1,@>$1). Looks like @> in
> the remote reference is mapped to the last row of the current table, not
> of the remote table.
> Substitution history of formula
> Orig:   remote(T1,@2$1)
> $xyz->  remote(T1,@2$1)
> @r$c->  (21)
> $1->    (21)
> Result: 21
> Format: NONE
> Final:  21
> Emacs  : GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.6)
> of 2011-09-13 on shirley
> Package: Org-mode version 7.7

6 years agoMerge branch 'master' of
Bastien Guerry [Wed, 26 Oct 2011 21:04:19 +0000 (23:04 +0200)]
Merge branch 'master' of

6 years agoadding ob-picolisp by Thorsten Jolitz to contrib/babel/langs
Eric Schulte [Wed, 26 Oct 2011 19:02:11 +0000 (13:02 -0600)]
adding ob-picolisp by Thorsten Jolitz to contrib/babel/langs

6 years agoorg-capture and XEmacs, indenting too far
Michael Sperber [Sat, 22 Oct 2011 19:46:07 +0000 (19:46 +0000)]
org-capture and XEmacs, indenting too far

Robert Pluim <> writes:

> Hi, I'm using XEmacs 21.5  (beta29) "garbanzo" d27c1ee1943b+ [Lucid]
> (i686-pc-cygwin, Mule) of Mon Oct 18 2010 on RPluim, with the following
> org-capture-templates
> (("t" "Todo" entry (file+headline "~/org/" "Tasks") "* TODO %?"))
> The problem is that for some reason the resulting TODO heading is has 2
> extra spaces, and is placed at too deep a level, giving:
> * Tasks
> ***   TODO a task
> I've tested this on a fairly recent emacs24 build, and everything works
> fine there, so this is probably something XEmacs specific.  Can anyone
> suggest any way to track this down (I'd bisect, but I've yet to find a
> 'good' version)?

I finally got around to looking into this: The reason is that, in
org-capture mode, `outline-level' is bound to outline.el's function,
which is off by one compared to org-mode's.  I used this patch to fix

Could somebody review and maybe apply this?