0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 14:10:42 +00:00
Commit graph

31 commits

Author SHA1 Message Date
David Maus 235e993ae6 Provide edebug spec for with-org-lparse-preserve-paragraph-state
* contrib/lisp/org-lparse.el (with-org-lparse-preserve-paragraph-state):
Provide edebug spec.
2011-09-03 14:55:41 +05:30
Jambunathan K d85635306b org-lparse.el: Abort export if list-tables are malformed
* contrib/lisp/org-lparse.el (org-lparse-format-table-row): In
list-tables, require that the header row be a row with max
number of columns. Abort export if this condition is not met.
2011-09-02 14:34:56 +05:30
Jambunathan K 74e78a1456 org-lparse.el: Support for list-tables (first cut)
* contrib/lisp/org-lparse.el
(org-lparse-list-table:table-cell-open): New variable.
(org-lparse-begin-list-table:table-cell)
(org-lparse-end-list-table:table-cell): New routines.  Use
`org-lparse-begin-collect' and `org-lparse-end-collect' to get
a string representation of a multi-line table cell.
(org-lparse-list-table-p, org-lparse-list-level)
(org-lparse-list-item-count, org-lparse-list-stack)
(org-lparse-list-table:table-cell-open)
(org-lparse-list-table:table-row)
(org-lparse-list-table:lines): New variables to keep track of
the state of the list at a point in time during export.
(org-do-lparse): Init above variables.
(org-lparse-begin-list, org-lparse-end-list)
(org-lparse-begin-list-item, org-lparse-end-list-item):
Modified so that list marked as list-table are exported as a
table.  Refer notes in the file for more information.
(org-lparse-do-format-list-table): Make sure that `org-table'
is loaded.

* contrib/lisp/org-odt.el (org-odt-format-table-cell): Table
cells are list-tables are already paragraphs.  No need to
enclose them in paragraphs again.
2011-09-01 23:44:17 +05:30
Jambunathan K 30aa8f61da Revert "Introduce org-odt-begin-table-cell and org-odt-end-table-cell"
This reverts commit e887881e13.  Keep things
simple for now.
2011-09-01 23:44:04 +05:30
Jambunathan K e887881e13 Introduce org-odt-begin-table-cell and org-odt-end-table-cell
* contrib/lisp/org-odt.el
(org-odt-entity-control-callbacks-alist): Added an entry for
TABLE-CELL.
(org-odt-begin-paragraph, org-odt-format-stylized-paragraph):
Honour `org-lparse-current-paragraph-style'.
(org-odt-begin-table-cell, org-odt-end-table-cell): Factored
out from the earlier `org-odt-format-table-cell'. Note that
these functions set and reset
`org-lparse-current-paragraph-style'.
(org-odt-format-table-cell): Use the above functions.
* contrib/lisp/org-lparse.el
(org-lparse-current-paragraph-style): New variable.
(org-do-lparse): Init the above variable at the beginning of
export.
2011-09-01 19:36:34 +05:30
Jambunathan K 219e7d60db Introduced org-lparse-begin-collect and org-lparse-end-collect
* contrib/lisp/org-lparse.el (org-lparse-footnote-buffer):
Deleted.  Genericized as `org-lparse-collect-buffer'.
(org-lparse-output-buffer): Added docstring.
(org-lparse-collect-buffer): New variable.  Was
`org-lparse-footnote-buffer' till now.
(org-lparse-collect-count): New variable to aid in asserting
implicit assumptions made by the export engine.
(org-lparse-begin-collect): New function.  Factored out from
`org-lparse-begin-footnote-definition'.
(org-lparse-end-collect): New function.  Factored out from
`org-lparse-end-footnote-definition'.
(org-lparse-begin-footnote-definition)
(org-lparse-end-footnote-definition): Use above functions.
(org-do-lparse): Reset `org-lparse-collect-buffer' and
`org-lparse-collect-count' at the beginning of export.
Cleanup `org-lparse-collect-buffer'.

* contrib/lisp/org-xhtml.el (org-xhtml-end-export): Removed
references to `org-lparse-footnote-buffer'.
2011-09-01 16:32:06 +05:30
Jambunathan K 0e1f11e730 org-lparse.el: Recognize #+begin_list-table...#+end_list-table blocks
* contrib/lisp/org-lparse.el (org-lparse-list-table-enable):
New customizable variable.
(org-lparse-preprocess-after-blockquote-hook): New hook to
treat #+begin_list-table...#+end_list-table blocks specially.
Add this hook to
`org-export-preprocess-after-blockquote-hook'.
(org-lparse-list-table-p): New variable. Bound during
`org-do-lparse'.
(org-lparse-begin-environment, org-lparse-end-environment):
Set `org-lparse-list-table-p' as the engine moves in and out
of list-table blocks.
(org-do-lparse): Bind `org-lparse-list-table-p' to nil on
start of export.  Honor
ORG_LIST-TABLE-START...ORG-LIST-TABLE-END environment.

