Commit Graph

900 Commits

Author SHA1 Message Date
Nicolas Goaziou f694c3d996 org-export: Fix some errors and corner cases with macros
* contrib/lisp/org-export.el (org-export-get-inbuffer-options):
  Replace macro with an empty string when no value is provided.
  Ignore macros with an ill-formed key.
2012-01-22 10:37:28 +01:00
Nicolas Goaziou fc93b6f340 org-export: Ask user for a file name when exporting from temporary buffer
* contrib/lisp/org-export.el (org-export-output-file-name): Ask user
  for a file name when exporting from temporary buffer.
2012-01-21 22:58:23 +01:00
Nicolas Goaziou 58b509c091 ASCII back-end for new export engine
* EXPERIMENTAL/org-e-ascii.el: New file.
* contrib/lisp/org-export.el (org-export-dispatch): Reference E-ASCII
  back-end in dispatcher.
2012-01-21 20:40:15 +01:00
Nicolas Goaziou 588a7c261b org-element: Correctly parse inlinetasks before first headline
* contrib/lisp/org-element.el (org-element-section-parser): Correctly
  parse inlinetasks before first headline.
2012-01-21 20:38:22 +01:00
Nicolas Goaziou f86de3d233 org-export: Export standard drawers by default
* contrib/lisp/org-export.el (org-export-with-drawers): Export
  standard drawers by default.
2012-01-21 20:16:33 +01:00
Nicolas Goaziou a5766a98d5 org-export: Fix option item for drawers
* contrib/lisp/org-export.el (org-export-option-alist): Use "d"
  instead of "drawer".
2012-01-21 20:04:51 +01:00
Nicolas Goaziou 76f249b4f3 org-export: Filters can only be list of functions
* contrib/lisp/org-export.el
  (org-export-filter-center-block-functions,
  org-export-filter-drawer-functions,
  org-export-filter-dynamic-block-functions,
  org-export-filter-headline-functions,
  org-export-filter-inlinetask-functions,
  org-export-filter-plain-list-functions,
  org-export-filter-item-functions,
  org-export-filter-comment-functions,
  org-export-filter-comment-block-functions,
  org-export-filter-example-block-functions,
  org-export-filter-export-block-functions,
  org-export-filter-fixed-width-functions,
  org-export-filter-footnote-definition-functions,
  org-export-filter-horizontal-rule-functions,
  org-export-filter-keyword-functions,
  org-export-filter-latex-environment-functions,
  org-export-filter-babel-call-functions,
  org-export-filter-paragraph-functions,
  org-export-filter-property-drawer-functions,
  org-export-filter-quote-block-functions,
  org-export-filter-quote-section-functions,
  org-export-filter-section-functions,
  org-export-filter-special-block-functions,
  org-export-filter-src-block-functions,
  org-export-filter-table-functions,
  org-export-filter-verse-block-functions,
  org-export-filter-emphasis-functions,
  org-export-filter-entity-functions,
  org-export-filter-export-snippet-functions,
  org-export-filter-footnote-reference-functions,
  org-export-filter-inline-babel-call-functions,
  org-export-filter-inline-src-block-functions,
  org-export-filter-latex-fragment-functions,
  org-export-filter-line-break-functions,
  org-export-filter-link-functions, org-export-filter-macro-functions,
  org-export-filter-radio-target-functions,
  org-export-filter-statistics-cookie-functions,
  org-export-filter-subscript-functions,
  org-export-filter-superscript-functions,
  org-export-filter-target-functions,
  org-export-filter-time-stamp-functions,
  org-export-filter-verbatim-functions): Only allow list of functions.
2012-01-21 15:29:25 +01:00
Nicolas Goaziou 5f81b563e0 org-export: Implement access to filters through communication channel
* contrib/lisp/org-export.el (org-export-option-alist): Add filters as
  properties in the communication channel.  This allows back-end
  developers to install their own filters at run time instead of
  making them reside in a global variable.
(org-export-data, org-export-as): Read filters from communication
  channel instead of global variables.
(org-export-filter-apply-functions): Only accept list of functions.
  Also change order of calling: it is now LIFO.
2012-01-21 15:23:49 +01:00
Nicolas Goaziou e760c0c1f2 org-export: Fix code typos 2012-01-20 20:27:04 +01:00
Nicolas Goaziou b6610f8609 org-export: Change signature of collect functions
* contrib/lisp/org-export.el (org-export-collect-elements): Change
  output to list of elements instead of their beginning position.
  Also add an optional predicate argument for fine grain control.
  Remove back-end argument.
(org-export-collect-tables, org-export-collect-listings): Apply
  changes from previous function.
(org-export-collect-figures): Apply changes from previous function.
  Also require a predicate to correctly define the concept of figure.
2012-01-20 20:12:30 +01:00
Nicolas Goaziou 3dc734eaf2 org-export: Correctly handle predicate in `org-export-get-ordinal'
* contrib/lisp/org-export.el (org-export-get-ordinal): Correctly
  handle predicate in `org-export-get-ordinal'. Also allow to count
  more than one element type in the same sequence with optional
  argument TYPES.
