Commit Graph

1413 Commits

Author SHA1 Message Date
Nicolas Goaziou 7e466ea883 org-export: Small clean-up 2012-08-24 10:44:05 +02:00
Nicolas Goaziou 095f9322e5 org-export: Make sure back-end specific filters do not make any back-end check
* contrib/lisp/org-e-ascii.el (org-e-ascii-filter-headline-blank-lines):
  Remove backend check.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-filter-section-blank-lines):
  Remove backend check.
* contrib/lisp/org-export.el (org-export-define-backend): Update
  docstring accordingly.
2012-08-24 10:41:41 +02:00
Nicolas Goaziou cced6735a7 org-export: Run export hook with current back-end as argument
* contrib/lisp/org-export.el (org-export-as): Run export hook with
  current back-end as argument.
* testing/lisp/test-org-export.el: Update test.
2012-08-24 10:10:44 +02:00
Nicolas Goaziou cc839259a4 org-export: Nil value from a filter means filter will be skipped
* contrib/lisp/org-export.el (org-export-filter-apply-functions): Nil
  value from a filter means filter will be skipped. To ignore the
  current element or object, the filter has to return the empty string
  instead.

This change is done to ease filter writing. When writing
a backend-specific filter (and I guess most are), there's no more need
for the somewhat contrived:

  (if (not (eq backend 'e-latex)) data
    ... filter's job...)

A more straightforward:

  (when (eq backend 'e-latex)
    ... filter's job...)

is now enough.

On the other hand, it is not possible anymore to specify 'ignore as
a filter to ignore every element or object of a given type. To
achieve that goal, one can now write, for example:

  (add-to-list 'org-export-filter-example-block-functions
                 (lambda (value backend info)
                   (when (eq backend 'e-html) "")))

It will ignore every example block in the `e-html' export back-end.
2012-08-24 09:56:48 +02:00
Nicolas Goaziou 3f40057adc org-export: Limit depth of headline collection to headline level
* contrib/lisp/org-export.el (org-export-collect-headlines): By
  default, limit depth of headline collection to last headline level.
* contrib/lisp/org-e-html.el (org-e-html-toc): Small refactoring.
2012-08-24 09:36:18 +02:00
Nicolas Goaziou 5b19471358 org-e-html: Fix TOC generation with a non numeric value
* contrib/lisp/org-e-html.el (org-e-html-toc): Accept non numeric
  values for depth.
(org-e-html-template): Call previous function even when depth isn't
a number.
(org-e-html-keyword): Call previous function even when depth isn't
a number.  Also react on #+HTML keywords, not #+LATEX.
2012-08-23 21:32:12 +02:00
Jonathan Leech-Pepin d4d29efb53 contrib/lisp/org-e-texinfo: Ensure valid export of escaped characters
and remove invalid characters from menu items

* contrib/lisp/org-e-texinfo.el (org-e-texinfo--sanitize-menu): Remove
  invalid characters from menu entries and nodes.
(org-e-texinfo--sanitize-contents): Ensure @ { and } are properly
escaped in text and headlines.
(org-e-texinfo--generate-menu-items): Strip invalid characters from
menu titles.
(org-e-texinfo-fixed-width): Escape @ { and } in fixed-width
environments.
(org-e-texinfo-headline): Ensure nodes do not have invalid characters
and escape @ { and } in section titles.
(org-e-texinfo-plain-text): Use proper escape character for @ { and }.
2012-08-23 10:51:47 -04:00
Jonathan Leech-Pepin 8441782b11 contrib/lisp/org-e-texinfo: Remove markup from headlines when
exporting to ensure info can process them properly

* contrib/lisp/org-e-texinfo.el (org-e-texinfo--generate-menu-items):
  Use org-e-texinfo--sanitize-headline to ensure markup is stripped
  before being used for sectioning and menu information.  Nodes and
  menus can fail because of formatting and section titles do not show
  any formatting when viewed in an info-viewer.
(org-e-texinfo--sanitize-headline): Wrapper function for
org-e-texinfo--sanitize-healine-contents
(org-e-texinfo--sanitize-headline-contents): Strips markup from
headlines.  It treats content recursively to ensure nested formatting
is removed as well.
2012-08-23 09:20:02 -04:00
Jonathan Leech-Pepin 44d68803d3 contrib/lisp/org-e-texinfo: Improve error reporting after makeinfo
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-collect-errors): Fixed
  error checking to actually return an error message.
2012-08-23 08:40:47 -04:00
Nicolas Goaziou f9e5600f82 org-export: Fix reference to a free variable in macros
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Fix reference to a free variable
  in macro.
2012-08-23 11:03:09 +02:00
Jonathan Leech-Pepin 9e0f48db2f contrib/lisp/org-e-texinfo.el: Fix export bugs
* contrib/lisp/org-e-texinfo.el (org-e-texinfo--generate-detailed): Do
  not run if there are no headlines in the file.
(org-e-texinfo-template): Generate menu and detailed menu in initial
let form.  Only insert them if non-empty.
(org-e-texinfo-headline): Ensure that %'s are properly escaped in
@node's to prevent parse errors.
(org-e-texinfo-make-menu): Do not insert "detailed" if menu is empty,
return empty entry instead.

Thanks to Bastien for reporting the failures with headline-less files
and simple "%" in the headline.
2012-08-22 13:51:46 -04:00
Nicolas Goaziou 436c2a0794 org-e-beamer: Do not normalize empty arguments
* contrib/lisp/org-e-beamer.el (org-e-beamer--normalize-argument): Do
  not normalize empty arguments.
2012-08-22 17:45:18 +02:00
Nicolas Goaziou cd9ce4b914 org-e-latex: Fix bug when exporting empty items
* contrib/lisp/org-e-latex.el (org-e-latex-item): Fix bug when
  exporting empty items.
2012-08-22 16:55:18 +02:00
Nicolas Goaziou d1f36ea313 org-e-beamer: Fix bug with default value for outline frame options
* contrib/lisp/org-e-beamer.el (org-e-beamer-outline-frame-options):
  Value must be a string, so make default value an empty string
  instead of nil.
2012-08-22 16:32:16 +02:00
Nicolas Goaziou a273a37ce0 org-e-latex: Fix typo in a docstring
* contrib/lisp/org-e-latex.el (org-e-latex--delayed-footnotes-definitions):
  Fix typo in a docstring.
2012-08-22 09:34:24 +02:00
Nicolas Goaziou 043f2fcbbc org-e-latex: Display nicer horizontal rules
* contrib/lisp/org-e-latex.el (org-e-latex-horizontal-rule): Display
  nicer horizontal rules. Support :width and :thickness attributes.
2012-08-21 18:55:17 +02:00
Bastien Guerry 478a8393f2 contrib/: Update the README 2012-08-21 12:34:53 +02:00
Bastien Guerry 7d5c05463f contrib/: Delete useless files
Delete these files:
contrib/lisp/test-org-export-preproc.el
contrib/scripts/staticmathjax/README.txt
2012-08-21 12:34:37 +02:00
Bastien Guerry 502e538020 contrib/lisp/: Replace the deleted function `org-make-link' by `concat'
* org-notmuch.el (org-notmuch-store-link)
(org-notmuch-search-store-link): Use `concat' instead of
`org-make-link'.

* org-git-link.el (org-git-create-git-link)
(org-git-insert-link-interactively): Ditto.

* org-bookmark.el (org-bookmark-store-link): Ditto.

Thanks to Friedrich Delgado for reporting this.
2012-08-20 14:03:15 +02:00
Nicolas Goaziou fc6b9f1d88 org-export: Fix code comments 2012-08-20 10:25:05 +02:00
Luis Anaya 5da2745fb8 Merge branch 'master' of orgmode.org:org-mode 2012-08-19 13:14:05 -04:00
Nicolas Goaziou c81bcccbf3 org-md: Fix export of paragraph starting with an hash sign
* contrib/lisp/org-md.el (org-md-paragraph): Fix export of paragraph
  starting with an hash sign.
2012-08-19 15:59:24 +02:00
Jambunathan K 3a8969edbc org-e-html-table: Emit `caption' elements only when required 2012-08-18 21:03:49 +05:30
Nicolas Goaziou 952d722dcd org-export: Allow to toggle inlinetasks inclusion in export output
* contrib/lisp/org-export.el (org-export-options-alist,
  org-export--skip-p): Allow to toggle inlinetask inclusion in export.
(org-export-headline-levels, org-export-with-priority): Fix docstring.
(org-export-with-inlinetasks): New variable.
* testing/lisp/test-org-export.el: Add tests.
2012-08-16 12:46:49 +02:00
Bastien Guerry a4bef9a73d contrib: Do not tell files are part of Emacs if they are not (yet) 2012-08-16 00:01:59 +02:00
Bastien Guerry 3d2b7841e6 org-e-texinfo.el: Clean up code. 2012-08-16 00:00:51 +02:00
Luis Anaya 08c6b3d2e3 Merge branch 'master' of orgmode.org:org-mode 2012-08-15 16:06:47 -04:00
Jonathan Leech-Pepin eff62b3843 org-e-texinfo: Provide the ability to export to .texinfo from Org-Mode
* contrib/lisp/org-e-texinfo.el: Provide the ability to generate .texinfo and .info files from an Org-Mode file.

Export can be called using either (org-e-texinfo-export-to-texinfo) to generate a .texinfo file, or (org-e-texinfo-export-to-info) to additionally compile the .texinfo file into a .info file.
2012-08-15 16:00:20 -04:00
Nicolas Goaziou a88ab9cdbc org-e-beamer: Prevent fragile frames from eating first word
* contrib/lisp/org-e-beamer.el (org-e-beamer--format-frame): In
  a fragile frame, append a white space to contents in order to
  prevent Beamer from eating first word when appending "\par".
2012-08-12 18:24:34 +02:00
Nicolas Goaziou a270c7dd90 org-e-publish: Fix code typo
* contrib/lisp/org-e-publish.el (org-e-publish-cache-ctime-of-src):
  Fix code typo.
2012-08-12 00:50:26 +02:00
Nicolas Goaziou 8ff6054c85 org-e-publish: Mirror changes applied to org-publish.el
* contrib/lisp/org-e-publish.el (org-e-publish-needed-p,
  org-e-publish-update-timestamp, org-e-publish-file,
  org-e-publish-cache-file-needs-publishing,
  org-publish-cache-ctime-of-src): Mirror changes applied to org-publish.el.
2012-08-11 22:18:00 +02:00
Nicolas Goaziou f86ec13ce9 org-e-publish: Mirror changes made to org-publish.el
* contrib/lisp/org-e-publish.el (org-e-publish-initialize-cache): Fix
  small error.
(org-publish-cache-ctime-of-src): Simplify function.
2012-08-10 18:20:48 +02:00
Luis Anaya 36bb59fdc5 Enhanced the org-e-groff.el code to use the Groff MM letter macros
* org-e-groff.el (org-e-groff-classes): Added
letter classes.
(org-e-groff-special-tags): New variable to identify special tags.
(org-e-groff--get-tagged-content): New function to retrieve
special tagged content.
(org-e-groff--mt-head): New function to create "memo" type headers.
(org-e-groff--letter-head): New function to create "letter" type headers.
(org-e-groff-template): Handle the "letter" type.
(org-e-groff-headline): handle special tags.
2012-08-10 10:14:00 -04:00
Achim Gratz a089a3bccc add autload cookie for org-export-dispatch
* contrib/lisp/org-export.el: Add autload cookie for org-export-dispatch.
2012-08-09 18:25:45 +02:00
Bastien Guerry c81bb45d23 org-e-groff.el (org-e-groff-table--align-string): Small code cleanup.
* org-e-groff.el (org-e-groff-table--align-string): Small code
cleanup.
2012-08-08 18:48:14 +02:00
Luis Anaya a3778633c5 Removed not needed variables in org-e-groff.el and org-e-man.el
* org-e-groff.el (org-e-groff-item): Removed the `counter' variable from let assignment list.
	(org-e-groff-table--align-string): Removed the `attr' and `align' variables from the list assignment list.

	* org-e-man.el (org-e-man-item): Removed the `counter' variable from the let assignment list.
	(org-e-man-src-block): Removed non needed formatting string that was causing formatting errors for source blocks.
	(org-e-man-table--align-string): Removed `attr' and `align' variables from the let assignment list.
2012-08-08 12:31:05 -04:00
Bastien Guerry 481c89f388 org-e-groff.el: Massive code clean-up. 2012-08-08 14:11:09 +02:00
Luis Anaya 6aacc8bf7c Code Cleanup
* org-e-man.el (org-e-man-pdf-process)
	(org-e-man--caption/label-string, org-e-man-template)
	(org-e-man--caption/label-string)
	(org-e-man-source-highlight-langs, org-e-man-bold)
	(org-e-man-center-block, org-e-man-clock, org-e-man-code)
	(org-e-man-example-block, org-e-man-headline)
	(org-e-man-inline-src-block, org-e-man-item, org-e-man-keyword)
	(org-e-man-link, org-e-man-paragraph, org-e-man-radio-target)
	(org-e-man-macro, org-e-man-src-block, org-e-man-table)
	(org-e-man-table--align-string, org-e-man-table--org-table)
	(org-e-man-collect-errors): Code clean-up.

	* org-e-groff.el (org-e-groff-classes, org-e-groff-special-char)
	(org-e-groff-pdf-process, org-e-groff-registered-references)
	(org-e-groff--caption/label-string, org-e-groff--text-markup)
	(org-e-groff-template, org-e-groff-footnote-reference)
	(org-e-groff-headline, org-e-groff-inline-src-block)
	(org-e-groff-item, org-e-groff-link--inline-image)
	(org-e-groff-link, org-e-groff-paragraph)
	(org-e-groff-plain-list, org-e-groff-plain-text)
	(org-e-groff-src-block, org-e-groff-table)
	(org-e-groff-table--align-string, )
	(org-e-groff-table--org-table, org-e-groff-table-cell)
	(org-e-groff-table-row, org-e-groff-export-to-groff)
	(org-e-groff-collect-errors): Code cleanup.
2012-08-08 06:04:56 -04:00
Nicolas Goaziou d02eedc987 org-e-latex: Correctly export statistics cookies with percents
* contrib/lisp/org-e-latex.el (org-e-latex-statistics-cookie): Protect
  percents in statistics cookies.
2012-08-07 09:24:44 +02:00
Luis Anaya d69de79e4a Performed changes to meet the new org-export.el API.
* contrib/lisp/org-e-man.el (org-e-man-headline): Fixed call to org-export-first-sibling-p and org-export-last-sibling-p
	(org-e-man-table-cell): Fixed call to org-export-get-next-element
2012-08-03 07:47:50 -04:00
Luis Anaya 61c9996cf0 Perform changes in org-e-groff-headline and org-e-groff-table-cell calls to
meet changed org-export.el API calls.

	* contrib/lisp/org-e-groff.el (org-e-groff-headline): Fixed call to org-export-last-sibling-p

	* contrib/lisp/org-e-groff.el (org-e-groff-headline): Fixed call to org-export-first-sibling-p

	* contrib/lisp/org-e-groff.el (org-e-groff-table-cell): Fixed call to org-export-get-next-element.
2012-08-03 07:42:38 -04:00
Nicolas Goaziou 43606a916a org-e-ascii: Remove spurious blank lines ascii art tables
* contrib/lisp/org-e-ascii.el (org-e-ascii-table): Remove spurious
  blank lines ascii art tables.
2012-08-03 09:57:15 +02:00
Luis Anaya 0601d117bb Fixed missing \\ needed for padding of checklists. 2012-08-02 21:53:20 -04:00
Luis Anaya 91fb3ae412 New features added to the Groff export. Includes:
- Ability to handle long tables.
- Ability to automatically generate reference lists
- Ability to perform special processing in paragraph
- Ability to disable captions.
- Ability to process special characters.
- Improved table handling.
2012-08-02 20:21:13 -04:00
Nicolas Goaziou db004a0ad6 org-e-ascii: Allow to use ascii-art for table.el tables
* contrib/lisp/org-e-ascii.el (org-e-ascii-table-use-ascii-art): New
  variable.
(org-e-ascii-table): Allow to use ascii-art for table.el tables.
2012-07-31 16:32:06 +02:00
Luis Anaya c9d0a486cc Org-Export exporters for Groff and Man Pages. Uses the new
org-export.el for operation.
2012-07-28 16:20:41 -04:00
Achim Gratz c2735e7c19 Re-apply (correctly): Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 07:06:25 +02:00
Achim Gratz 234df465ad Revert "Move org-element.el from contrib/lisp to lisp/."
This reverts commit abbea59611.
2012-07-28 07:02:21 +02:00
Bastien Guerry 88fd65f251 Merge branch 'master' of orgmode.org:org-mode 2012-07-28 00:57:14 +02:00
Bastien Guerry abbea59611 Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 00:55:45 +02:00
Nicolas Goaziou 144f2a3f9e org-md: Fix docstring
* contrib/lisp/org-md.el (org-md-headline-style): Fix docstring.
2012-07-28 00:49:58 +02:00
Nicolas Goaziou 5dac2ca753 org-e-ascii: Fix error when formatting an headline with a priority
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title): Fix error
  when formatting an headline with a priority.
2012-07-28 00:44:07 +02:00
Nicolas Goaziou edaa0c4ee7 org-md: Fix error when formatting an headline with a priority
* contrib/lisp/org-md.el (org-md-headline): Fix error when formatting
  an headline with a priority.
2012-07-27 23:05:34 +02:00
Nicolas Goaziou 029e499939 org-md: Fix spurious white space in Setext style
* contrib/lisp/org-md.el (org-md-headline): Fix spurious white space
  in Setext style.
2012-07-27 22:58:49 +02:00
Nicolas Goaziou 7b6e6e9ff5 org-md: Allow atx and Setext style for headlines
* contrib/lisp/org-md.el (org-export-md): New customize group.
(org-md-headline-style): New variable.
(org-md-headline): Allow atx and Setext style.  Also provide fall-back
for low level headlines.
2012-07-27 22:53:38 +02:00
Nicolas Goaziou 5057ae0fc2 org-export: Require info argument in some topology functions
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-last-sibling-p, org-export-get-previous-element,
  org-export-get-next-element): Add INFO argument.  This is necessary
  to ignore non-exportable elements or objects.
(org-export--skip-p): Apply signature change.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-e-odt.el (org-e-odt-footnote-reference): Apply
  signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference,
  org-e-latex-headline, org-e-latex-table-cell): Apply signature
  change.
* contrib/lisp/org-e-html.el (org-e-html-footnote-reference,
  org-e-html-headline): Apply signature change.
* contrib/lisp/org-e-beamer.el (org-e-beamer-export-snippet,
  org-e-beamer--format-block): Apply signature change.
2012-07-27 16:16:04 +02:00
Nicolas Goaziou f3e264af56 org-md: Add missing chuck from previous patch (536c55b)
* contrib/lisp/org-md.el (org-md-section): # protection shouldn't
  happen at the section level, when there is no difference between raw
  # from export blocks and # in plain text.
2012-07-27 14:43:12 +02:00
Nicolas Goaziou 536c55b644 org-md: Be more subtle when protecting #
* contrib/lisp/org-md.el (org-md-paragraph, org-md-plain-text): Make
  sure raw # (inserted with, for example, an export snippet) don't get
  escaped.  A few false positives don't hurt.
2012-07-27 14:05:44 +02:00
Nicolas Goaziou c8acf8d695 org-export and back-ends: Fix some docstrings 2012-07-26 15:33:27 +02:00
Nicolas Goaziou 065401cfdb org-md: Export back-end for Markdown format
* contrib/lisp/org-md.el: New file.
2012-07-26 12:41:26 +02:00
Nicolas Goaziou b6b40424d2 org-e-ascii: Center shortened horizontal rules
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Center
  shortened horizontal rules.
2012-07-25 12:55:00 +02:00
Nicolas Goaziou 8d98835a3c org-export: Export properties from subtrees are case insensitive
* contrib/lisp/org-export.el (org-export--get-subtree-options): Export
  properties from subtrees are case insensitive.
2012-07-25 10:13:09 +02:00
Bastien Guerry f06a4db2be org-export-generic.el: Add require 'cl for defmacro*. 2012-07-25 08:32:54 +02:00
Nicolas Goaziou 2b6ba84ad6 org-export: Memoize results from `org-export-data'
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Initialize hash table for memoization.
(org-export-data): Memoize results.
2012-07-24 22:52:29 +02:00
Nicolas Goaziou dbea7e658f org-export: Rename some internal functions
* contrib/lisp/org-export.el (org-export-get-environment,
  org-export-collect-tree-properties, org-export-data,
  org-export-expand-include-keyword): Use new names.
(org-export--parse-option-keyword): Renamed from
`org-export-parse-option-keyword'.
(org-export--get-subtree-options): Renamed from
`org-export-get-subtree-options'.
(org-export--get-inbuffer-options): Renamed from
`org-export-get-inbuffer-options'.
(org-export--get-buffer-attributes): Renamed from
`org-export-get-buffer-attributes'.
(org-export--get-global-options): Renamed from
`org-export-get-global-options'.
(org-export--allow-BIND-local): Renamed from
`org-export-allow-BIND-local'.
(org-export--confirm-letbind): Renamed from
`org-export-confirm-letbind'.
(org-export--install-letbind-maybe): Renamed from
`org-export-install-letbind-maybe'.
(org-export--get-min-level): Renamed from `org-export-get-min-level'.
(org-export--collect-headline-numbering): Renamed from
`org-export-collect-headline-numbering'.
(org-export--populate-ignore-list): Renamed from
`org-export-populate-ignore-list'.
(org-export--interpret-p): Renamed from `org-export--interpret-p'.
(org-export--prepare-file-contents): Renamed from
`org-export-prepare-file-contents'.
* contrib/lisp/org-e-publish.el (org-e-publish-find-date): Use new
  names.
* testing/lisp/test-org-export.el: Update tests.
2012-07-24 22:52:29 +02:00
Jambunathan K e0f59dfb05 (org-e-html-footnote-separator): Remove duplicate `
Also re-arrange defcustoms in alphabetical order.
2012-07-25 00:24:07 +05:30
Nicolas Goaziou b0f2e083b7 org-export: Update docstrings 2012-07-23 19:32:57 +02:00
Nicolas Goaziou 2b21bb4e52 export back-ends: Remove unused translators functions 2012-07-23 17:53:55 +02:00
Nicolas Goaziou a13a51e812 org-export: Add :export-block keyword to `org-export-define-derived-backend'
* contrib/lisp/org-export.el (org-export-define-derived-backend):
  Add :export-block keyword.  Also fix a generated doc-string.
* contrib/lisp/org-e-beamer.el: Use new keyword.
2012-07-23 14:19:51 +02:00
Nicolas Goaziou 6ea9d8c827 org-export: `org-export-define-backend': the standard way to create a back-end
* contrib/lisp/org-export.el (org-export-define-backend): New macro.
* contrib/lisp/org-e-ascii.el: Use new macro.
* contrib/lisp/org-e-html.el: Use new macro.
* contrib/lisp/org-e-latex.el: Use new macro.
* contrib/lisp/org-e-odt.el: Use new macro.
* contrib/lisp/org-element.el (org-element-block-name-alist): Remove
  hard-coded export block names from variable, since they are added
  automatically by `org-export-define-backend'.
* testing/lisp/test-org-element.el: Update test.
2012-07-23 14:12:14 +02:00
Nicolas Goaziou 9a2e479b32 org-e-beamer: Fix docstring typo 2012-07-23 09:51:55 +02:00
Nicolas Goaziou 611075db0b org-e-html: Remove an useless argument
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): Remove
  PUB-DIR, which doesn't make sense in that function.
* contrib/lisp/org-export.el: Apply change in function declaration.
2012-07-23 09:51:45 +02:00
Nicolas Goaziou 3a633732b7 org-e-ascii: Fix typo
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Fix typo.
2012-07-23 09:43:29 +02:00
Nicolas Goaziou c92913b5f9 org-e-latex: Allow multiple objects and spaces in sub/superscript
* contrib/lisp/org-e-latex.el (org-e-latex-subscript,
  org-e-latex-superscript): Allow multiple objects and spaces in
  sub/superscript.
2012-07-22 13:55:10 +02:00
Nicolas Goaziou 1b64d9582e org-export: Add optional argument to `org-export-read-attribute'
* contrib/lisp/org-export.el (org-export-read-attribute): Add optional
  argument to `org-export-read-attribute'.
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Use
  additional argument.
2012-07-21 15:12:08 +02:00
Nicolas Goaziou 86ff4cde98 org-export: Silence byte-compiler 2012-07-20 19:37:22 +02:00
Nicolas Goaziou eed478ffaa org-e-beamer: Small docstring changes
* contrib/lisp/org-e-beamer.el (org-e-beamer-export-as-latex,
  org-e-beamer-export-to-pdf): Small docstring changes.
2012-07-20 13:48:19 +02:00
Nicolas Goaziou 8478fac4a5 Add autoload and a commands to export to temporary buffer in export back-ends
* contrib/lisp/org-e-ascii.el (org-e-ascii-export-as-ascii): New
  function.
(org-e-ascii-export-to-ascii): Now autoloaded.
* contrib/lisp/org-e-latex.el (org-e-latex-export-as-latex): New
  function.
(org-e-latex-export-to-pdf): Now autoloaded.
(org-e-latex--collect-errors): Renamed from
`org-e-latex-collect-errors'.
(org-e-latex-compile): Apply renaming.
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): New
  function.
(org-e-html-export-to-html): Fix docstring.
* contrib/lisp/org-export.el (org-export-dispatch): Use new functions.
2012-07-20 13:48:05 +02:00
Jambunathan K 99ef5728a2 org-e-odt.el: Fix more compilation errors 2012-07-19 23:15:44 +05:30
Jambunathan K dc92a8dbff org-e-odt.el: Fix all compilation errors
Rearrange and rename for greater consistency and clarity.  More cleanups
will follow.
2012-07-19 22:15:30 +05:30
Nicolas Goaziou 070e03011d org-element: Rename a few internal functions
* contrib/lisp/org-element.el (org-element--parse-elements): Renamed
  from `org-element-parse-elements'.
(org-element--parse-objects): Renamed from `org-element-parse-objects'.
(org-element--get-next-object-candidates): Renamed from
`org-element-get-next-object-candidates'.
(org-element--interpret-affiliated-keywords): Renamed from
`org-element-interpret--affiliated-keywords'.
(org-element--current-element): Renamed from
`org-element-current-element'.
(org-element--collect-affiliated-keywords): Renamed from
`org-element-collect-affiliated-keywords'.
(org-element-center-block-parser, org-element-drawer-parser,
org-element-dynamic-block-parser,
org-element-footnote-definition-parser, org-element-inlinetask-parser,
org-element-plain-list-parser, org-element-quote-block-parser,
org-element-special-block-parser, org-element-comment-parser,
org-element-comment-block-parser, org-element-example-block-parser,
org-element-export-block-parser, org-element-fixed-width-parser,
org-element-horizontal-rule-parser,
org-element-latex-environment-parser, org-element-paragraph-parser,
org-element-src-block-parser, org-element-table-parser,
org-element-verse-block-parser, org-element-fill-paragraph,
org-element-context, org-element-at-point, org-element-interpret-data,
org-element-parse-secondary-string, org-element-parse-buffer): Apply
name change.
* contrib/lisp/org-export.el (org-export-get-buffer-attributes): Apply
  name change.
* testing/lisp/test-org-element.el: Update tests accordingly.
* testing/lisp/test-org-export.el: Update tests accordingly.
2012-07-19 11:23:43 +02:00
Nicolas Goaziou ea7b5a327f org-e-ascii: Fix link description in empty section
* contrib/lisp/org-e-ascii.el (org-e-ascii-headline): Fix link
  description in empty section.
2012-07-18 19:24:11 +02:00
Nicolas Goaziou 17b865ddd0 org-element: Fix first section parsing
* contrib/lisp/org-element.el (org-element-current-element): Use a new
  special mode symbol to treat section before first headline
  differently.  In this case, its boundaries must be computed since it
  has not been limited by headline container.
(org-element-parse-elements): Use new special mode symbol.
2012-07-18 19:17:12 +02:00
Nicolas Goaziou 8bf8cf8223 org-element: Allow links and export snippets in descriptions lists items tag
* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
  links and export snippets in descriptions lists items tag.
2012-07-18 18:23:26 +02:00
Nicolas Goaziou d80661e764 org-e-latex: Don't use mathrm in sub/superscripts with a single LaTeX command or entity
* contrib/lisp/org-e-latex.el (org-e-latex-subscript,
  org-e-latex-superscript): Don't use mathrm in sub/superscripts with
  a single LaTeX command or entity.
2012-07-18 17:02:08 +02:00
Nicolas Goaziou 3e76a25f7c org-element: Fix inlinetask parsing
* contrib/lisp/org-element.el (org-element-inlinetask-parser): Fix
  inlinetask parsing.
2012-07-18 11:24:40 +02:00
Nicolas Goaziou 66767db56c org-export: Replace member with memq when possible
* contrib/lisp/org-element.el (org-element-set-element): Replace
  member with memq.
* contrib/lisp/org-export.el (org-export-get-min-level,
  org-export--skip-p, org-export-data, org-export-table-cell-width,
  org-export-table-cell-alignment): Replace member with memq.
2012-07-17 20:49:31 +02:00
Nicolas Goaziou 8a9429f9c3 org-element: Fix timestamp interpreter
* contrib/lisp/org-element.el (org-element-timestamp-interpreter): Fix
  timestamp interpreter.
2012-07-17 20:47:01 +02:00
Nicolas Goaziou 528b17ea15 org-export: Adapt back-ends to timestamp object change
* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-odt.el (org-e-odt-timestamp): Use :range-end
  property when applicable.
2012-07-17 17:03:29 +02:00
Nicolas Goaziou a1634b4489 org-element: Store parsed timestamps without the bracket markers
* contrib/lisp/org-element.el (org-element-planning-parser): Store
  parsed timestamps without the bracket markers.
(org-element-timestamp-interpreter): Store parsed timestamps without
  the bracket markers.  Also provide a new property: `:range-end'.
(org-element-planning-interpreter, org-element-timestamp-interpreter):
Apply changes to parsers.
* testing/lisp/test-org-element.el: Add test.
2012-07-17 16:51:19 +02:00
Nicolas Goaziou e4a300d90d org-element: Fix error when parsing a line-break
* contrib/lisp/org-element.el (org-element-line-break-parser)
(org-element-line-break-interpreter): Line-break object ends where the
line ends.  It doesn't contain the next newline character.
(org-element-parse-objects): Refactoring.
2012-07-17 11:53:41 +02:00
Nicolas Goaziou 69af0913b2 org-element: Normalize contents of elements in place
* contrib/lisp/org-element.el (org-element-normalize-contents):
  Normalize contents of elements in place.  This is required to be
  sure that a normalized element still is `eq' to its equivalent in
  the parse tree.
2012-07-17 00:46:08 +02:00
Nicolas Goaziou 4cf88ac31d org-e-ascii: Fix export of tables with a special column or a top-left corner
* contrib/lisp/org-e-ascii.el (org-e-ascii--table-cell-width,
  org-e-ascii-table-row): Fix export of tables with a special column
  or a top-left angle.
2012-07-16 22:53:53 +02:00
Nicolas Goaziou 5dbd1386f3 org-e-ascii: Comment fix 2012-07-16 18:17:56 +02:00
Nicolas Goaziou 95cd07d058 org-export: Use `eq' instead of `equal' when possible
* contrib/lisp/org-export.el (org-export-data,
  org-export-footnote-first-reference-p,
  org-export-get-footnote-number, org-export-get-ordinal,
  org-export-get-loc, org-export-table-row-group,
  org-export-table-cell-starts-colgroup-p,
  org-export-table-cell-ends-colgroup-p,
  org-export-table-cell-address): Use `eq' instead of `equal' when
  possible.
* contrib/lisp/org-e-ascii.el (org-e-ascii-table-row):
* contrib/lisp/org-e-beamer.el (org-e-beamer-select-environment):
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
  org-e-html-latex-environment, org-e-html-paragraph): Use `eq'
  instead of `equal' when possible.
* contrib/lisp/org-e-latex.el (org-e-latex--get-footnote-counter):
* contrib/lisp/org-e-odt.el (org-e-odt-do-format-code,
  org-e-odt-footnote-def, org-e-odt-item, org-e-odt-latex-environment,
  org-e-odt-latex-fragment, org-e-odt-plain-list, org-e-odt-table,
  org-e-odt-enumerate-element): Use `eq' instead of `equal' when
  possible.

In particular, comparing elements shouldn't be done with `equal' since
they are circular lists.  On the other hand, using `eq' is fine if
they belong to the same tree.
2012-07-16 16:28:06 +02:00
Jambunathan K 4a53af87de org-e-odt.el: Fix previous commit 2012-07-16 03:43:01 +05:30
Jambunathan K 4aec2e6937 org-e-odt.el: Refactor and rearrange 2012-07-16 03:38:07 +05:30
Nicolas Goaziou 5a3617c6be org-export: Allow anonymous functions in translate alists
* contrib/lisp/org-export.el (org-export-transcoder, org-export-data):
  Allow anonymous functions in translate alists.
* testing/lisp/test-org-export.el: Update tests.
2012-07-15 21:29:38 +02:00
Nicolas Goaziou a605067181 org-element: Silence byte-compiler 2012-07-15 14:35:04 +02:00
Nicolas Goaziou e6a88820bf org-export: Fix a docstring
* contrib/lisp/org-export.el (org-export-translate): Fix docstring.
2012-07-15 12:39:44 +02:00
Nicolas Goaziou b6edf5649c org-element: Inline accessors
* contrib/lisp/org-element.el (org-element-type, org-element-property,
  org-element-contents, org-element-restriction): Inline functions.
2012-07-15 12:27:54 +02:00
Nicolas Goaziou ebad68a059 org-export: Fix table test failure
* contrib/lisp/org-element.el (org-element-center-block-parser,
  org-element-drawer-parser, org-element-dynamic-block-parser,
  org-element-footnote-definition-parser, org-element-headline-parser,
  org-element-inlinetask-parser, org-element-item-parser,
  org-element-plain-list-parser, org-element-quote-block-parser,
  org-element-section-parser, org-element-special-block-parser,
  org-element-babel-call-parser, org-element-clock-parser,
  org-element-comment-parser, org-element-comment-block-parser,
  org-element-example-block-parser, org-element-export-block-parser,
  org-element-fixed-width-parser, org-element-horizontal-rule-parser,
  org-element-keyword-parser, org-element-latex-environment-parser,
  org-element-paragraph-parser, org-element-planning-parser,
  org-element-property-drawer-parser,
  org-element-quote-section-parser, org-element-src-block-parser,
  org-element-table-parser, org-element-table-row-parser,
  org-element-verse-block-parser, org-element-bold-parser,
  org-element-code-parser, org-element-entity-parser,
  org-element-export-snippet-parser,
  org-element-footnote-reference-parser,
  org-element-inline-babel-call-parser,
  org-element-inline-src-block-parser, org-element-italic-parser,
  org-element-latex-fragment-parser, org-element-line-break-parser,
  org-element-link-parser, org-element-macro-parser,
  org-element-radio-target-parser,
  org-element-statistics-cookie-parser,
  org-element-strike-through-parser, org-element-subscript-parser,
  org-element-superscript-parser, org-element-table-cell-parser,
  org-element-target-parser, org-element-timestamp-parser,
  org-element-underline-parser, org-element-verbatim-parser): Use
  `list' instead of backquotes to avoid using a quoted constant list
  as a non-last argument to `nconc'.
2012-07-15 12:25:09 +02:00
Nicolas Goaziou ceaeb33629 org-element: Handle special cases in setter functions
* contrib/lisp/org-element.el (org-element-put-property,
  org-element-set-contents): Handle special cases like empty or string
  arguments.
(org-element-parse-secondary-string): Correctly set `:parent' property
in objects within the secondary string if element or object containing
it is provided as an optional argument.
(org-element-parse-elements, org-element-parse-objects): Rewrite
functions using setter functions.
2012-07-15 12:25:09 +02:00
Jambunathan K f0d5d935ce org-e-odt.el: Introduced `org-e-odt--export-wrap'
- Clean up work directory and buffers on error.
- Don't use `org-current-export-file'.
- Handle file paths robustly i.e., don't rely on `default-directory'.
- Remove stale code.
2012-07-14 18:21:31 +05:30
Nicolas Goaziou 373cb5a37e org-export: Silence byte-compiler 2012-07-14 12:05:20 +02:00
Jambunathan K 90a20261f1 org-e-html.el: Use `org-export-dictionary'
Don't use `org-export-language-setup'.  Lots of miscellaneous cleanups to
enable clean compilation.
2012-07-13 03:26:13 +05:30
Jambunathan K 22a6d99d5a org-export: Re-arrange entries in `org-export-dictionary'
* contrib/lisp/org-export.el (org-export-dictionary):
Re-arrange entries in ascending order.
2012-07-13 03:25:41 +05:30
Jambunathan K 936ff0703b org-export: Update org-export-dictionary
* contrib/lisp/org-export.el (org-export-dictionary): Add
follwing new entires - "Author", "Date", "Equation" and
"Figure".
2012-07-13 03:25:29 +05:30
Nicolas Goaziou 1216df61cc org-export: Implement multi-backend dictionary
* contrib/lisp/org-export.el (org-export-translate): New function.
(org-export-dictionary): New variable.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-toc,
  org-e-ascii--list-listings, org-e-ascii--list-tables,
  org-e-ascii-template, org-e-ascii--translate): Use new translation
  system.
(org-e-ascii-dictionary): Remove variable.
2012-07-12 13:31:06 +02:00
Nicolas Goaziou c75120aa71 org-element: Refactoring 2012-07-11 14:17:02 +02:00
Nicolas Goaziou d5f5c77fcd org-export: Small refactoring
* contrib/lisp/org-export.el (org-export-get-previous-element,
  org-export-get-next-element): Small refactoring.
* testing/lisp/test-org-export.el: Add tests.
2012-07-10 19:22:04 +02:00
Nicolas Goaziou bb9a26389c org-element: Rename `org-export-set-element' into `org-element-set-element'
* contrib/lisp/org-element.el (org-element-set-element): New function.
* contrib/lisp/org-export.el (org-export-set-element): Removed function.
* testing/lisp/test-org-element.el: Add test.
* testing/lisp/test-org-export.el: Remove test.
2012-07-10 17:29:13 +02:00
Nicolas Goaziou d9f975cf7b org-element: Add setters to modify parse tree
* contrib/lisp/org-element.el (org-element-put-property,
  org-element-set-contents, org-element-adopt-element): New
  functions.
* testing/lisp/test-org-element.el: Add tests.
2012-07-10 17:23:33 +02:00
Nicolas Goaziou 9028c4655f org-export: Improve a docstring
* contrib/lisp/org-export.el (org-export-get-genealogy): Improve
  docstring.
2012-07-10 15:30:51 +02:00
Nicolas Goaziou 0bbc9fa075 org-export: Accept nil :post-blank property
* contrib/lisp/org-export.el (org-export-data): Nil :post-blank
  property is equivalent to a value of 0.
2012-07-09 22:48:00 +02:00
Jambunathan K 0e9ec97ed4 org-e-odt.el: Don't rely on buffer positions
They may not be available when element translation is in effect.
2012-07-08 23:28:16 +05:30
Jambunathan K b7be665ef3 org-e-html.el: Introduced `org-e-html-allow-name-attribute-in-anchors'
Apparently helps with creating epub formats.  See
http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00391.html
2012-07-08 00:50:47 +05:30
Jambunathan K c83e251ae0 org-e-html.el: Handle headlines with ID 2012-07-07 19:24:53 +05:30
Jambunathan K 14b093275f org-e-html/org-e-odt: Handle links to headlines created with C-c C-l 2012-07-07 15:10:42 +05:30
Nicolas Goaziou 69540aba51 org-e-beamer: Fix defgroup 2012-07-07 00:51:02 +02:00
Nicolas Goaziou 3a70c90667 org-element: Implement a function to find object at point
* contrib/lisp/org-element.el (org-element-context): New function.
* testing/lisp/test-org-element.el: Add tests.
2012-07-07 00:49:13 +02:00
Bastien Guerry 9731a8b681 Fix `org-export-creator-string' and add the option `org-e-html-creator-string'.
* org-e-html.el (org-e-html-creator-string): New option.
(org-e-html-options-alist): Use it.

* org-export.el (org-export-creator-string): Don't use HTML
tags in the generic creator string.

Thanks to Nicolas for directions on what to change wrt this.
2012-07-06 09:09:31 +02:00
Nicolas Goaziou b5eccf94df org-export: Fix docstrings 2012-07-05 23:42:09 +02:00
Bastien Guerry ec5cc394b4 org-export.el (org-export-filters-alist): Fix typo in docstring.
* org-export.el (org-export-filters-alist): Fix typo in docstring.
2012-07-05 18:06:14 +02:00
Bastien Guerry 820803ab95 Add links to Org mode and GNU Emacs websites in creator strings.
* org-html.el (org-export-as-html): Add links to the Org mode
and GNU Emacs websites When :html-postamble is set to 't.

* org-export.el (org-export-creator-string): Add links to the
Org mode and GNU Emacs websites.
2012-07-05 16:02:06 +02:00
Nicolas Goaziou 73951db845 org-export: Add a subtree property for each export option
* contrib/lisp/org-export.el (org-export-get-subtree-options): Add
  a subtree property for each export option.
* testing/lisp/test-org-export.el: Add tests.

Properties names are obtained by adding "EXPORT_" prefix to buffer
keywords.
2012-07-05 13:44:26 +02:00
Nicolas Goaziou e2cd9c398d org-export: Modify exclude tags and select tags keywords
* contrib/lisp/org-export.el (org-export-options-alist):
  EXPORT_EXCLUDE_TAGS (resp. EXPORT_SELECT_TAGS) becomes
  EXCLUDE_TAGS (resp. SELECT_TAGS).

EXPORT_ prefix is required for subtree properties relative to export.
Thus, this change avoids confusion.
2012-07-04 18:38:48 +02:00
Nicolas Goaziou c96431a2ea org-export: Small clean-up
* contrib/lisp/org-export.el (org-export-get-subtree-options): Small
  clean-up.
2012-07-04 18:00:31 +02:00
Nicolas Goaziou a69f4b88c1 org-export: Fix byte-compilation
* contrib/lisp/org-export.el (org-export-with-current-buffer-copy):
  Fix byte-compilation.
2012-07-02 11:56:17 +02:00
Nicolas Goaziou 0b89d5bcc6 org-export: Silence byte-compiler 2012-07-02 11:22:22 +02:00
Nicolas Goaziou fd52a24160 org-e-beamer: Fix customize group and a variable name 2012-07-01 21:58:24 +02:00
Nicolas Goaziou dab2505fb5 org-e-latex: Clean-up beamer parts in template
* contrib/lisp/org-e-latex.el (org-e-latex-template): Clean-up beamer
  parts in template.
2012-06-30 16:31:20 +02:00
Nicolas Goaziou e698ead540 Implement a Beamer back-end for org-export
* contrib/lisp/org-e-beamer.el: New file.
2012-06-30 16:31:19 +02:00
Nicolas Goaziou 475fac147b org-element: Every keyword starting with ATTR_ is an affiliated keyword
* contrib/lisp/org-element.el (org-element-affiliated-keywords):
  Remove attributes keywords from the list since they are, de facto,
  affiliated keywords.
(org-element-multiple-keywords): Remove "attr" keywords from the list
since they always belong to that list.
(org-element--affiliated-re, org-element-collect-affiliated-keywords,
org-element-interpret--affiliated-keywords): Handle special attr
keywords correctly.
2012-06-30 13:49:46 +02:00
Nicolas Goaziou ab82a9dcfe Update tests and comments for new snippet syntax
* contrib/lisp/org-export.el (org-export-snippet-translation-alist):
  Fix docstring.
(org-export-as): Fix code comment.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-export.el: Update tests.
2012-06-30 10:01:28 +02:00
Nicolas Goaziou 2e38ed36cb org-element: New syntax for export snippets
* contrib/lisp/org-element.el (org-element-export-snippet-parser,
  org-element-export-snippet-interpreter,
  org-element-export-snippet-successor): Use "@@backend:contents@@"
  syntax.
2012-06-30 09:05:24 +02:00
Nicolas Goaziou cf8d979d8c org-element: Fix `org-element-map' when type looked after is plain text
* contrib/lisp/org-element.el (org-element-map): Fix `org-element-map'
  when type looked after is plain text.
2012-06-25 15:45:56 +02:00
Nicolas Goaziou 802fc6581d org-e-latex: Fix footnotes in item tags
* contrib/lisp/org-e-latex.el (org-e-latex--get-footnote-counter): New
  function.
(org-e-latex-footnote-reference): Use new function.
2012-06-23 10:50:24 +02:00
Nicolas Goaziou 9696250e53 org-element: Small refactoring
* contrib/lisp/org-element.el (org-element-map): Remove use of `every'
  function.
2012-06-22 15:30:13 +02:00
Nicolas Goaziou bafe0fb295 org-export: Fix bug with default DATE value
* contrib/lisp/org-export.el (org-export-get-global-options): Parse
  default value from parsed keywords, too.
* testing/lisp/test-org-export.el: Change test accordingly.
2012-06-22 15:07:07 +02:00
Nicolas Goaziou 62453c5bf4 Export backends: Interpret correctly DATE keyword
* contrib/lisp/org-e-ascii.el (org-e-ascii-template--document-title):
  Interpret correctly DATE keyword.
* contrib/lisp/org-e-html.el (org-e-html-format-date): Interpret
  correctly DATE keyword.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Interpret
  correctly DATE keyword.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
  org-e-odt-update-meta-file): Interpret correctly DATE keyword.
2012-06-20 12:33:23 +02:00
Nicolas Goaziou 500567fab3 org-element: Parse contents of DATE keyword
* contrib/lisp/org-element.el (org-element-parsed-keywords): Parse
  contents of DATE keyword.
2012-06-20 12:32:12 +02:00
Nicolas Goaziou fca0169147 org-e-latex: Allow previously definied footnotes in item tag
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference): Allow
  previously definied footnotes in item tag.
2012-06-18 18:38:08 +02:00
Nicolas Goaziou e8aafa3337 org-e-latex: Refactor code
* contrib/lisp/org-e-latex.el (org-e-latex--delayed-footnotes-definitions):
  New function.
(org-e-latex-footnote-reference, org-e-latex-item): Use new function.
2012-06-18 14:28:47 +02:00
Nicolas Goaziou add8d28ba2 org-e-latex: Support for footnote references in an item tag 2012-06-18 12:39:17 +02:00
Nicolas Goaziou b2c413ecf6 org-element: Allow footnote references in an item tag
* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
  footnote references in an item tag.
2012-06-18 12:01:40 +02:00
Nicolas Goaziou 2900138774 org-export: Fix error when calling "l" from dispatcher
* contrib/lisp/org-export.el (org-export-dispatch): Fix error when
  calling "l" from dispatcher.
2012-06-18 11:49:12 +02:00
Nicolas Goaziou a69e6b6225 org-e-latex: Make headlines more robust in toc
* contrib/lisp/org-e-latex.el (org-e-latex-headline): Allow curly
  brackets and replace square brackets with parenthesis in table of
  contents when tags are removed.
2012-06-18 11:42:22 +02:00
Nicolas Goaziou 769fa4f7ab org-e-latex: Follow `not-in-toc' specification for tags
* contrib/lisp/org-e-latex.el (org-e-latex-headline): Follow
  `not-in-toc' specification for tags.
2012-06-18 10:39:51 +02:00
Nicolas Goaziou 04ad4ab417 org-export: Follow EXPORT_TITLE property when exporting subtree
* contrib/lisp/org-export.el (org-export-get-subtree-options): Make
  sure point is at an headline and buffer isn't narrowed before
  looking for EXPORT_TITLE property.
* testing/lisp/test-org-export.el: Add test.
2012-06-18 01:34:57 +02:00
Jambunathan K a975751527 org-e-odt.el: Use `org-export-read-attribute' 2012-06-17 14:31:04 +05:30
Nicolas Goaziou 8840cd6ddc org-e-latex: Babel language set through LANGUAGE keyword is loaded last
* contrib/lisp/org-e-latex.el (org-e-latex--guess-babel-language):
  Make sure Babel language set through LANGUAGE keyword is loaded
  last.
2012-06-15 17:19:26 +02:00
Nicolas Goaziou 393f2f5ae8 org-e-latex: Set Babel language according to LANGUAGE keyword
* contrib/lisp/org-e-latex.el (org-e-latex-babel-language-alist): New
  variable.
(org-e-latex--guess-babel-language): New function.
(org-e-latex-template): Set babel language according to LANGUAGE keyword.
2012-06-15 12:07:21 +02:00
Nicolas Goaziou a2fd96a3de org-export: Fix code comments 2012-06-12 17:31:48 +02:00
Nicolas Goaziou f2bfa3a6b2 org-element: Fix item interpreter when item doesn't start with a paragraph
* contrib/lisp/org-element.el (org-element-item-interpreter): Fix item
  interpreter when item doesn't start with a paragraph.
* testing/lisp/test-org-element.el: Add test.
2012-06-12 14:29:53 +02:00
Nicolas Goaziou eb69035d5e org-export: Fix template for derived back-ends
* contrib/lisp/org-export.el (org-export-as): Fix template for derived
  back-ends.
2012-06-12 13:48:19 +02:00
Nicolas Goaziou 68a595ce9d org-export: Add `org-export-read-attribute' for normalized attr lines
* contrib/lisp/org-export.el (org-export-read-attribute): New function.
* testing/lisp/test-org-export.el: Add test.
2012-06-12 10:25:00 +02:00
Nicolas Goaziou 168c83e6d4 org-export: Correctly export check-boxes in description lists
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width): Pay
  attention to length of check-box, if any when computing text width.
(org-e-ascii--checkbox): New function.
(org-e-ascii-item): Allow check-boxes in description lists.
(org-e-ascii-paragraph): Refactor code.
* contrib/lisp/org-e-html.el (org-e-html-format-list-item): Allow
  check-boxes in description lists.
* contrib/lisp/org-e-latex.el (org-e-latex-item): Allow check-boxes in
  description lists.
* contrib/lisp/org-e-odt.el (org-e-odt--checkbox): New function.
(org-e-odt-item): Allow check-boxes in description lists.
(org-e-odt-paragraph): Do not add checkbox in front of paragraph if it
belongs to a description item, since the box will be attached to the
tag.
2012-06-09 15:34:27 +02:00
Nicolas Goaziou c88599424c org-e-html: Remove spurious newline characters
* contrib/lisp/org-e-html.el (org-e-html-example-block,
  org-e-html-fixed-width, org-e-html-horizontal-rule,
  org-e-html-inlinetask, org-e-html-paragraph, org-e-html-src-block,
  org-e-html-table-row): Remove spurious newline characters.
2012-06-09 13:24:17 +02:00
Nicolas Goaziou f56e862b1e org-export: Change signatures of first-sibling-p and last-sibling-p
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-last-sibling-p): Remove communication channel from
  signature.
* contrib/lisp/org-e-html.el (org-e-html-headline): Apply signature
  changes.
* contrib/lisp/org-e-latex.el (org-e-latex-headline): Apply signature
  changes.
* contrib/lisp/org-e-odt.el (org-e-odt-headline): Change code
  comments.
2012-06-09 11:34:16 +02:00
Nicolas Goaziou 4dee3eb952 org-export: Update code comments 2012-06-09 10:31:46 +02:00
Nicolas Goaziou e23f506d98 org-export: Add function to change elements in parse tree
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
  Ensure initial accumulator in non-nil.
(org-export-set-element): New function.
* testing/lisp/test-org-export.el: Add test.
2012-06-09 00:17:40 +02:00
Nicolas Goaziou 03739dd512 org-export: Fix code typo
* contrib/lisp/org-export.el (org-export-get-ordinal): Fix code typo.
2012-06-09 00:17:40 +02:00
Nicolas Goaziou 4728a4611e org-export: Rewrite topology functions
* contrib/lisp/org-export.el (org-export-get-genealogy,
  org-export-get-parent, org-export-get-parent-headline,
  org-export-get-parent-table): Rewrite function to use :parent
  property.  Remove communication channel from signature.
(org-export-get-parent-element): Rename from
`org-export-get-parent-paragraph'.
(org-export-data, org-export-table-row-is-special-p)
org-export-table-row-group, org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p, org-export-table-cell-address,
org-export-first-sibling-p, org-export-last-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal): Apply
signature change.
(org-export--skip-p, org-export-table-cell-width,
org-export-table-cell-alignment, org-export-table-cell-borders):
Refactor code.  Apply signature change.
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width,
  org-e-ascii--unique-links, org-e-ascii-inlinetask,
  org-e-ascii-item, org-e-ascii-paragraph, org-e-ascii-quote-section,
  org-e-ascii-section, org-e-ascii--table-cell-width): Apply signature
  change.
* contrib/lisp/org-e-html.el (org-e-html-link,
  org-e-html-link--inline-image): Use new function and apply signature
  change.
(org-e-html-item, org-e-html-standalone-image-p, org-e-html-paragraph,
org-e-html-section, org-e-html-table-cell, org-e-html-table-row,
org-e-html-footnote-reference): Apply signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Use
  new function and apply signature change.
(org-e-latex-footnote-reference, org-e-latex-item,
org-e-latex-table-cell, org-e-latex-table-row): Apply signature
change.
* contrib/lisp/org-e-odt.el (org-e-odt-format-formula,
  org-e-odt-format-label, org-e-odt-link--inline-image): Use new
  function and apply signature change.
(org-e-odt-item, org-e-odt-standalone-image-p, org-e-odt-paragraph,
org-e-odt-plain-list, org-e-odt-table-style-spec,
org-e-odt-get-table-cell-styles, org-e-odt-table-cell,
org-e-odt-table-row, org-e-odt-table, org-e-odt-footnote-reference,
org-e-odt-enumerate-element): Apply signature change.
2012-06-09 00:17:30 +02:00
Nicolas Goaziou af285d6c8c org-element: Add `:parent' property to elements/objects in parse tree
* contrib/lisp/org-element.el (org-element-parse-buffer): Correctly
  set original parent.
(org-element-parse-elements, org-element-parse-objects): Set `:parent'
property of each element/object.
* testing/lisp/test-org-element.el: Add tests.
2012-06-08 23:29:21 +02:00
Nicolas Goaziou 3f0f8734ff org-export: Suppress some byte-compiling warnings 2012-06-08 16:12:47 +02:00
Nicolas Goaziou a147dc3150 org-e-html: Links inherit attributes from their paragraph container
* contrib/lisp/org-e-html.el (org-e-html-link): Add attributes from
  paragraph container.
2012-06-08 15:25:29 +02:00
Nicolas Goaziou 451191bc41 org-export: Correctly resolve fuzzy links whose path starts with *
* contrib/lisp/org-export.el (org-export-resolve-fuzzy-link):
  Correctly resolve fuzzy links whose path starts with *
* testing/lisp/test-org-export.el: Add tests.
2012-06-07 00:06:19 +02:00
Nicolas Goaziou ad235400a6 org-export: Support for external id links
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
  Retrieve footnote definitions and id in buffer.
(org-export-store-footnote-definitions): Removed function.
(org-export-collect-tree-properties): Update docstring.
(org-export-as): Do not call `org-export-store-footnote-definitions'.
(org-export-resolve-id-link): Return external file name when there's
no match for id in current parse tree.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Handle external id
  links.
* testing/lisp/test-org-export.el: Add tests.
2012-06-06 23:39:04 +02:00
Jambunathan K 03fbf6b161 org-e-odt.el: Support for indented tables (first cut) 2012-06-05 19:34:20 +05:30
Jambunathan K 1dc00c5ddb org-e-odt.el: Handle checkboxes
Cleanup lists: Preparing for indented tables (Take 2)
Disable listification of deep headings
2012-06-04 03:59:49 +05:30
Jambunathan K fe2e2f1550 org-e-html.el: Remove org-element and org-export related declarations 2012-06-03 18:44:09 +05:30
Jambunathan K 066afd05ad org-e-odt.el: Remove org-element and org-export related declarations 2012-06-03 18:24:52 +05:30
Jambunathan K 160c7ee356 Preparing for typesetting of indented tables 2012-06-03 18:07:21 +05:30
Jambunathan K ec368e844d org-e-odt: Remove dependency on `org-e-html-encode-plain-text' 2012-06-03 02:59:35 +05:30
Jambunathan K ca6f523ff5 org-e-html: Honor `org-e-html-link-org-files-as-html' 2012-06-02 20:25:41 +05:30
Jambunathan K 1d7e78ebf8 org-e-odt: Turn off `org-e-odt-prettify-xml' 2012-06-02 19:42:26 +05:30
Jambunathan K d728c17004 org-e-html.el: Properly render relative file URLs 2012-06-02 17:07:56 +05:30
Jambunathan K 2d71a58ef3 org-e-html: Use <a>...</a> instead of <a/> 2012-06-02 15:37:10 +05:30
Jambunathan K 02f3ee40f3 org-e-html: Fix misc. bugs 2012-06-02 05:34:20 +05:30
Jambunathan K 984748641b org-e-html: Don't use default href for headlines linked via customid.
If headline is linked via customid in Org file, use customid in HTML
export as well.  Additionally, while linking to headline from within a
TOC section, use customid preferentially in HTML export.
2012-06-02 05:12:00 +05:30
Jambunathan K 40e710bbd5 org-e-odt: Add require + autoload cookie 2012-06-02 01:13:47 +05:30
Nicolas Goaziou c1ba122a57 org-e-html: Remove spurious newline character before paragraphs
* contrib/lisp/org-e-html.el (org-e-html-paragraph): Remove spurious
  newline character before paragraphs.
2012-06-01 18:25:15 +02:00
Jambunathan K 72bb8dc691 org-e-html.el: Honor CUSTOM_IDs in outline headings 2012-05-31 02:56:59 +05:30
Jambunathan K 11ef636f55 org-e-html.el: Fix XML declaration.
Also add autoload cookie and a require.
2012-05-31 00:00:56 +05:30
Nicolas Goaziou 4aa8693c2c org-export: Remove paths from requires
* contrib/lisp/org-export.el: Remove paths from requires.
2012-05-28 15:49:07 +02:00
Nicolas Goaziou 4b0121fc2a org-export: Move requires into dispatcher
* contrib/lisp/org-export.el (org-export-dispatch): Move requires into
  dispatcher.

This is a temporary change, until interactive functions in back-ends
can be properly autoloaded.
2012-05-28 09:34:23 +02:00
Jambunathan K 540dfce8fe org-e-html.el: Handle #+STYLE, #+LINK_UP, #+LINK_HOME 2012-05-27 17:44:12 +05:30
Jambunathan K c554052def org-e-odt.el: Introduce :header-columns as a new table attribute 2012-05-26 23:50:38 +05:30
Nicolas Goaziou 09164e5c72 org-export: Hide select tags
* contrib/lisp/org-export.el (org-export-get-tags): New function.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title): Use new function.
* contrib/lisp/org-e-html.el (org-e-html-format-headline--wrap,
  org-e-html-headline): Use new function.
* contrib/lisp/org-e-latex.el (org-e-latex-headline,
  org-e-latex-inlinetask): Use new function.
* contrib/lisp/org-e-odt.el (org-e-odt-format-headline--wrap): Use new
  function.
* testing/lisp/test-org-export.el: Add tests.
2012-05-26 13:52:03 +02:00
Nicolas Goaziou 68744bf19f org-export: Fix selective export when a select tag is present
* contrib/lisp/org-export.el (org-export-populate-ignore-list): Fix
  docstring.
(org-export--selected-trees): Correctly search for headlines with
a select tag.
(org-export--skip-p): Fix selective export when a select tag is
present in the buffer.
* testing/lisp/test-org-export.el: Update tests.
2012-05-26 13:51:55 +02:00
Jambunathan K 8ee5ce1d2b org-e-odt.el: Fix example, fixed width, QUOTE and verse blocks 2012-05-26 02:55:22 +05:30
Jambunathan K b00eeb4d5a org-e-odt.el: Some cleanups 2012-05-26 00:09:53 +05:30
Nicolas Goaziou 8d96bbc5c3 org-element: Update entities regexp
* contrib/lisp/org-element.el (org-element-entity-parser, org-element-latex-or-entity-successor):
Update entities regexp.
2012-05-25 16:53:32 +02:00
Jambunathan K f12e41e37c org-e-odt: Handle quotation marks etc
Handle quotation marks, special strings, line breaks

Avoid corrupt of ODT files when
`nxml-auto-insert-xml-declaration-flag' is on.
2012-05-25 09:29:05 +05:30
Nicolas Goaziou 5d1c7e741b Update some docstrings and comments
* contrib/lisp/org-e-ascii.el (org-e-ascii-table,
  org-e-ascii--table-cell-width): Update docsring.
* contrib/lisp/org-e-html.el (org-e-html-table): Update docstring.
* contrib/lisp/org-e-latex.el (org-e-latex-table): Update docstring.
* contrib/lisp/org-e-odt.el (org-e-odt-table): Update docstring.
2012-05-23 23:21:25 +02:00
Nicolas Goaziou 00a4bf0663 org-e-latex: Reordering functions 2012-05-23 16:29:16 +02:00
Nicolas Goaziou 4721052ec6 org-e-ascii: Small refactoring
* contrib/lisp/org-e-ascii.el (org-e-ascii--unique-links): Small refactoring.
2012-05-21 21:54:09 +02:00
Nicolas Goaziou dc976e1139 org-export: Only number elements with a caption
* contrib/lisp/org-export.el (org-export-collect-elements): Collect
  elements with a caption only.
(org-export-collect-tables, org-export-collect-figures,
org-export-collect-listings): Update docstring.
* contrib/lisp/org-e-ascii.el (org-e-ascii--has-caption-p): Renamed
  from `org-e-ascii--has-caption-or-name-p'.
(org-e-ascii-link): Use previous function.
(org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables): Do not use #+NAME keyword as a fallback caption.
2012-05-21 21:38:42 +02:00
Nicolas Goaziou 42f7ba0d02 org-element: Fix ill-defined keywords parsing
* contrib/lisp/org-element.el (org-element-comment-parser):
  Ill-defined keywords (without the colons) are treated as comments.
(org-element-comment-interpreter): Apply changes to lexer.
* testing/lisp/test-org-element.el: Add test.
2012-05-20 17:33:36 +02:00