Actual export of list as table is not implemented yet.
2011-09-01 15:06:12 +05:30
Jambunathan K ac4b117bcc org-lparse.el: Fix earlier checkin
* contrib/lisp/org-lparse.el (org-lparse-do-format-org-table):
Modified.  Delete some local variables and move it to
`org-lparse-do-format-list-table'
(org-lparse-do-format-list-table): Modified as above.
2011-09-01 01:12:15 +05:30
Jambunathan K fdb8395886 Introduced org-lparse-do-format-list-table
* contrib/lisp/org-lparse.el
(org-lparse-do-format-list-table): New. Factored out from
`org-lparse-do-format-org-table'.
(org-lparse-do-format-org-table): Use above function.
(org-lparse-format-list-table): New.  Wrapper for
`org-lparse-do-format-list-table'. For future use.
2011-08-31 23:35:29 +05:30
Jambunathan K 098ed2d03f Introduced org-lparse-org-table-to-list-table
* contrib/lisp/org-lparse.el
(org-lparse-org-table-to-list-table): New. Factored out from
`org-lparse-do-format-org-table'.
(org-lparse-do-format-org-table): Use
`org-lparse-org-table-to-list-table'.
2011-08-31 23:23:03 +05:30
Jambunathan K a0769aaebb Introduce org-lparse-begin/end-list-item
* contrib/lisp/org-lparse.el (org-lparse-end-list-item):
Renamed to `org-lparse-end-list-item-1'.
(org-lparse-begin-list-item, org-lparse-end-list-item): New
functions.  Use these instead of doing (org-lparse-begin
'LIST-ITEM ...) or (org-lparse-end 'LIST-ITEM ...).
(org-lparse-export-list-line, org-lparse-begin-level)
(org-lparse-end-level): Propagate above changes.
* contrib/lisp/org-odt.el
(org-odt-begin-list-item, org-odt-end-list-item): ditto.
* contrib/lisp/org-xhtml.el (org-xhtml-format-toc-item)
(org-xhtml-begin-toc, org-xhtml-end-toc): ditto.
2011-08-31 22:28:14 +05:30
Jambunathan K fec6440a49 Fix some issues with org-xhtml export
* contrib/lisp/org-xhtml.el: require html (temporarily). This
makes sure that variables such as org-export-html-extension
etc referenced in org-exp.el and made available through
opt-plist are properly inited. Can be removed once the
org-export-xhtml namespace is annihilated.

* contrib/lisp/org-lparse.el (org-lparse-format-table): Export
of table.el tables were broken. Fix it. Can be removed once
the xhtml backend is annihilated.
2011-08-28 02:01:40 +05:30
Jambunathan K 3688deeb3f org-odt.el: Support for captioning and labelling of equation images
* contrib/lisp/org-lparse.el (org-do-lparse): let-bind
org-lparse-opt-plist to current export options.
* contrib/lisp/org-odt.el
(org-odt-begin-office-body): Add a directive so that Equations
can be sequentially numbered.
(org-export-odt-preprocess): Removed call to
org-export-odt-preprocess-latex-fragments.
(org-export-odt-preprocess-latex-fragments): Fix signature and
hook it to org-export-preprocess-after-blockquote-hook. Use
org-lparse-opt-plist.
(org-odt-unload-function): Leave no trace in
org-export-preprocess-after-blockquote-hook.