2012-01-20 20:12:30 +01:00
Nicolas Goaziou 95744ce7f8 org-element: Fix docstrings 2012-01-19 19:14:41 +01:00
Nicolas Goaziou 3bace4b335 org-element: Use correct regexp to identify comments at column 0
* contrib/lisp/org-element.el (org-element-guess-type,
org-element-current-element): Use correct regexp to identify comments
at column 0.
2012-01-19 19:14:41 +01:00
Nicolas Goaziou c2fd307df3 org-element: Fix `quote-section' detection and parsing
* contrib/lisp/org-element.el (org-element-quote-section-parser):
  Assume point is at quote-section beginning.
(org-element-guess-type): Move point to section beginning before
  calling for quote-section parser.
(org-element-parse-elements, org-element-current-element): Correctly
  detect and parse quote section.
2012-01-19 18:09:10 +01:00
Nicolas Goaziou 6c9c6eff05 org-export: Fix docstrings 2012-01-19 17:14:22 +01:00
Nicolas Goaziou c12246931f org-export: Add a function to resolve id or custom-id links
* contrib/lisp/org-export.el (org-export-resolve-id-link): New function.
2012-01-19 17:07:18 +01:00
Nicolas Goaziou 46ff3b7a56 org-export: Remove :point-max property
* contrib/lisp/org-export.el (org-export-last-sibling-p): Make use
  of :genealogy property instead.
(org-export-get-point-max): Removed function.
(org-export-collect-tree-properties): Remove :point-max property.
2012-01-18 23:45:02 +01:00
Nicolas Goaziou 0bd090379b org-element: Fix block parsing
* contrib/lisp/org-element.el (org-element-parse-elements): Fix
  erroneous block parsing introduced by recent speed improvements.
  Also refactor code a bit.
2012-01-18 22:12:36 +01:00
Nicolas Goaziou 3c4a0795df Fix some docstrings 2012-01-17 21:06:30 +01:00
Nicolas Goaziou ecfb12de19 New interactive export functions for 'e-latex back-end
* EXPERIMENTAL/org-e-latex.el (org-e-latex-export-to-latex,
  org-e-latex-export-to-pdf): New functions.
* contrib/lisp/org-export.el (org-export-dispatch): Make use of new
  functions.
2012-01-17 20:27:38 +01:00
Nicolas Goaziou 418f63c8b1 org-export: Externalize output file name retrieval
* contrib/lisp/org-export.el (org-export-output-file-name): New function.
(org-export-to-file): Remove post-process and pub-dir arguments. Add
a file argument to specify an output file.
2012-01-17 19:14:14 +01:00
Nicolas Goaziou e270792bd8 org-export: Fix regression in headline numbering
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Ensure `:headline-offset' is filled before `:headline-numbering'
  since the latter depends on the former.
(org-export-collect-headline-numbering): Use headline elements as keys
  in the returned alist, instead of just beginning numbers.
(org-export-get-headline-number): Apply key change.
2012-01-16 00:36:26 +01:00
Nicolas Goaziou 5e970e407a org-export: Add a new predicate to test if an headline is low level
* contrib/lisp/org-export.el (org-export-low-level-p): New function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-headline): Make use of new function.
2012-01-15 18:40:40 +01:00
Nicolas Goaziou b03ec00a0e org-export: Change output from org-export-resolve-fuzzy-link
* contrib/lisp/org-export.el (org-export-resolve-fuzzy-link): Now
  return the full object (for a target) or element (for an headline)
  when a match is found.  Also rewrite internals so it doesn't rely
  on :headline-alist.
(org-export-collect-tree-properties): Remove :headline-alist property
  from communication channel, since `org-export-resolve-fuzzy-link'
  doesn't use it anymore. Also store full target objects
  in :target-list property, not only raw names. Fix an argument name
  mismatch, too.

Previous version of org-export-resolve-fuzzy-link returned beginning
position as the identifier for the headline found, which is pretty
weak when files are included in the parsed buffer.
2012-01-14 01:02:07 +01:00
Nicolas Goaziou 117ee610e5 org-element: Fix small bug
* contrib/lisp/org-element.el (org-element-non-recursive-block-alist):
  Fix small bug.
2012-01-13 18:00:27 +01:00
Nicolas Goaziou fb046f5b59 org-element: Speed optimizations
* contrib/lisp/org-element.el (org-element--element-block-re): New
  variable.
(org-element-current-element): New function.
(org-element-parse-elements): Make use of the new specialized function
  instead of `org-element-at-point'.  Also narrow buffer to current
  container (greater element or recursive object) being parsed to
  improve search speed.
(org-element-comment-parser): Speed-up parsing for comments at column 0.
(org-element-guess-type): Make comment regexp less restrictive, due to
  comment optimizations.
