Commit Graph

1431 Commits

Author SHA1 Message Date
Nicolas Goaziou 22ac03bee5 org-export: Add a function to retrieve category of an element or object
* contrib/lisp/org-export.el (org-export-get-category): New function.
* testing/lisp/test-org-export.el: Add tests.
2012-11-02 13:44:46 +01:00
Nicolas Goaziou 869e0fa73d org-e-latex: No \author{} command with author:nil option
* contrib/lisp/org-e-latex.el (org-e-latex-template): No \author{}
  command with author:nil option.
2012-11-01 08:09:29 +01:00
Nicolas Goaziou 32c3456020 org-export: Fix previous/next element finding in secondary strings
* contrib/lisp/org-export.el (org-export-get-previous-element,
  org-export-get-next-element): Correctly retrieve previous and next
  object, if any, in secondary strings.
* testing/lisp/test-org-export.el: Add tests.
2012-10-31 13:21:16 +01:00
Nicolas Goaziou 14e0cd553f org-export: require ob-exp 2012-10-30 22:21:33 +01:00
Nicolas Goaziou c60ef1d9d9 Export back-ends: Fix planning and clock export
* contrib/lisp/org-e-ascii.el (org-e-ascii-clock,
  org-e-ascii-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-groff.el (org-e-groff-clock,
  org-e-groff-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-html.el (org-e-html-clock, org-e-html-planning):
  Fix export due to recent timestamps changes.
* contrib/lisp/org-e-latex.el (org-e-latex-clock,
  org-e-latex-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-odt.el (org-e-odt-clock, org-e-odt-planning): Fix
  export due to recent timestamps changes.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-clock,
  org-e-texinfo-planning): Fix export due to recent timestamps
  changes.
2012-10-30 21:59:50 +01:00
Nicolas Goaziou caee8076f8 org-export: Fix docstring
* contrib/lisp/org-export.el (org-export-with-tasks): Fix docstring.
2012-10-30 16:28:33 +01:00
Nicolas Goaziou 1a7610ed98 org-export: Add FILETAGS when retreiving tags with inheritance
* contrib/lisp/org-export.el (org-export-special-keywords): New
  "FILETAGS" keyword.
(org-export--get-inbuffer-options): Handle "FILETAGS" keywords.
(org-export-get-tags): Add FILETAGS when retreiving tags with
inheritance.
* testing/lisp/test-org-export.el: Add test.
2012-10-30 16:03:59 +01:00
Nicolas Goaziou dda56367b8 org-export: Fix :input-file property
* contrib/lisp/org-export.el (org-export-get-environment): Add misc
  properties.
(org-export-as): Extract buffer attributes before entering its copy.
2012-10-30 15:07:44 +01:00
Nicolas Goaziou ad811f5437 org-export: Fix inclusion of files with no final newline
* contrib/lisp/org-export.el (org-export--prepare-file-contents): File
  contents should end with a newline character.
2012-10-30 13:53:28 +01:00
Nicolas Goaziou 1f3a2c42c6 org-element, org-export: Fix documentation typos
* contrib/lisp/org-export.el (org-export--get-subtree-options): Fix
  code comment.
* lisp/org-element.el (org-element-map): Fix docstring.
2012-10-29 21:57:46 +01:00
Nicolas Goaziou 8fb5987e56 org-export: Fix smart quotes with isolated quotes
* contrib/lisp/org-export.el (org-export-activate-smart-quotes): Fix
  smart quotes in some corner-cases.  Refactor code.
* testing/lisp/test-org-export.el: Add test.
2012-10-29 20:36:03 +01:00
Nicolas Goaziou a2120a9d73 org-export: Expand correctly {{{title}}} and such
* contrib/lisp/org-export.el (org-export-as): Expand correctly
  {{{title}}} and such when they already contain a regular macro.
  This is done by expanding macros in two steps: at first regular
  macros,  then document specific macros.
(org-export-expand-macro): Remove function.
* testing/lisp/test-org-export.el: Add test.
2012-10-29 14:01:20 +01:00
Nicolas Goaziou a8c026cb26 org-export: Explicit error when using invalid syntax for INCLUDE keywords
* contrib/lisp/org-export.el (org-export-expand-include-keyword):
  Error out when file isn't specified within double quotes.
* testing/lisp/test-org-export.el: Add test.
2012-10-29 11:31:19 +01:00
Nicolas Goaziou 90fcb4b841 org-export: Add filter set for diary sexp elements
* contrib/lisp/org-export.el (org-export-filters-alist): Add filter
  set for diary sexp elements.
(org-export-filter-comment-block-functions): Fix docstring.
(org-export-filter-diary-sexp-functions): New variable.
2012-10-28 23:00:04 +01:00
Nicolas Goaziou f6e936c2b9 Export back-ends: Update timestamp export
* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-groff.el (org-e-groff-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Update timestamp
  export.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-odt.el (org-e-odt-timestamp): Update timestamp
  export.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-timestamp): Update
  timestamp export.
2012-10-28 16:36:45 +01:00
Nicolas Goaziou ccc98ebc2d org-export: Fix expansion of babel calls in included files
* contrib/lisp/org-export.el (org-export-as):
  `org-current-export-file' should refer to current, temporary, buffer
  containing included contents, not to original buffer with include
  keywords.
(org-export-with-current-buffer-copy): Buffer copy must contain the
whole buffer, possibly narrowed to a proper part, not only the
narrowed part.
* testing/lisp/test-org-export.el: Tweak tests.
2012-10-28 16:21:30 +01:00
Nicolas Goaziou f04a5bcea1 Export back-ends: Install smart quotes module
* contrib/lisp/org-e-ascii.el (org-e-ascii-plain-text): Install smart
  quotes module.
* contrib/lisp/org-e-html.el (org-e-html-plain-text): Install smart
  quotes module.  Fix :preseve-breaks option.
(org-e-html--quotation-marks): Remove function.
(org-e-html-quotes): Remove variable.
* contrib/lisp/org-e-latex.el (org-e-latex-plain-text): Install smart
  quotes module.
(org-e-latex--quotation-marks): Remove function.
(org-e-latex-quotes): Remove variable.
* contrib/lisp/org-e-odt.el (org-e-odt-plain-text): Install smart
  quotes module.
(org-e-odt--quotation-marks): Remove function.
(org-e-odt-quotes): Remove variable.
* contrib/lisp/org-md.el (org-md-plain-text): Install smart quotes
  module.  Fix characters escaping.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-center-block,
  org-e-texinfo-special-block): new functions.
(org-e-texinfo-quotes): Remove variable.
(org-e-texinfo--quotations-marks): Remove function.
(org-e-texinfo-plain-text): Install smart quotes module.
* contrib/lisp/org-e-groff.el (org-e-groff-plain-text): Install smart
quotes module.  Fix line break preservation.
(org-e-groff--quotation-marks): Remove function.
(org-e-groff-quotes): Remove variable.
(org-e-groff-entity): Fix property name.
* contrib/lisp/org-e-man.el (org-e-man-entity): Fix property name.
(org-e-man-plain-text): Install smart quotes module.  Fix line break
preservation.
(org-e-man-quotes): Remove variable.
(org-e-man--quotation-marks): Remove function.
2012-10-27 11:42:31 +02:00
Nicolas Goaziou b2047a2565 org-export: Implement a generic smart quote module
* contrib/lisp/org-export.el (org-export-options-alist): Add an option
  item to toggle smart quotes during export.
(org-export-with-smart-quotes, org-export-smart-quotes-alist,
org-export-smart-quotes-regexps): New variables.
(org-export-activate-smart-quotes): New function.
(org-export-data): Remove residual text properties.
* testing/lisp/test-org-export.el: Add tests.
2012-10-27 11:42:31 +02:00
Nicolas Goaziou 00eaa4dc97 org-export: Fix error when exporting buffers not visiting a file
* contrib/lisp/org-export.el (org-export-output-file-name): Do not
  return an error when exported buffer isn't visiting a file.
2012-10-27 00:02:52 +02:00
Bastien Guerry 8866f86624 Merge branch 'maint' 2012-10-26 15:12:02 +02:00
Bastien Guerry 3cd0c14d34 contrib/lisp/org-contacts.el: Require 'org-agenda.
Thanks to Christopher Schmidt for pointing this.
2012-10-26 14:49:09 +02:00
Nicolas Goaziou c712d65397 org-e-texinfo: Update compile function
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-compile): Mirror recent
changes about base filename and default-directory made to
`org-e-latex-compile'.
2012-10-25 16:07:13 +02:00
Nicolas Goaziou ec40ba021a org-e-man, org-e-groff: Update compile functions
* contrib/lisp/org-e-groff.el (org-e-groff-compile): Mirror recent
  changes about base filename and default-directory made to
  `org-e-latex-compile'.
* contrib/lisp/org-e-man.el (org-e-man-compile): Mirror recent changes
  about base filename and default-directory made to
  `org-e-latex-compile'.
2012-10-25 16:06:18 +02:00
Nicolas Goaziou 4bb5a06b15 org-e-latex: "%b" really means base filename
* contrib/lisp/org-e-latex.el (org-e-latex-pdf-process): Update
  docstring.
(org-e-latex-compile): "%b" is replaced with base filename, that is
filename without directory and extension.
2012-10-25 15:13:40 +02:00
Nicolas Goaziou 6e73c22d15 org-export: Fix commit 468d860528
* contrib/lisp/org-export.el (org-export-dispatch-ui): Ensure fitting
  happens once contents have been inserted in the displayed buffer.
2012-10-22 23:56:26 +02:00
Nicolas Goaziou 9751dc4561 org-export: Use relative path for target filenames
* contrib/lisp/org-export.el (org-export-output-file-name): Use
  relative path for target filenames.
2012-10-22 20:58:27 +02:00
Nicolas Goaziou 468d860528 org-export: Make sure that window displaying UI is tall enough
* contrib/lisp/org-export.el (org-export-dispatch-ui): Make sure that
  window displaying UI is tall enough. This fixes a bug where only
  a part of the menu was displayed.
2012-10-21 14:54:23 +02:00
Nicolas Goaziou 9497098dd4 org-export: Don't modify inlinetasks stars when including a file
* contrib/lisp/org-export.el (org-export--prepare-file-contents):
  Don't modify inlinetasks stars when including a file.
2012-10-16 22:00:39 +02:00
Nicolas Goaziou c1c0c70c89 org-export: Add tag inheritance to `org-export-get-tags'
* contrib/lisp/org-export.el (org-export-get-tags): Add optional tag
  inheritance.
* testing/lisp/test-org-export.el: Add test.
2012-10-14 13:19:12 +02:00
Nicolas Goaziou 9b11e63e7a org-e-latex: Fix publishing problems when compiling a TeX file
* contrib/lisp/org-e-latex.el (org-e-latex-compile): Fix compilation
  when default-directory from current buffer doesn't match directory
  from file being compiled. Small refactoring, too.

Thanks to Robert Klein for reporting the problem and suggesting a fix.
2012-10-11 23:46:07 +02:00
Nicolas Goaziou 0a99cf7249 org-export: Tweak dispatch UI
* contrib/lisp/org-export.el (org-export-dispatch-use-expert-ui):
  Complete docstring.
(org-export-dispatch): Fix docstring. Clean dispatch buffer, if any,
each time the function is called.
(org-export-dispatch-ui): Make sure window containing dispatch buffer
is active when user is prompted for a key.  Also remove cursor from
view.
(org-export-dispatch-action): Ring a bell when a wrong key is pressed.
In regular UI, also inform the user by a message.
2012-10-11 21:32:21 +02:00
Nicolas Goaziou b6822edce3 org-export: Update radio targets after expanding include keywords
* contrib/lisp/org-export.el (org-export-as): Update radio targets
  after expanding include keywords.
2012-10-10 13:55:51 +02:00
Nicolas Goaziou 89d6a26f8d org-export: Expand include keywords before macros
* contrib/lisp/org-export.el (org-export-as): Expand include keywords
  before macros.  This allows to specify macro templates in the
  included file.
* testing/examples/macro-templates.org: New file for testing purposes.
* testing/lisp/test-org-export.el: Add test.
2012-10-10 13:52:54 +02:00
Nicolas Goaziou 0ccf650b4b org-e-publish: Remove default value for publishing function
* contrib/lisp/org-e-publish.el (org-e-publish-file): Remove default
  value for publishing function.
2012-10-08 14:28:07 +02:00
Nicolas Goaziou 9109dc13ea org-e-publish: Move publishing functions into back-end libraries
* contrib/lisp/org-e-ascii.el (org-e-ascii-publish-to-ascii,
  org-e-ascii-publish-to-latin1, org-e-ascii-publish-to-utf8): New
  functions.
* contrib/lisp/org-e-html.el (org-e-html-publish-to-html): New
  function.
* contrib/lisp/org-e-latex.el (org-e-latex-publish-to-latex,
  org-e-latex-publish-to-pdf): New functions.
* contrib/lisp/org-e-publish.el (org-e-publish-org-to-latex,
  org-e-publish-org-to-pdf, org-e-publish-org-to-ascii,
  org-e-publish-org-to-latin1, org-e-publish-org-to-utf8,
  org-e-publish-org-to-html): Remove functions.

Each back-end can define its own publishing functions.  This patch
avoids to clutter org-e-publish.el.
2012-10-08 14:27:08 +02:00
Nicolas Goaziou 19a28c5528 org-e-publish: Fix publishing for files not directly in :base-directory
* contrib/lisp/org-e-publish.el (org-e-publish-org-to-pdf): Don't
  expect every file from a project to sit in :base-directory.
(org-e-publish-org-to): Make publishing directory optional.
2012-10-08 13:03:14 +02:00
Nicolas Goaziou faa9eaa273 org-e-odt: Do not use function from org-exp.el
* contrib/lisp/org-e-odt.el (org-e-odt-link): Do not use function from
  org-exp.el.
2012-10-08 08:19:59 +02:00
Achim Gratz 424a1c5d2f correct reference to non-existing source file
* contrib/lisp/org-export.el: Correct reference to non-existing source
  file, org-exp-blocks has been removed and the imported function is
  now in ob-exp.
2012-10-07 19:16:20 +02:00
Achim Gratz 12e59b66d1 Merge branch 'maint' 2012-10-07 18:13:06 +02:00
Achim Gratz 4b9db1cce0 declare function org-solidify-link-text
* contrib/lisp/org-e-odt.el: Declare function org-solidify-link-text
  from org-exp.
2012-10-07 18:11:36 +02:00
Achim Gratz b47a7d5125 refer to libraries only by name
* contrib/lisp/org-e-odt.el: Replace arc-mode.el -> arc-mode.
* lisp/org-odt.el: Replace arc-mode.el -> arc-mode.
* lisp/org.el: Replace org-macs.el -> org-macs.
2012-10-07 18:11:25 +02:00
Nicolas Goaziou 956858a395 org-export: Fix menu leak when reloading Org
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Make sure a given entry won't be
  added to menu more than once.
2012-10-06 22:04:27 +02:00
Nicolas Goaziou 36306bae4e org-e-publish: Fix type mismatch error
* contrib/lisp/org-e-publish.el (org-e-publish-find-title): Store
  title as a string, not as a secondary string.
2012-10-06 19:44:04 +02:00
Nicolas Goaziou f461a10532 org-e-publish: Fix publishing to PDF
* contrib/lisp/org-e-publish.el (org-e-publish-org-to-pdf): First
  publish in base directory, then move results to publishing
  directory.  It allows to correctly publish a document with images
  generated by some Babel code.
2012-10-06 19:43:32 +02:00
Nicolas Goaziou 58b42debb1 org-export: Include title, author, date and email macros
* contrib/lisp/org-export.el (org-export-expand-macro): New function.
(org-export-as): Use new function.
* lisp/org.el (org-macro-expand, org-macro-replace-all): Change
  signature.  The function now accepts an alist of templates so it
  doesn't have to rely only on `org-macro-templates'.
(org-macro-initialize-templates): {{{date}}} is not anymore an alias
for {{{time}}}.  During export, it will provide the value stored in
DATE keyword instead.
* testing/lisp/test-org-export.el: Add tests.
* testing/lisp/test-org.el: Update tests.
2012-10-06 10:29:37 +02:00
Nicolas Goaziou 0af2f6068f org-export: Fix comma escape in included files
* contrib/lisp/org-export.el (org-export-expand-include-keyword): Use
  new functions to comma escape contents of included files when in an
  example or a src block.
2012-10-06 09:19:41 +02:00
Nicolas Goaziou e5e49ea327 org-e-groff, org-e-man, org-e-texinfo: Silence byte-compiler 2012-10-04 14:48:06 +02:00
Nicolas Goaziou e4799ef25e org-export: Remove unused function declarations 2012-10-04 14:42:51 +02:00
Bastien Guerry 2e94271bd1 Merge branch 'maint' 2012-10-03 12:15:35 +02:00
Bastien Guerry 21478e1733 Revert "org-odt.el (and org-e-odt.el): Simplify the way style/schema files are found"
This reverts commit d042e3add1.
2012-10-03 12:13:47 +02:00