Thanks to Myles English for registering this requirement.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01116.html
2011-08-27 20:31:43 +05:30
Jambunathan K 78e59a22d0 Add support for fontification of odt src blocks using htmlfontify
* contrib/lisp/org-lparse.el (org-do-lparse): Bind
hfy-user-sheet-assoc.
* contrib/lisp/org-odt.el
(org-export-odt-default-org-styles-alist): Rename
OrgSourceBlock to OrgSrcBlock for consistency.
(org-odt-format-source-code-or-example): Modified. Call either
org-odt-format-source-code-or-example-plain or
org-odt-format-source-code-or-example-colored.
(org-odt-format-source-code-or-example-plain): New. Identical
to the earlier org-odt-format-source-code-or-example.
(org-odt-format-source-code-or-example-colored): New
defun. Use htmlfontify for emitting coloring of source blocks.
(org-export-odt-use-htmlfontify)
(org-export-odt-create-custom-styles-for-srcblocks): New
customizable variables
(org-src-block-paragraph-format): New variable.
(org-odt-hfy-face-to-css)
(org-odt-insert-custom-styles-for-srcblocks): New defuns.
(org-odt-save-as-outfile): Modified. Use
org-odt-insert-custom-styles-for-srcblocks.
2011-08-19 01:02:00 +05:30
Bastien Guerry 0538dd3188 Fix some double-space after ponctuation mark in docstrings. 2011-08-18 18:38:05 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
Jambunathan K 99466ce716 Fix issues with numbering of lists found during odt to doc conversion
* contrib/lisp/org-lparse.el (org-do-lparse): Add new let
bound variable org-lparse-list-level.
(org-lparse-begin-list, org-lparse-end-list): New functions.
(org-lparse-export-list-line, org-lparse-begin-level)
(org-lparse-end-level): Use new functions.

* contrib/lisp/org-odt.el (org-odt-begin-list): Fixed
signature so that it is consistent with how org-lparse library
invokes it. Forcibly emit text:continue-numbering="false"
attribute for the top-level <text:list> element. This fixes
numbering issue found during odt to doc conversion. See
http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/14739
(org-odt-begin-list-item, org-odt-end-list-item): Use
org-lparse-begin-list and org-lparse-end-list.

* contrib/lisp/org-xhtml.el (org-xhtml-format-toc-item)
(org-xhtml-begin-toc, org-xhtml-end-toc): Use
org-lparse-begin-list and org-lparse-end-list.
(org-xhtml-begin-list): Fixed signature so that it is
consistent with how org-lparse library invokes it.
2011-08-08 11:31:17 +05:30
Jambunathan K 44472fa6cf Usability improvements to org-lparse-convert and co (First cut)
* contrib/lisp/org-lparse.el (org-lparse-and-open)
(org-lparse-register-backend, org-lparse-format-table)
(org-lparse-begin, org-lparse-end): Checkdoc related fixes.
(org-lparse-get-converter): Added
(org-lparse-get-other-backends, org-lparse-all-backends):
Re-implemented. Also improved docstring.
(org-lparse): Make use of improvements in the converter
routines. Improve the following: a) gathering of
target-backend and native-backend args during interactive
calls b) error handling.
(org-lparse-convert): Introduced prefix arg for opening of
converted files. Make use of improvements in the converter
routines. Improve error handling.
(org-lparse-convert-processes): New customizable variable.
(org-lparse-convert-process): Make it customizable. Set
default value to nil.
(org-lparse-convert-capabilities): New customizable variable.
(org-lparse-use-flashy-warning): Fix group and improve docstring.

* contrib/lisp/org-odt.el (org-odt-get): Don't set
CONVERT-METHOD and OTHER-BACKENDS options. Fallback to the
global converter settings for now.
(org-export-odt-preferred-output-format): New variable
(org-export-as-odt-and-open, org-export-as-odt): Use the
afore-mentioned variable.

* contrib/lisp/org-xhtml.el (org-xhtml-get): Don't set
CONVERT-METHOD and OTHER-BACKENDS options. Fallback to the
global converter settings for now.
2011-08-05 02:04:30 +05:30
Jambunathan K 4db8048a23 Introduce org-lparse-unregister-backend and use it
* contrib/lisp/org-lparse.el (org-lparse-unregister-backend):
New.
* contrib/lisp/org-odt.el (org-odt-unload-function):
New. De-register from org-lparse on unload.
* contrib/lisp/org-xhtml.el (org-xhtml-unload-function):
New. De-register from org-lparse on unload.
2011-08-02 15:00:15 +05:30
Jambunathan K cce01dd380 org-lparse: Update docstring of org-lparse-debug
* contrib/lisp/org-lparse.el (org-lparse-debug): Improve
docstring.
2011-07-21 11:18:16 +02:00
Bastien Guerry 52fd747983 contrib/lisp: don't use `outline-regexp'.
Use `org-outline-regexp' or `org-outline-regexp-bol' instead.