2012-01-13 17:56:56 +01:00
Nicolas Goaziou 5b407eaabf org-export: Add another way to handle source code
* contrib/lisp/org-export.el (org-export-handle-code): Allow to delay
  processing of source code by storing line numbers and references in
  text properties attached it.
2012-01-12 20:29:25 +01:00
Nicolas Goaziou 57f51dce5d org-export: Default title doesn't overwrite a blank #+title keyword
* contrib/lisp/org-export.el (org-export-collect-options): Default
  title is retrieved before in-buffer settings are read.  Also, be
  more careful about indirect buffers.
2012-01-12 17:53:47 +01:00
Nicolas Goaziou 64b554cedc org-element: Minor fix
* contrib/lisp/org-element.el (org-element-line-break-interpreter):
  Add forgotten characters from previous commit.
2012-01-12 15:35:28 +01:00
Nicolas Goaziou a566f810e2 org-element: Fix line-break object
* contrib/lisp/org-element.el (org-element-line-break-parser,
org-element-line-break-interpreter): Fix line-break object.
2012-01-12 15:25:12 +01:00
Nicolas Goaziou 886154898c org-export: Prevent footnotes definitons from being enclosed with a section
* contrib/lisp/org-export.el (org-export-initial-options): Prevent
  footnotes definitons from being enclosed with a section.
2012-01-12 12:43:30 +01:00
Nicolas Goaziou a3e4459bee org-export: Properly reset LOC count when encountering a "-n" switch
* contrib/lisp/org-export.el (org-export-get-loc): Properly reset LOC
  count when encountering a "-n" switch
2012-01-11 18:05:51 +01:00
Nicolas Goaziou cd1e356da2 org-element: Rename :options property from example to :switches
* contrib/lisp/org-element.el (org-element-example-block-parser):
  Rename :options property from example to :switches.
2012-01-11 17:30:00 +01:00
Nicolas Goaziou 4725d00f84 org-element: Untabify strings without semantics during parsing
* contrib/lisp/org-element.el (org-element-parse-objects): Untabify
  strings between objects to avoid any `tab-width' mismatch.
* contrib/lisp/org-element.el (org-element-normalize-contents): No
  longer need to handle tabs.
2012-01-11 16:52:08 +01:00
Nicolas Goaziou 3fc0afb5ee org-element: Add missing inline-src-block interpreter
* contrib/lisp/org-element.el
  (org-element-inline-src-block-interpreter): New function.
2012-01-11 16:52:08 +01:00
Nicolas Goaziou 096ffd571c org-element: White space fixing and trivial refactoring 2012-01-11 16:52:08 +01:00
Nicolas Goaziou 6951f9af15 org-export: Remove useless test
* contrib/lisp/org-export.el (org-export-get-previous-element): Remove
  useless test.
2012-01-11 16:52:08 +01:00
Nicolas Goaziou b73a8d6d82 Removal of persistent properties (:total-loc, :code-refs) in export engine
* contrib/lisp/org-element.el (org-element-map): Remove use of
  `org-export-update-info'.
* contrib/lisp/org-export.el (org-export-persistent-properties,
org-export-persistent-properties-list): Remove variables
(org-export-collect-tree-properties): Rename from
  `org-export-initialize-persistent-properties'.
(org-export-data): Get rid of `org-export-update-info' calls.
(org-export-as): Use new `org-export-collect-tree-properties' name.
(org-export-resolve-coderef, org-export-get-loc): New functions.
(org-export-handle-code): Use new functions instead of removed
  properties.  Reformat code.  Change signature.
2012-01-11 16:52:08 +01:00
Nicolas Goaziou acc6fa3a44 org-export: New function to retrieve previous element and object
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-data): Apply changes.
(org-export-get-previous-element): New function.
2012-01-11 16:52:08 +01:00
Nicolas Goaziou bc22518812 org-export: Remove :previous-element :previous-object properties
* contrib/lisp/org-export.el (org-export-set-property):
2012-01-11 16:52:07 +01:00
Nicolas Goaziou aae20190a3 org-element: Remove empty strings between objects in parse tree
* contrib/lisp/org-element.el (org-element-parse-objects): Remove
  empty strings between objects in parse tree.
2012-01-11 16:52:07 +01:00
Nicolas Goaziou 27f3a7cb05 org-element: Fix infloop when an heading is the first line of a buffer
* contrib/lisp/org-element.el (org-element-section-parser): Fix
  infloop when an heading is the first line of a buffer.
2012-01-08 20:38:28 +01:00
Nicolas Goaziou bb39f7ea20 org-element: Small fix
* contrib/lisp/org-element.el (org-element-radio-target-interpreter):
  Correct interpreter for radio targets.
2012-01-08 19:34:15 +01:00
Nicolas Goaziou e09f92bf7e org-element: Correctly get section beginning
* contrib/lisp/org-element.el (org-element-section-parser): Fix
  `:begin' property, which was preventing correct parsing of text
  before first headline.
