1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00
Commit Graph

1173 Commits

Author SHA1 Message Date
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