Commit Graph

1020 Commits

Author SHA1 Message Date
Nicolas Goaziou 3d56f56399 org-export: Internal changes to back-end definition
* contrib/lisp/org-export.el (org-export-registered-backends): New
  variable.
(org-export-define-backend, org-export-define-derived-backend): Use
new variable. Also redefine how sub-menus are defined.
(org-export-backend-filters, org-export-backend-menu,
org-export-backend-options, org-export-backend-translate-table): New
functions.
(org-export-get-environment, org-export--parse-option-keyword,
org-export--get-subtree-options, org-export--get-inbuffer-options,
org-export--get-global-options, org-export-install-filters,
org-export-with-backend): Access to data stored in new variable.
(org-export-dispatch-ui): Display sub-menus according to new
definition.
(org-export-dispatch-menu-entries): Removed variable.
* contrib/lisp/org-e-beamer.el: Use new sub-menu definition.
(org-e-beamer--format-section, org-e-beamer-item,
org-e-beamer-keyword): Use `org-export-with-backend' instead of
relying on removed variables.
* testing/lisp/test-org-export.el: Update tests.

This patch gets rid of "invisible" variables, that is variables
defvar'ed within a macro.
2012-11-13 23:25:08 +01:00
Nicolas Goaziou 6d099eedc8 org-element: Allow footnote references in table cells
* lisp/org-element.el (org-element-object-restrictions): Add footnote
  references objects in table cells.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference,
  org-e-latex-table): Add support for footnote reference in table
  cells.
2012-11-12 21:14:43 +01:00
Nicolas Goaziou aaf179fe7f org-e-publish: Fix cache invalid read syntax error
* contrib/lisp/org-e-publish.el (org-e-publish-collect-index): Do not
  store text properties from strings in the cache.  Instead focus on
  necessary data only.
(org-e-publish-index-generate-theindex): Apply changes to previous
function.
2012-11-12 00:04:07 +01:00
Thomas Dye 2eaed05e70 org-e-texinfo: Correct typo in error message
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-collect-errors):
Correct typo in error message.
2012-11-11 10:09:20 +01:00
Nicolas Goaziou 4a7d1f7b9e org-e-texinfo: Follow noexport tag specifications in menu
* contrib/lisp/org-e-texinfo.el (org-e-texinfo--sanitize-headline-contents,
  org-e-texinfo--generate-menu-list): Provide communication channel as
  as optional argument so `org-element-map' can properly skip ignored
  elements.
(org-e-texinfo--find-copying, org-e-texinfo-headline,
org-e-texinfo-make-menu, org-e-texinfo-table-column-widths): Tiny
refactoring.
2012-11-11 10:08:49 +01:00
Nicolas Goaziou b0a0511ff4 org-e-beamer: Output "\date{}" when :with-date is nil
* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Output "\date{}"
  when :with-date is nil.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Make sure output
  contains "\date{}" when date is empty.
2012-11-09 20:45:57 +01:00
Alan Schmitt 292f70ee7f org-export: Output "\date{}" in LaTeX export when :with-date is nil
* contrib/lisp/org-e-latex.el (org-e-latex-template):
  output "\date{}" instead of nothing when :with-date is nil

TINYCHANGE
2012-11-09 20:25:13 +01:00
Nicolas Goaziou c6d709d0ed org-export: Allow to toggle date insertion
* contrib/lisp/org-export.el (org-export-with-date): New variable.
(org-export-options-alist): Use new variable.
* contrib/lisp/org-e-ascii.el (org-e-ascii-template--document-title):
  Check `:with-date' property in communication channel.
* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Check
  `:with-date' property in communication channel.
* contrib/lisp/org-e-groff.el (org-e-groff--mt-head): Check
  `:with-date' property in communication channel.
(org-e-groff-date-format): Remove variable.
* contrib/lisp/org-e-html.el (org-e-html--build-meta-info,
  org-e-html--build-preamble, org-e-html--build-postamble): Check
  `:with-date' property in communication channel.
(org-e-html-format-date): Remove variable.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Check
  `:with-date' property in communication channel.
contrib/lisp/org-e-man.el: Do not redefine DATE keyword.
2012-11-09 11:04:07 +01:00
Jambunathan K 0125685553 org-e-html.el: Handle clickable images correctly
Fix bug http://permalink.gmane.org/gmane.emacs.orgmode/62197.
2012-11-09 02:03:51 +01:00
Nicolas Goaziou 359891f811 org-export: Consider colons as a safe character for targets
* contrib/lisp/org-export.el (org-export-solidify-link-text): Consider
  colons as a safe character for targets.
2012-11-08 00:36:41 +01:00
Nicolas Goaziou 1896fc352f org-e-ascii: Fix docstring
* contrib/lisp/org-e-ascii.el (org-e-ascii-format-drawer-function):
  Fix docstring.
2012-11-05 15:44:46 +01:00
Nicolas Goaziou 11c5faa7dd org-e-icalendar: Fix events duration when ending time is specified
* contrib/lisp/org-e-icalendar.el (org-e-icalendar-convert-timestamp):
  Fix events duration when ending time is specified.
2012-11-05 15:25:14 +01:00
Nicolas Goaziou 7d87ed1e4a org-e-icalendar: Remove over-zealous tasks filter
* contrib/lisp/org-e-icalendar.el (org-e-icalendar-include-todo): New
  variable.
(org-e-icalendar-with-tasks): Remove variable.
(org-e-icalendar-entry): Handle new variable.
2012-11-05 14:03:57 +01:00
Jambunathan K 7cdfa64677 org-e-odt.el: Fix broken export
Followup to commit 9751dc45.  See also,
http://comments.gmane.org/gmane.emacs.orgmode/61784
2012-11-03 19:28:02 +01:00
Nicolas Goaziou d8a3b84c93 org-export: New function to locally use another back-end
* contrib/lisp/org-export.el (org-export-with-backend): New function.
* contrib/lisp/org-e-beamer.el (org-e-beamer-link): Use new function.
2012-11-03 17:43:04 +01:00
Nicolas Goaziou 203d5123bc org-export: Fix `org-export-get-category'
* contrib/lisp/org-export.el (org-export-get-category):
  `org-entry-properties' is over-zealous when it comes to "CATEGORY"
  property.  Ignore its "???" return value, which only means it wasn't
  able to find an appropriate category.
2012-11-03 11:24:28 +01:00
Nicolas Goaziou 686cc243ee Add e-icalendar back-end
* contrib/lisp/org-e-icalendar.el: New file.
2012-11-03 00:39:46 +01:00
Nicolas Goaziou 3d1ae7b7f2 org-export: Do not push empty strings to kill ring
* contrib/lisp/org-export.el (org-export-as): Do not push empty
  strings to kill ring.
2012-11-03 00:25:13 +01:00
Nicolas Goaziou 5d4243bccc org-export: Run a hook just before expanding include keywords and macros
* contrib/lisp/org-export.el (org-export-before-processing-hook): New
  variable.
(org-export-as): Run a hook just before expanding include keywords and
macros, and evaluating Babel blocks.
* testing/lisp/test-org-export.el: Add test.
2012-11-02 14:06:50 +01:00
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