2012-01-08 19:33:50 +01:00
Nicolas Goaziou 3638097e5a org-element: Fix small bug when parsing visible headlines only
* contrib/lisp/org-element.el (org-element-parse-elements): Fix bug
  when restricting parsing to visible headlines only.
2012-01-08 12:50:29 +01:00
Nicolas Goaziou 25ab746fc9 org-export: Add a filter for new section element
* contrib/lisp/org-export.el (org-export-filter-section-functions):
  New variable.
2012-01-08 12:50:29 +01:00
Nicolas Goaziou daef88b0a8 org-element: Add a new greater element (section)
* contrib/lisp/org-element.el (org-element-section-parser,
  org-element-section-interpreter): New functions
(org-element-greater-elements): Add new element to the list.
(org-element-at-point): Change arguments to handle a new section mode.
(org-element-guess-type): Accept an optional argument to look for
  sections in priority.
(org-element-parse-buffer): Start in section mode by default.  Thus
  any text before the first headline is still in a section of his
  own.
(org-element-parse-elements): Handle new section mode.
2012-01-08 12:50:29 +01:00
Nicolas Goaziou ced1878fe4 org-export: Remove `:footnote-seen-labels' persistent property altogether
* contrib/lisp/org-export.el (org-export-update-info): No longer need
to keep it updated.
(org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p): Get rid of dependency on the
removed property.
2012-01-08 02:06:34 +01:00
Nicolas Goaziou f4d8a55282 org-export: Code typo
* contrib/lisp/org-export.el (org-export-get-parent-headline): Code typo.
2012-01-08 00:22:37 +01:00
Nicolas Goaziou 5ef692030f org-export: Fix small bug
* contrib/lisp/org-export.el (org-export-table-format-info): Fix
  confusion between "\" which means nothing in special columns, and
  "/".
2012-01-07 18:33:06 +01:00
Nicolas Goaziou a9f9db68c1 org-export: Fix information returned from table analysis
* contrib/lisp/org-export.el (org-export-table-format-info): Now
  `:width' is properly retrieved with cookies where alignement is
  missing (i.e. "<6>").  Also `:row-groups' contains groups of
  standard lines only (colgroups and width lines are skipped).
2012-01-07 18:12:07 +01:00
Nicolas Goaziou 50213d28cb org-export: Improve `:genealogy' property in communication channel
* contrib/lisp/org-export.el (org-export-update-info): `:genealogy' is
  now a full flat list of objects and elements containing current
  object or element.  Thus, `:parent-properties' and
  `:inherited-properties' are now obsolete, and removed.
(org-export-data): Apply change to `:genealogy' property.
(org-export-get-parent-headline): New function to fullfil one common
  need.
(org-export-last-sibling-p, org-export-included-file): Make use of the
  new function.
2012-01-07 14:33:48 +01:00
Nicolas Goaziou aeb1ee1c66 contrib/lisp/org-export: Add a dispatcher for new export engine
* contrib/lisp/org-export.el (org-export-initial-scope,
  org-export-show-temporary-export-buffer,
  org-export-dispatch-use-expert-ui): New variables.
(org-export-dispatch, org-export-dispatch-ui): New functions.
2012-01-06 16:04:13 +01:00
Nicolas Goaziou 427327a94e contrib/lisp/org-export: Possibly add transcoded string to kill ring
* contrib/lisp/org-export.el (org-export-copy-to-kill-ring): New
  variable.
(org-export-as): Make use of new variable.
2012-01-05 22:21:57 +01:00
Nicolas Goaziou 9d47c4f23d contrib/lisp/org-export: Customize coding system for export to file
* contrib/lisp/org-export.el (org-export-coding-system): New variable.
(org-export-to-file): Use new variable.
2012-01-05 20:15:05 +01:00
Nicolas Goaziou a496c3af47 contrib/lisp/org-export: Fix subtree export
* contrib/lisp/org-export.el (org-export-get-subtree-options):
  Correctly get `:title: from headline when no "EXPORT_TITLE" property
  is defined.  Also assume point is at subtree beginning.
(org-export-as): Fix subtree parsing.  The subtree starts at point or
  at first heading above.  Contents do not include the first headline.
2012-01-05 20:15:05 +01:00
Nicolas Goaziou 3ada986ba3 contrib/lisp/org-export: Make export to file compatible with org-publish
* contrib/lisp/org-export.el (org-export-to-file): Automatically
  retrieve output file name.  Also add a PUB-DIR optional argument.
2012-01-05 20:15:05 +01:00
Bastien Guerry 346ee30e42 Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
Bastien Guerry 681914f32b Copyright year fixes for contrib/. 2012-01-04 15:48:18 +01:00
Bastien Guerry 575ecebcac More copyright year fixes. 2012-01-04 15:11:23 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Bastien Guerry b73075a8d2 Code cleanup up: rename org-on-*-p to org-at-*-p.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.

Also define two aliases.
2012-01-02 19:52:35 +01:00
Nicolas Goaziou 44bd38556c contrib/lisp/org-element.el: Fix docstrings 2011-12-29 19:41:16 +01:00
Bastien Guerry 371b0cf9aa org-drill.el: fix a few wrong :type spec.
* org-drill.el (org-drill-leech-method, org-drill-scope)
(org-drill-spaced-repetition-algorithm): Fix wrong :type spec.

Thanks to Joost Kremers for spotting this.
2011-12-26 15:40:02 +01:00
Bastien Guerry 80dd8f47f0 org-element.el: Added "This file is not part of GNU Emacs". 2011-12-26 15:34:36 +01:00
Sebastien Vauban 8e1eeaa190 Fix old-way variable assignments. 2011-12-26 14:42:22 +01:00
Nicolas Goaziou 732725a79b contrib/lisp/org-element: Translate "data" affiliated keyword into "name"
* contrib/lisp/org-element.el (org-element-keyword-translation-alist):
  Make "data" an alternate from "name" according to code blocks standardization.
2011-12-26 12:33:58 +01:00
Nicolas Goaziou 5136d2ee41 contrib/lisp/org-export: Add footnote number to footnotes definitions collection
* contrib/lisp/org-export.el
  (org-export-collect-footnote-definitions): Change key to footnote
  number, retrieved with `org-export-get-footnote-number'.  Also, do
  not use beginning position as label for inline footnotes, as those
  are weak identifiers.