* org-toc.el (org-toc-before-first-heading-p, org-toc-show)
(org-toc-get-headlines-status): Use `org-outline-regexp-bol'.

* org-lparse.el (org-do-lparse): Use `org-outline-regexp-bol'.

* org-export-generic.el (org-export-generic): Use
`org-outline-regexp'.
2011-07-18 09:42:16 +02:00
Jambunathan K 3178cf4afa org-lparse: Disable flashy warning by default
* contrib/lisp/org-lparse.el (org-lparse-use-flashy-warning):
Disable it by default.
2011-07-09 02:24:00 +05:30
Jambunathan K 68ccd547e5 org-lparse.el: Fix export of timestamps that occur as list items
* contrib/lisp/org-lparse.el (org-lparse-handle-time-stamps):
Space is significant. Don't gobble it.
2011-07-09 02:06:48 +05:30
Jambunathan K ead1bb1bbd org-lparse: Bring over commit 49e6bc89
* contrib/lisp/org-lparse.el (org-lparse-export-list-line):
Bring over org-html.el specific changes of commit 49e6bc89.
2011-07-09 01:50:45 +05:30
Jambunathan K baa83cc189 org-lparse: Bring over commit 934aae88
* contrib/lisp/org-lparse.el (org-lparse-export-list-line): Bring over
org-html.el specific changes of commit 934aae88.
2011-07-09 01:49:11 +05:30
Jambunathan K 7aee4082c1 Backends now register with org-lparse during load time
* contrib/lisp/org-lparse.el (org-lparse-native-backends): Set
default value to nil. Also update docstring.
(org-lparse-register-backend): New
* contrib/lisp/org-xhtml.el (org-xhtml-get): Add self -
"xhtml" - as one of the other backends. Call
org-lparse-register-backend on load.
* contrib/lisp/org-odt.el: Call org-lparse-register-backend on
load.
2011-07-09 01:35:50 +05:30
Bastien Guerry e6f45face6 Rename org-export-convert-* to org-lparse-convert-*
The org-export-* prefix is confusing here, as these functions
seem to be part of org-exp.el.  Let's name them by the library
they are in (and rely on) for now -- maybe this will change
when we move the ODT exporter to the core.
2011-07-08 12:39:05 +02:00
Bastien Guerry b5feb951a4 contrib/lisp/org-lparse.el: New defcustom `org-lparse-use-flashy-warning'
* org-lparse.el (org-lparse-use-flashy-warning): New
defcustom.
(org-lparse-warn): Use it.
2011-07-08 12:28:35 +02:00
Bastien Guerry c75aa036a2 contrib/org-lparse.el and org-odt.el: cosmetic changes. 2011-07-07 15:18:47 +02:00
Jambunathan K 23c8be4518 org-lparse/org-odt: Add docstring. Silence byte-compiler
I am attaching two org-odt patches for inclusion. Both are desirable and
not mandatory.
2011-07-03 12:35:51 +02:00
Bastien Guerry 63b8ecb4ea Add Jambunathan's odt exporter in contrib/.
This adds these new files:

contrib/lisp/org-lparse.el
contrib/lisp/org-odt.el
contrib/lisp/org-xhtml.el
contrib/odt/BasicODConverter/BasicODConverter-0.8.0.oxt
contrib/odt/BasicODConverter/Filters.bas
contrib/odt/BasicODConverter/Main.bas
contrib/odt/OASIS/OpenDocument-schema-v1.1.rng
contrib/odt/OASIS/OpenDocument-v1.2-cs01-manifest-schema.rng
contrib/odt/OASIS/OpenDocument-v1.2-cs01-schema.rng
contrib/odt/README.org
contrib/odt/etc/schema/od-manifest-schema-v1.2-cs01.rnc
contrib/odt/etc/schema/od-schema-v1.1.rnc
contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc
contrib/odt/etc/schema/schemas.xml
contrib/odt/styles/OrgOdtAutomaticStyles.xml
contrib/odt/styles/OrgOdtStyles.xml

Notes:

contrib/lisp/org-xhtml.el is meant to be merged at some point with
lisp/org-html.el, to avoid code redundancies.

The feature as a whole is meant to move to Org's core when things
are tested and stable enough.

Thanks a lot to Jambunathan for this great contribution and for
his patience!
2011-07-01 11:12:19 +02:00