2011-12-26 09:59:53 +01:00
Nicolas Goaziou a7afc47572 contrib/lisp/org-export: Extend footnote numbering to definitions
* contrib/lisp/org-export.el (org-export-get-footnote-number): Also
  retrieve ordinal associated to a footnote definition.
2011-12-25 16:46:38 +01:00
Nicolas Goaziou 639810cb54 contrib/lisp/org-element: Add attributes to inlinetask element
* contrib/lisp/org-element.el (org-element-headline-parser): Update
  list of attributes in the docstring.
(org-element-inlinetask-parser): Complete attributes with properties
  inherited from any property drawer within the inlinetask and with
  time properties (i.e. scheduled, clock...).
2011-12-25 10:15:36 +01:00
Nicolas Goaziou 64d9cd2b06 contrib/lisp/org-element.el (org-element-inlinetask-parser): Fix attributes names 2011-12-24 18:00:02 +01:00
Nicolas Goaziou d140374fc9 contrib/lisp/org-export.el (org-export-collect-headline-numbering): Small fix 2011-12-24 14:57:57 +01:00
Nicolas Goaziou b78800f05a contrib/lisp/org-element: Hygienize org-element-map
* contrib/lisp/org-element.el (org-element-map): Change name of local
  variables to prevent variable name collisions with the function
  around org-element-map.
2011-12-24 14:57:57 +01:00
Nicolas Goaziou 27480a2ee7 contrib/lisp/org-export: Improve footnote API
* contrib/lisp/org-export.el (org-export-initial-options): Rename
  `:footnotes-labels-alist' property into `:footnote-definition-alist'
  for consistency.  Add comments to code.
(org-export-persistent-properties-list): Apply previous renaming.
(org-export-update-info): Rename `:seen-footnote-labels' into
  `footnote-seen-labels'.
(org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-definition,
org-export-get-footnote-number): New functions.
2011-12-23 16:24:13 +01:00
Bastien Guerry a0f2396f8f Move org-eshell.el by Konrad Hinsen to Org's core.
* org-eshell.el: New file.
2011-12-21 09:43:48 +01:00
Nicolas Goaziou e6ab3158e1 org-export: Add a function associating an ordinal to an element or object
* contrib/lisp/org-export.el (org-export-get-ordinal): New function.
2011-12-20 20:09:03 +01:00
Nicolas Goaziou 10ea126b36 contrib/lisp/org-export: Add omitted persistent properties
* contrib/lisp/org-export.el (org-export-persistent-properties-list):
  Add omitted persistent properties.

This patch also updates documentation with regards to persistent properties.
2011-12-20 19:58:24 +01:00
Nicolas Goaziou 4aace47474 contrib/lisp/org-export: Normalize collecting functions names
* contrib/lisp/org-export.el (org-export-collect-figures): Renamed
  from `org-export-get-figures'.
2011-12-20 19:18:11 +01:00
Nicolas Goaziou 3210994bc4 contrib/lisp/org-export.el: Simplify headlines collection
* contrib/lisp/org-export.el (org-export-collect-headlines): Simplify
  function, in order to allow greater flexibility to build a proper
  table of contents.
2011-12-20 19:16:19 +01:00
Nicolas Goaziou c3972265bb Modification to the type signature of `org-export-inline-image-p'
EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes.
contrib/lisp/org-export.el (org-export-inline-image-p): Remove
description of the link as a required argument, since this function is
called with link contents anyway.
2011-12-20 18:50:59 +01:00
Nicolas Goaziou 69505ed062 contrib/lisp/org-export: New function to export to a file
* contrib/lisp/org-export.el (org-export-to-buffer): Slight change to
  doc-string.
(org-export-to-file): New function.
2011-12-20 13:49:06 +01:00
Paul M. Rodriguez bf25b68915 Rewrite of contrib/lisp/org-velocity.el.
From the author: "This is a rewrite of Org-Velocity for speed. Delays due
to file size should no longer be perceptible. I have also added in-line
previews of entry contents and dropped support for Org-Remember."
2011-12-11 17:14:09 +01:00
Nicolas Goaziou 4e36b533e0 Code indentation fix (tabify) 2011-12-11 11:20:11 +01:00
Jambunathan K 6aef72be12 Move org-lparse.el and org-odt.el to the main lisp dir 2011-12-10 18:12:53 +01:00
Jambunathan K 9c14e3d95e Move contrib/odt/styles/*.xml to etc/styles 2011-12-10 18:12:48 +01:00
Nicolas Goaziou b377e54c6a contrib/lisp/org-export: Extract more properties from tables
* contrib/lisp/org-export.el (org-export-table-format-info): Extract
column width and and row groups.
2011-12-07 20:49:10 +01:00
Nicolas Goaziou 816f60b0c7 contrib/lisp/org-element: Re-order a function within the file 2011-12-01 15:42:06 +01:00
Nicolas Goaziou b1f2903392 contrib/lisp/org-element: Do not map function to ignored elements or objects
* contrib/lisp/org-element.el (org-element-map): In an export
  situation, only map function on included elements or objects.
2011-12-01 15:04:38 +01:00
Nicolas Goaziou 9ee429ca1d contrib/lisp/org-export: Fix headline numbering
* contrib/lisp/org-export.el (org-export-persistent-properties-list):
  Remove unused persistent properties.
(org-export-initialize-persistent-properties): Delegate headline
  numbering alist to `org-export-collect-headline-numbering'.
(org-export-collect-headline-numbering): New function.
(org-export-update-info): Remove part relative to headline numbering.
(org-export-get-headline-number): Use new `:headline-numbering' to get
  current headline number.

Headline numbering is not done on demand anymore, but built once and
for all at the beginning of the export process, and stored in an
alist, accessible through the `:headline-numbering' property in the
communication channel.
2011-12-01 14:35:43 +01:00
Eric Schulte 6cad241b0e moving ob-picolisp into the core
Thanks to Thorsten Jolitz for contributing support for this new
language.

* Makefile (LISPF): Add ob-picolisp to the Makefile.
* contrib/babel/langs/ob-picolisp.el: Remove from contrib.
* lisp/ob-picolisp.el: Add to core lisp directory.
* lisp/org.el (org-babel-load-languages): Add Pico Lisp to the list of
  supported code block languages.
2011-11-29 09:05:31 -07:00
Nicolas Goaziou 21758c30c9 contrib/lisp/org-export: Fix visibility influence on list parsing
* contrib/lisp/org-export.el (org-export-with-current-buffer-copy):
  Full invisibility prevents `current-column' from returning useful
  values.  Thus, keep visibility related text-properties and set
  `buffer-invisibility-spec' to nil.
2011-11-28 20:14:20 +01:00
Nicolas Goaziou 55e4d0e695 contrib/lisp/org-export: Fix a docstring.
* contrib/lisp/org-export.el (org-export-option-alist): Fix docstring.
2011-11-25 19:33:23 +01:00
Nicolas Goaziou c84192e567 contrib/lisp/org-export.el: Fix misleading comments about transcoders
* contrib/lisp/org-export.el: Fix misleading comments about transcoders.
2011-11-25 19:06:19 +01:00
Nicolas Goaziou 4e2aaadda9 contrib/org-export: Generic Export Engine For Org
* contrib/lisp/org-export.el (org-export-collect-options,
  org-export-parse-option-keyword, org-export-get-subtree-options,
  org-export-get-inbuffer-options, org-export-get-global-options,
  org-export-initial-options, org-export-confirm-letbind,
  org-export-install-letbind-maybe,
  org-export-initialize-persistent-properties,
  org-export-use-select-tags-p, org-export-get-min-level,
  org-export-get-point-max, org-export-update-info,
  org-export-set-property, org-export-data,
  org-export-secondary-string, org-export-skip-p,
  org-export-interpret-p, org-export-filter-apply-functions,
  org-export-as, org-export-to-buffer, org-export-get-relative-level,
  org-export-get-headline-number, org-export-number-to-roman,
  org-export-first-sibling-p, org-export-last-sibling-p,
  org-export-included-file, org-export-get-file-contents,
  org-export-parse-included-file, org-export-solidify-link-text,
  org-export-get-coderef-format, org-export-inline-image-p,
  org-export-resolve-fuzzy-link, org-export-expand-macro,
  org-export-handle-code, org-export-table-format-info,
  org-export-clean-table, org-export-get-headlines,
  org-export-collect-elements, org-export-collect-tables,
  org-export-get-figures, org-export-collect-listings): New functions.
(org-export-max-depth, org-export-option-alist,
  org-export-special-keywords, org-export-persistent-properties-list,
  org-export-persistent-properties, org-export-with-archived-trees,
  org-export-with-author, org-export-with-creator,
  org-export-creator-string, org-export-with-drawers,
  org-export-with-email, org-export-with-emphasize,
  org-export-exclude-tags, org-export-with-fixed-width,
  org-export-with-footnotes, org-export-headline-levels,
  org-export-default-language, org-export-preserve-breaks,
  org-export-with-entities, org-export-with-priority,
  org-export-with-section-numbers, org-export-select-tags,
  org-export-with-special-strings, org-export-with-sub-superscripts,
  org-export-with-toc, org-export-with-tables, org-export-with-tags,
  org-export-with-tasks, org-export-time-stamp-file,
  org-export-with-timestamps, org-export-with-todo-keywords,
  org-export-allow-BIND, org-export-snippet-translation-alist,
  org-export-filter-parse-tree-functions,
  org-export-filter-final-output-functions,
  org-export-filter-plain-text-functions,
  org-export-filter-center-block-functions,
  org-export-filter-drawer-functions,
  org-export-filter-dynamic-block-functions,
  org-export-filter-headline-functions,
  org-export-filter-inlinetask-functions,
  org-export-filter-plain-list-functions,
  org-export-filter-item-functions,
  org-export-filter-comment-functions,
  org-export-filter-comment-block-functions,
  org-export-filter-example-block-functions,
  org-export-filter-export-block-functions,
  org-export-filter-fixed-width-functions,
  org-export-filter-footnote-definition-functions,
  org-export-filter-horizontal-rule-functions,
  org-export-filter-keyword-functions,
  org-export-filter-latex-environment-functions,
  org-export-filter-babel-call-functions,
  org-export-filter-paragraph-functions,
  org-export-filter-property-drawer-functions,
  org-export-filter-quote-block-functions,
  org-export-filter-quote-section-functions,
  org-export-filter-special-block-functions,
  org-export-filter-src-block-functions,
  org-export-filter-table-functions,
  org-export-filter-verse-block-functions,
  org-export-filter-emphasis-functions,
  org-export-filter-entity-functions,
  org-export-filter-export-snippet-functions,
  org-export-filter-footnote-reference-functions,
  org-export-filter-inline-babel-call-functions,
  org-export-filter-inline-src-block-functions,
  org-export-filter-latex-fragment-functions,
  org-export-filter-line-break-functions,
  org-export-filter-link-functions,
  org-export-filter-macro-functions,
  org-export-filter-radio-target-functions,
  org-export-filter-statistics-cookie-functions,
  org-export-filter-subscript-functions,
  org-export-filter-superscript-functions,
  org-export-filter-target-functions,
  org-export-filter-time-stamp-functions,
  org-export-filter-verbatim-functions): New variables.
2011-11-25 16:02:42 +01:00
Jeremy Compostella bafffdc5f6 org-odt.el: Export TOC max-level information.
The TOC max level which could be specified by user is lost during the
export operation. However, this information could be useful in particular
with the ODT exporter. So if another script work on the ODT afterward and
ask to re-compute the TOC, the new TOC will keep this max level.

TINYCHANGE.
2011-11-25 00:27:49 +05:30
Jambunathan K 2ded8ccb85 org-odt.el: Fix performance issue on manifest file writing
* contrib/lisp/org-odt.el (org-odt-write-manifest-file): Don't
use write-region.

The org-odt-write-manifest-file function take too much time -
several seconds for 164 files. This patch provides a cheaper
implementation (hundredths of a seconds for 164 files).

Original patch by Jérémy Compostella
<jeremy.compostella@gmail.com>.  Rewritten by Jambunathan K to
minimize the actual number of lines changed.

TINYCHANGE.

From http://www.mail-archive.com/emacs-orgmode@gnu.org/msg49248.html
I'm currently generating a road book for a trip from different
Org-Mode file and other data. It results in a 13 thousands
lines Org-Mode file and I have some performance issues. Using
the ELP package, I isolated the two main bottlenecks.

One is in org-odt : the org-odt-write-manifest-file function
is called once and takes 5.546672 seconds to write a 167 lines
file. I rewrote this function and now it takes 0.01606 seconds
to write the same file.
2011-11-24 23:46:57 +05:30
Nicolas Goaziou 5a24ffe004 org-element: Fix parsing of src-block switches when there is more than one
* contrib/lisp/org-element.el (org-element-src-block-parser): Previous
  regexp would only get the last switch if more than one were
  provided.
2011-11-24 14:29:53 +01:00
Jambunathan K e10722c9cd org-odt.el: Fix a bug wrt label references
* contrib/lisp/org-odt.el (org-odt-fixup-label-references)
(org-export-odt-preprocess-label-references): Modified.

Workaround for issue reported here:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-11/msg00773.html
2011-11-23 06:01:33 +05:30
Nicolas Goaziou 45587af37b org-element: Parser for Org syntax
* contrib/lisp/org-element.el (org-element-center-block-parser,
  org-element-center-block-interpreter, org-element-drawer-parser,
  org-element-drawer-interpreter, org-element-dynamic-block-parser,
  org-element-dynamic-block-interpreter,
  org-element-footnote-definition-parser,
  org-element-headline-parser, org-element-headline-interpreter,
  org-element-inlinetask-parser, org-element-inlinetask-interpreter,
  org-element-item-parser, org-element-item-interpreter,
  org-element-plain-list-parser, org-element-plain-list-interpreter,
  org-element-quote-block-parser,
  org-element-quote-block-interpreter,
  org-element-special-block-parser,
  org-element-special-block-interpreter,
  org-element-babel-call-parser, org-element-babel-call-interpreter,
  org-element-comment-parser, org-element-comment-interpreter,
  org-element-comment-block-parser,
  org-element-comment-block-interpreter,
  org-element-example-block-parser,
  org-element-example-block-interpreter,
  org-element-export-block-parser,
  org-element-export-block-interpreter,
  org-element-fixed-width-parser,
  org-element-fixed-width-interpreter,
  org-element-horizontal-rule-parser,
  org-element-horizontal-rule-interpreter,
  org-element-keyword-parser, org-element-keyword-interpreter,
  org-element-latex-environment-parser,
  org-element-latex-environment-interpreter,
  org-element-paragraph-parser, org-element-paragraph-interpreter,
  org-element-property-drawer-parser,
  org-element-property-drawer-interpreter,
  org-element-quote-section-parser,
  org-element-quote-section-interpreter,
  org-element-src-block-parser, org-element-src-block-interpreter,
  org-element-table-parser, org-element-table-interpreter,
  org-element-verse-block-parser,
  org-element-verse-block-interpreter, org-element-emphasis-parser,
  org-element-emphasis-interpreter,
  org-element-text-markup-successor, org-element-entity-parser,
  org-element-entity-interpreter,
  org-element-latex-or-entity-successor,
  org-element-export-snippet-parser,
  org-element-export-snippet-interpreter,
  org-element-export-snippet-successor,
  org-element-footnote-reference-parser,
  org-element-footnote-definition-interpreter,
  org-element-footnote-reference-interpreter,
  org-element-footnote-reference-successor,
  org-element-inline-babel-call-parser,
  org-element-inline-babel-call-interpreter,
  org-element-inline-babel-call-successor,
  org-element-inline-src-block-parser,
  org-element-inline-src-block-successor,
  org-element-latex-fragment-parser,
  org-element-latex-fragment-interpreter,
  org-element-line-break-parser, org-element-line-break-interpreter,
  org-element-line-break-successor, org-element-link-parser,
  org-element-link-interpreter, org-element-link-successor,
  org-element-macro-parser, org-element-macro-interpreter,
  org-element-macro-successor, org-element-radio-target-parser,
  org-element-radio-target-interpreter,
  org-element-radio-target-successor,
  org-element-statistics-cookie-parser,
  org-element-statistics-cookie-interpreter,
  org-element-statistics-cookie-successor,
  org-element-subscript-parser, org-element-subscript-interpreter,
  org-element-sub/superscript-successor,
  org-element-superscript-parser,
  org-element-superscript-interpreter, org-element-target-parser,
  org-element-target-interpreter, org-element-target-successor,
  org-element-time-stamp-parser, org-element-time-stamp-interpreter,
  org-element-time-stamp-successor, org-element-verbatim-parser,
  org-element-verbatim-interpreter, org-element-get-property,
  org-element-get-contents, org-element-at-point,
  org-element-guess-type, org-element-collect-affiliated-keywords,
  org-element-parse-buffer, org-element-parse-secondary-string,
  org-element-map, org-element-parse-elements,
  org-element-parse-objects, org-element-get-next-object-candidates,
  org-element-interpret-data, org-element-interpret-secondary,
  org-element-interpret--affiliated-keywords,
  org-element-normalize-string, org-element-normalize-contents,
  org-element-swap-A-B, org-element-backward,
  org-element-drag-backward, org-element-drag-forward,
  org-element-forward, org-element-mark-element,
  org-narrow-to-element, org-transpose-elements,
  org-element-unindent-buffer, org-element-up): New functions.
(org-element-paragraph-separate, org-element-all-elements,
  org-element-greater-elements, org-element-all-successors,
  org-element-object-successor-alist, org-element-recursive-objects,
  org-element-non-recursive-block-alist,
  org-element-affiliated-keywords,
  org-element-keyword-translation-alist,
  org-element-multiple-keywords, org-element-parsed-keywords,
  org-element-dual-keywords, org-element-object-restrictions,
  org-element-string-restrictions, org-element--affiliated-re,
  org-element--element-block-types): New variables.
2011-11-21 08:12:25 +01:00
Jambunathan K e28e1038c4 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
variable.
(org-odt-image-size-from-file): Honor above variable.

Ivars Finvers <ifinvers@shaw.ca> 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.
2011-11-17 23:58:42 +05:30