Browse Source

Move new export framework files into core

* contrib/README: Remove references to new export framework.
* contrib/lisp/org-e-ascii.el: Removed file.
* contrib/lisp/org-e-beamer.el: Removed file.
* contrib/lisp/org-e-confluence.el: Removed file.
* contrib/lisp/org-e-groff.el: Removed file.
* contrib/lisp/org-e-html.el: Removed file.
* contrib/lisp/org-e-icalendar.el: Removed file.
* contrib/lisp/org-e-latex.el: Removed file.
* contrib/lisp/org-e-man.el: Removed file.
* contrib/lisp/org-e-odt.el: Removed file.
* contrib/lisp/org-e-publish.el: Removed file.
* contrib/lisp/org-e-texinfo.el: Removed file.
* contrib/lisp/org-export.el: Removed file.
* contrib/lisp/org-koma-letter.el: Removed file.
* contrib/lisp/org-md.el: Removed file.
* contrib/lisp/ox-confluence.el: New file.
* contrib/lisp/ox-groff.el: New file.
* contrib/lisp/ox-koma-letter.el: New file.
* lisp/ox-ascii.el: New file.
* lisp/ox-beamer.el: New file.
* lisp/ox-html.el: New file.
* lisp/ox-icalendar.el: New file.
* lisp/ox-jsinfo.el: New file.
* lisp/ox-latex.el: New file.
* lisp/ox-man.el: New file.
* lisp/ox-md.el: New file.
* lisp/ox-odt.el: New file.
* lisp/ox-publish.el: New file.
* lisp/ox-texinfo.el: New file.
* lisp/ox.el: New file.
* mk/org-fixup.el (org-make-org-loaddefs): Install new export
  framework and back-end files.
* testing/lisp/test-org-export.el: Removed file.
* testing/lisp/test-ox.el: New file.
Nicolas Goaziou 5 years ago
parent
commit
8dd2bfc291

+ 0 - 16
contrib/README

@@ -27,7 +27,6 @@ org-eval.el              --- The <lisp> tag, adapted from Muse
 org-eval-light.el        --- Evaluate in-buffer code on demand
 org-exp-bibtex.el        --- Export citations to LaTeX and HTML
 org-expiry.el 	         --- Expiry mechanism for Org entries
-org-export.el            --- Generic Export Engine For Org
 org-export-generic.el    --- Export framework for configurable backends
 org-git-link.el          --- Provide org links to specific file version
 org-interactive-query.el --- Interactive modification of tags query
@@ -55,21 +54,6 @@ org-velocity.el          --- something like Notational Velocity for Org
 org-wikinodes.el         --- CamelCase wiki-like links for Org
 
 
-EXPORT ENGINE AND BACKENDS (emacs-lisp code)
-============================================
-
-org-export.el            --- the new export engine
-org-e-latex.el           --- LaTeX export backend
-org-e-ascii.el           --- ASCII export backend
-org-e-beamer.el          --- Beamer export backend
-org-e-groff.el           --- Groff export backend
-org-e-html.el            --- HTML export backend
-org-e-man.el             --- man pages export backend
-org-e-odt.el             --- ODT export backend
-org-e-texinfo.el         --- TeXinfo export backend
-org-md.el                --- MarkDown export backend
-
-
 BABEL
 =====
 library-of-babel.org     --- Documentation for the library of babel

+ 47 - 47
contrib/lisp/org-e-confluence.el

@@ -1,4 +1,4 @@
-;;; org-e-confluence --- Confluence Wiki Back-End for Org Export Engine
+;;; ox-confluence --- Confluence Wiki Back-End for Org Export Engine
 
 ;; Copyright (C) 2012 Sébastien Delafond
 
@@ -22,58 +22,58 @@
 
 ;;; Commentary:
 ;;
-;; org-confluence.el lets you convert Org files to confluence files using
-;; the org-export.el experimental engine.
+;; ox-confluence.el lets you convert Org files to confluence files
+;; using the ox.el export engine.
 ;;
 ;; Put this file into your load-path and the following into your ~/.emacs:
-;;	 (require 'org-confluence)
+;;	 (require 'ox-confluence)
 ;;
 ;; Export Org files to confluence:
-;; M-x org-e-confluence-export-as-confluence RET
+;; M-x org-confluence-export-as-confluence RET
 ;;
 ;;; Code:
 
-(require 'org-export)
-(require 'org-e-ascii)
+(require 'ox)
+(require 'ox-ascii)
 
 ;; Define the backend itself
-(org-export-define-derived-backend e-confluence e-ascii
-  :translate-alist ((bold . org-e-confluence-bold)
-                    (example-block . org-e-confluence-example-block)
-                    (fixed-width . org-e-confluence-fixed-width)
-                    (footnote-definition . org-e-confluence-empty)
-                    (footnote-reference . org-e-confluence-empty)
-                    (headline . org-e-confluence-headline)
-                    (italic . org-e-confluence-italic)
-                    (link . org-e-confluence-link)
-                    (section . org-e-confluence-section)
-                    (src-block . org-e-confluence-src-block)
-                    (strike-through . org-e-confluence-strike-through)
-                    (table . org-e-confluence-table)
-                    (table-cell . org-e-confluence-table-cell)
-                    (table-row . org-e-confluence-table-row)
-                    (template . org-e-confluence-template)
-                    (underline . org-e-confluence-underline)))
+(org-export-define-derived-backend confluence ascii
+  :translate-alist ((bold . org-confluence-bold)
+                    (example-block . org-confluence-example-block)
+                    (fixed-width . org-confluence-fixed-width)
+                    (footnote-definition . org-confluence-empty)
+                    (footnote-reference . org-confluence-empty)
+                    (headline . org-confluence-headline)
+                    (italic . org-confluence-italic)
+                    (link . org-confluence-link)
+                    (section . org-confluence-section)
+                    (src-block . org-confluence-src-block)
+                    (strike-through . org-confluence-strike-through)
+                    (table . org-confluence-table)
+                    (table-cell . org-confluence-table-cell)
+                    (table-row . org-confluence-table-row)
+                    (template . org-confluence-template)
+                    (underline . org-confluence-underline)))
 
 ;; All the functions we use
-(defun org-e-confluence-bold (bold contents info)
+(defun org-confluence-bold (bold contents info)
   (format "*%s*" contents))
 
-(defun org-e-confluence-empty (empy contents info)
+(defun org-confluence-empty (empy contents info)
   "")
 
-(defun org-e-confluence-example-block (example-block contents info)
+(defun org-confluence-example-block (example-block contents info)
   ;; FIXME: provide a user-controlled variable for theme
   (let ((content (org-export-format-code-default example-block info)))
-    (org-e-confluence--block "none" "Confluence" content)))
+    (org-confluence--block "none" "Confluence" content)))
 
-(defun org-e-confluence-italic (italic contents info)
+(defun org-confluence-italic (italic contents info)
   (format "_%s_" contents))
 
-(defun org-e-confluence-fixed-width (fixed-width contents info)
+(defun org-confluence-fixed-width (fixed-width contents info)
   (format "\{\{%s\}\}" contents))
 
-(defun org-e-confluence-headline (headline contents info)
+(defun org-confluence-headline (headline contents info)
   (let ((low-level-rank (org-export-low-level-p headline info))
         (text (org-export-data (org-element-property :title headline)
                                info))
@@ -83,7 +83,7 @@
             (if (org-string-nw-p contents) contents
               ""))))
 
-(defun org-e-confluence-link (link desc info)
+(defun org-confluence-link (link desc info)
   (let ((raw-link (org-element-property :raw-link link)))
     (concat "["
             (when (org-string-nw-p desc) (format "%s|" desc))
@@ -93,45 +93,45 @@
              (t
               raw-link))
             "]")))
-(defun org-e-confluence-section (section contents info)
+(defun org-confluence-section (section contents info)
   contents)
 
-(defun org-e-confluence-src-block (src-block contents info)
+(defun org-confluence-src-block (src-block contents info)
   ;; FIXME: provide a user-controlled variable for theme
   (let* ((lang (org-element-property :language src-block))
          (language (if (string= lang "sh") "bash" ;; FIXME: provide a mapping of some sort
                      lang))
          (content (org-export-format-code-default src-block info)))
-    (org-e-confluence--block language "Emacs" content)))
+    (org-confluence--block language "Emacs" content)))
 
-(defun org-e-confluence-strike-through (strike-through contents info)
+(defun org-confluence-strike-through (strike-through contents info)
   (format "-%s-" contents))
 
-(defun org-e-confluence-table (table contents info)
+(defun org-confluence-table (table contents info)
   contents)
 
-(defun org-e-confluence-table-row  (table-row contents info)
+(defun org-confluence-table-row  (table-row contents info)
   (concat
    (if (org-string-nw-p contents) (format "|%s" contents)
      "")
    (when (org-export-table-row-ends-header-p table-row info)
      "|")))
 
-(defun org-e-confluence-table-cell  (table-cell contents info)
+(defun org-confluence-table-cell  (table-cell contents info)
   (let ((table-row (org-export-get-parent table-cell)))
     (concat
      (when (org-export-table-row-starts-header-p table-row info)
        "|")
      contents "|")))
 
-(defun org-e-confluence-template (contents info)
+(defun org-confluence-template (contents info)
   (let ((depth (plist-get info :with-toc)))
     (concat (when depth "\{toc\}\n\n") contents)))
 
-(defun org-e-confluence-underline (underline contents info)
+(defun org-confluence-underline (underline contents info)
   (format "+%s+" contents))
 
-(defun org-e-confluence--block (language theme contents)
+(defun org-confluence--block (language theme contents)
   (concat "\{code:theme=" theme
           (when language (format "|language=%s" language))
           "}\n"
@@ -139,7 +139,7 @@
           "\{code\}\n"))
 
 ;; main interactive entrypoint
-(defun org-e-confluence-export-as-confluence
+(defun org-confluence-export-as-confluence
   (&optional async subtreep visible-only body-only ext-plist)
   "Export current buffer to a text buffer.
 
@@ -178,14 +178,14 @@ is non-nil."
 	      (insert output)
 	      (goto-char (point-min))
 	      (text-mode)
-	      (org-export-add-to-stack (current-buffer) 'e-confluence)))
-	`(org-export-as 'e-confluence ,subtreep ,visible-only ,body-only
+	      (org-export-add-to-stack (current-buffer) 'confluence)))
+	`(org-export-as 'confluence ,subtreep ,visible-only ,body-only
 			',ext-plist))
     (let ((outbuf (org-export-to-buffer
-		   'e-confluence "*Org E-Confluence Export*"
+		   'confluence "*Org E-Confluence Export*"
 		   subtreep visible-only body-only ext-plist)))
       (with-current-buffer outbuf (text-mode))
       (when org-export-show-temporary-export-buffer
 	(switch-to-buffer-other-window outbuf)))))
 
-(provide 'org-e-confluence)
+(provide 'ox-confluence)

File diff suppressed because it is too large
+ 303 - 334
contrib/lisp/org-e-groff.el


+ 10 - 9
contrib/lisp/org-koma-letter.el

@@ -1,4 +1,4 @@
-;;; org-koma-letter.el --- KOMA Scrlttr2 Back-End for Org Export Engine
+;;; ox-koma-letter.el --- KOMA Scrlttr2 Back-End for Org Export Engine
 
 ;; Copyright (C) 2007-2012  Free Software Foundation, Inc.
 
@@ -29,7 +29,7 @@
 ;; `org-koma-letter-export-to-latex' ("tex" file) and
 ;; `org-koma-letter-export-to-pdf' ("pdf" file).
 ;;
-;; On top of buffer keywords supported by `e-latex' back-end (see
+;; On top of buffer keywords supported by `latex' back-end (see
 ;; `org-e-latex-options-alist'), this back-end introduces the
 ;; following keywords: "CLOSING" (see `org-koma-letter-closing'),
 ;; "FROM_ADDRESS" (see `org-koma-letter-from-address'), "LCO" (see
@@ -42,7 +42,7 @@
 ;; `org-e-latex-classes' in order to use the KOMA Scrlttr2 class.  For
 ;; example, you can use the following code:
 ;;
-;;   (add-to-list 'org-e-latex-classes
+;;   (add-to-list 'org-latex-classes
 ;;                '("my-letter"
 ;;                  "\\documentclass\[%
 ;;   DIV=14,
@@ -65,7 +65,7 @@
 
 ;;; Code:
 
-(require 'org-e-latex)
+(require 'ox-latex)
 
 
 ;;; User-Configurable Variables
@@ -109,7 +109,7 @@
 
 ;;; Define Back-End
 
-(org-export-define-derived-backend koma-letter e-latex
+(org-export-define-derived-backend koma-letter latex
   :options-alist
   ((:closing "CLOSING" nil org-koma-letter-closing)
    (:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline)
@@ -164,7 +164,7 @@ channel."
     ;; Handle specifically BEAMER and TOC (headlines only) keywords.
     ;; Otherwise, fallback to `e-latex' back-end.
     (if (equal key "KOMA-LETTER") value
-      (org-export-with-backend 'e-latex keyword contents info))))
+      (org-export-with-backend 'latex keyword contents info))))
 
 ;;;; Template
 
@@ -213,7 +213,8 @@ holding export options."
    "\\begin{document}\n\n"
    (format "\\setkomavar{subject}{%s}\n\n"
            (org-export-data (plist-get info :title) info))
-   (format "\\begin{letter}{%%\n%s}\n\n" (or (plist-get info :to-address) "no address given"))
+   (format "\\begin{letter}{%%\n%s}\n\n"
+	   (or (plist-get info :to-address) "no address given"))
    ;; Opening.
    (format "\\opening{%s}\n\n" (plist-get info :opening))
    ;; Letter body.
@@ -365,5 +366,5 @@ Return PDF file's name."
       nil subtreep visible-only body-only ext-plist))))
 
 
-(provide 'org-koma-letter)
-;;; org-koma-letter.el ends here
+(provide 'ox-koma-letter)
+;;; ox-koma-letter.el ends here

File diff suppressed because it is too large
+ 407 - 399
contrib/lisp/org-e-ascii.el


File diff suppressed because it is too large
+ 220 - 204
contrib/lisp/org-e-beamer.el


File diff suppressed because it is too large
+ 554 - 529
contrib/lisp/org-e-html.el


+ 189 - 186
contrib/lisp/org-e-icalendar.el

@@ -1,4 +1,4 @@
-;;; org-e-icalendar.el --- iCalendar Back-End for Org Export Engine
+;;; ox-icalendar.el --- iCalendar Back-End for Org Export Engine
 
 ;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
 
@@ -26,14 +26,14 @@
 ;; exporter.
 ;;
 ;; It provides three commands for export, depending on the chosen
-;; source and desired output: `org-e-icalendar-export-to-ics' (current
-;; file), `org-e-icalendar-export-agenda-files' (agenda files into
-;; separate calendars) and `org-e-icalendar-combined-agenda-file'
+;; source and desired output: `org-icalendar-export-to-ics' (current
+;; file), `org-icalendar-export-agenda-files' (agenda files into
+;; separate calendars) and `org-icalendar-combined-agenda-file'
 ;; (agenda files into one combined calendar).
 ;;
-;; It also provides the `org-e-icalendar-export-current-agenda'
-;; function, which will create a calendar file from current agenda
-;; view.  It is meant to be called through `org-agenda-write'.
+;; It also provides `org-icalendar-export-current-agenda' function,
+;; which will create a calendar file from current agenda view.  It is
+;; meant to be called through `org-agenda-write'.
 ;;
 ;; This back-end introduces a new keyword, ICALENDAR_EXCLUDE_TAGS,
 ;; which allows to specify a different set of exclude tags from other
@@ -43,26 +43,26 @@
 
 ;;; Code:
 
-(require 'org-e-ascii)
+(require 'ox-ascii)
 (declare-function org-bbdb-anniv-export-ical "org-bbdb" nil)
 
 
 
 ;;; User-Configurable Variables
 
-(defgroup org-export-e-icalendar nil
+(defgroup org-export-icalendar nil
   "Options specific for iCalendar export back-end."
   :tag "Org iCalendar"
   :group 'org-export)
 
-(defcustom org-e-icalendar-combined-agenda-file "~/org.ics"
+(defcustom org-icalendar-combined-agenda-file "~/org.ics"
   "The file name for the iCalendar file covering all agenda files.
-This file is created with the command \\[org-e-icalendar-combine-agenda-files].
+This file is created with the command \\[org-icalendar-combine-agenda-files].
 The file name should be absolute.  It will be overwritten without warning."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type 'file)
 
-(defcustom org-e-icalendar-alarm-time 0
+(defcustom org-icalendar-alarm-time 0
   "Number of minutes for triggering an alarm for exported timed events.
 
 A zero value (the default) turns off the definition of an alarm trigger
@@ -71,36 +71,36 @@ for timed events.  If non-zero, alarms are created.
 - a single alarm per entry is defined
 - The alarm will go off N minutes before the event
 - only a DISPLAY action is defined."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :version "24.1"
   :type 'integer)
 
-(defcustom org-e-icalendar-combined-name "OrgMode"
+(defcustom org-icalendar-combined-name "OrgMode"
   "Calendar name for the combined iCalendar representing all agenda files."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type 'string)
 
-(defcustom org-e-icalendar-combined-description ""
+(defcustom org-icalendar-combined-description ""
   "Calendar description for the combined iCalendar (all agenda files)."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type 'string)
 
-(defcustom org-e-icalendar-exclude-tags nil
+(defcustom org-icalendar-exclude-tags nil
   "Tags that exclude a tree from export.
 This variable allows to specify different exclude tags from other
 back-ends.  It can also be set with the ICAL_EXCLUDE_TAGS
 keyword."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(repeat (string :tag "Tag")))
 
-(defcustom org-e-icalendar-use-deadline '(event-if-not-todo todo-due)
+(defcustom org-icalendar-use-deadline '(event-if-not-todo todo-due)
   "Contexts where iCalendar export should use a deadline time stamp.
 
 This is a list with several symbols in it.  Valid symbol are:
 `event-if-todo'       Deadlines in TODO entries become calendar events.
 `event-if-not-todo'   Deadlines in non-TODO entries become calendar events.
 `todo-due'            Use deadlines in TODO entries as due-dates"
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(set :greedy t
 	      (const :tag "Deadlines in non-TODO entries become events"
 		     event-if-not-todo)
@@ -109,7 +109,7 @@ This is a list with several symbols in it.  Valid symbol are:
 	      (const :tag "Deadlines in TODO entries become due-dates"
 		     todo-due)))
 
-(defcustom org-e-icalendar-use-scheduled '(todo-start)
+(defcustom org-icalendar-use-scheduled '(todo-start)
   "Contexts where iCalendar export should use a scheduling time stamp.
 
 This is a list with several symbols in it.  Valid symbol are:
@@ -118,7 +118,7 @@ This is a list with several symbols in it.  Valid symbol are:
 `todo-start'          Scheduling time stamps in TODO entries become start date.
                       Some calendar applications show TODO entries only after
                       that date."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(set :greedy t
 	      (const :tag
 		     "SCHEDULED timestamps in non-TODO entries become events"
@@ -128,7 +128,7 @@ This is a list with several symbols in it.  Valid symbol are:
 	      (const :tag "SCHEDULED in TODO entries become start date"
 		     todo-start)))
 
-(defcustom org-e-icalendar-categories '(local-tags category)
+(defcustom org-icalendar-categories '(local-tags category)
   "Items that should be entered into the \"categories\" field.
 
 This is a list of symbols, the following are valid:
@@ -136,7 +136,7 @@ This is a list of symbols, the following are valid:
 `todo-state'  The todo state, if any
 `local-tags'  The tags, defined in the current line
 `all-tags'    All tags, including inherited ones."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(repeat
 	  (choice
 	   (const :tag "The file or tree category" category)
@@ -144,7 +144,7 @@ This is a list of symbols, the following are valid:
 	   (const :tag "Tags defined in current line" local-tags)
 	   (const :tag "All tags, including inherited ones" all-tags))))
 
-(defcustom org-e-icalendar-with-timestamps 'active
+(defcustom org-icalendar-with-timestamps 'active
   "Non-nil means make an event from plain time stamps.
 
 It can be set to `active', `inactive', t or nil, in order to make
@@ -153,14 +153,14 @@ inactive ones, all of them or none.
 
 This variable has precedence over `org-export-with-timestamps'.
 It can also be set with the #+OPTIONS line, e.g. \"<:t\"."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(choice
 	  (const :tag "All timestamps" t)
 	  (const :tag "Only active timestamps" active)
 	  (const :tag "Only inactive timestamps" inactive)
 	  (const :tag "No timestamp" nil)))
 
-(defcustom org-e-icalendar-include-todo nil
+(defcustom org-icalendar-include-todo nil
   "Non-nil means create VTODO components from TODO items.
 
 Valid values are:
@@ -168,7 +168,7 @@ nil                  don't include any task.
 t                    include tasks that are not in DONE state.
 `unblocked'          include all TODO items that are not blocked.
 `all'                include both done and not done items."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(choice
 	  (const :tag "None" nil)
 	  (const :tag "Unfinished" t)
@@ -177,31 +177,31 @@ t                    include tasks that are not in DONE state.
 	  (repeat :tag "Specific TODO keywords"
 		  (string :tag "Keyword"))))
 
-(defcustom org-e-icalendar-include-bbdb-anniversaries nil
+(defcustom org-icalendar-include-bbdb-anniversaries nil
   "Non-nil means a combined iCalendar file should include anniversaries.
 The anniversaries are defined in the BBDB database."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type 'boolean)
 
-(defcustom org-e-icalendar-include-sexps t
+(defcustom org-icalendar-include-sexps t
   "Non-nil means export to iCalendar files should also cover sexp entries.
 These are entries like in the diary, but directly in an Org mode
 file."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type 'boolean)
 
-(defcustom org-e-icalendar-include-body t
+(defcustom org-icalendar-include-body t
   "Amount of text below headline to be included in iCalendar export.
 This is a number of characters that should maximally be included.
 Properties, scheduling and clocking lines will always be removed.
 The text will be inserted into the DESCRIPTION field."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(choice
 	  (const :tag "Nothing" nil)
 	  (const :tag "Everything" t)
 	  (integer :tag "Max characters")))
 
-(defcustom org-e-icalendar-store-UID nil
+(defcustom org-icalendar-store-UID nil
   "Non-nil means store any created UIDs in properties.
 
 The iCalendar standard requires that all entries have a unique identifier.
@@ -214,29 +214,29 @@ synchronization services.
 This variable is not turned on by default because we want to avoid creating
 a property drawer in every entry if people are only playing with this feature,
 or if they are only using it locally."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type 'boolean)
 
-(defcustom org-e-icalendar-timezone (getenv "TZ")
+(defcustom org-icalendar-timezone (getenv "TZ")
   "The time zone string for iCalendar export.
 When nil or the empty string, use output
 from (current-time-zone)."
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :type '(choice
 	  (const :tag "Unspecified" nil)
 	  (string :tag "Time zone")))
 
-(defcustom org-e-icalendar-date-time-format ":%Y%m%dT%H%M%S"
+(defcustom org-icalendar-date-time-format ":%Y%m%dT%H%M%S"
   "Format-string for exporting icalendar DATE-TIME.
 
 See `format-time-string' for a full documentation.  The only
-difference is that `org-e-icalendar-timezone' is used for %Z.
+difference is that `org-icalendar-timezone' is used for %Z.
 
 Interesting value are:
  - \":%Y%m%dT%H%M%S\" for local time
  - \";TZID=%Z:%Y%m%dT%H%M%S\" for local time with explicit timezone
  - \":%Y%m%dT%H%M%SZ\" for time expressed in Universal Time"
-  :group 'org-export-e-icalendar
+  :group 'org-export-icalendar
   :version "24.1"
   :type '(choice
 	  (const :tag "Local time" ":%Y%m%dT%H%M%S")
@@ -244,7 +244,7 @@ Interesting value are:
 	  (const :tag "Universal time" ":%Y%m%dT%H%M%SZ")
 	  (string :tag "Explicit format")))
 
-(defvar org-e-icalendar-after-save-hook nil
+(defvar org-icalendar-after-save-hook nil
   "Hook run after an iCalendar file has been saved.
 This hook is run with the name of the file as argument.  A good
 way to use this is to tell a desktop calendar application to
@@ -254,37 +254,37 @@ re-read the iCalendar file.")
 
 ;;; Define Back-End
 
-(org-export-define-derived-backend e-icalendar e-ascii
+(org-export-define-derived-backend icalendar ascii
   :translate-alist ((clock . ignore)
-		    (headline . org-e-icalendar-entry)
+		    (headline . org-icalendar-entry)
 		    (inlinetask . ignore)
 		    (planning . ignore)
 		    (section . ignore)
-		    (template . org-e-icalendar-template))
+		    (template . org-icalendar-template))
   :options-alist
   ((:exclude-tags
-    "ICALENDAR_EXCLUDE_TAGS" nil org-e-icalendar-exclude-tags split)
-   (:with-timestamps nil "<" org-e-icalendar-with-timestamps)
-   (:with-vtodo nil nil org-e-icalendar-include-todo)
+    "ICALENDAR_EXCLUDE_TAGS" nil org-icalendar-exclude-tags split)
+   (:with-timestamps nil "<" org-icalendar-with-timestamps)
+   (:with-vtodo nil nil org-icalendar-include-todo)
    ;; The following property will be non-nil when export has been
    ;; started from org-agenda-mode.  In this case, any entry without
    ;; a non-nil "ICALENDAR_MARK" property will be ignored.
    (:icalendar-agenda-view nil nil nil))
   :filters-alist
-  ((:filter-headline . org-e-icalendar-clear-blank-lines))
+  ((:filter-headline . org-icalendar-clear-blank-lines))
   :menu-entry
   (?c "Export to iCalendar"
-      ((?f "Current file" org-e-icalendar-export-to-ics)
+      ((?f "Current file" org-icalendar-export-to-ics)
        (?a "All agenda files"
-	   (lambda (a s v b) (org-e-icalendar-export-agenda-files a)))
+	   (lambda (a s v b) (org-icalendar-export-agenda-files a)))
        (?c "Combine all agenda files"
-	   (lambda (a s v b) (org-e-icalendar-combine-agenda-files a))))))
+	   (lambda (a s v b) (org-icalendar-combine-agenda-files a))))))
 
 
 
 ;;; Internal Functions
 
-(defun org-e-icalendar-create-uid (file &optional bell)
+(defun org-icalendar-create-uid (file &optional bell)
   "Set ID property on headlines missing it in FILE.
 When optional argument BELL is non-nil, inform the user with
 a message if the file was modified."
@@ -303,7 +303,7 @@ a message if the file was modified."
       (message "ID properties created in file \"%s\"" file)
       (sit-for 2))))
 
-(defun org-e-icalendar-blocked-headline-p (headline info)
+(defun org-icalendar-blocked-headline-p (headline info)
   "Non-nil when HEADLINE is considered to be blocked.
 
 INFO is a plist used as a communication channel.
@@ -319,10 +319,9 @@ An headline is blocked when either:
     done first or is a child of a blocked grandparent entry."
   (or
    ;; Check if any child is not done.
-   (org-element-map
-    headline 'headline
-    (lambda (hl) (eq (org-element-property :todo-type hl) 'todo))
-    info 'first-match)
+   (org-element-map headline 'headline
+     (lambda (hl) (eq (org-element-property :todo-type hl) 'todo))
+     info 'first-match)
    ;; Check :ORDERED: node property.
    (catch 'blockedp
      (let ((current headline))
@@ -340,13 +339,13 @@ An headline is blocked when either:
 	     (org-export-get-genealogy headline))
        nil))))
 
-(defun org-e-icalendar-use-UTC-date-time-p ()
-  "Non-nil when `org-e-icalendar-date-time-format' requires UTC time."
-  (char-equal (elt org-e-icalendar-date-time-format
-		   (1- (length org-e-icalendar-date-time-format))) ?Z))
+(defun org-icalendar-use-UTC-date-time-p ()
+  "Non-nil when `org-icalendar-date-time-format' requires UTC time."
+  (char-equal (elt org-icalendar-date-time-format
+		   (1- (length org-icalendar-date-time-format))) ?Z))
 
 (defvar org-agenda-default-appointment-duration) ; From org-agenda.el.
-(defun org-e-icalendar-convert-timestamp (timestamp keyword &optional end utc)
+(defun org-icalendar-convert-timestamp (timestamp keyword &optional end utc)
   "Convert TIMESTAMP to iCalendar format.
 
 TIMESTAMP is a timestamp object.  KEYWORD is added in front of
@@ -358,7 +357,7 @@ or the day by one (if it does not contain a time) when no
 explicit ending time is specified.
 
 When optional argument UTC is non-nil, time will be expressed in
-Universal Time, ignoring `org-e-icalendar-date-time-format'.
+Universal Time, ignoring `org-icalendar-date-time-format'.
 This is mandatory for \"DTSTAMP\" property."
   (let* ((year-start (org-element-property :year-start timestamp))
 	 (year-end (org-element-property :year-end timestamp))
@@ -396,16 +395,16 @@ This is mandatory for \"DTSTAMP\" property."
       (cond (utc ":%Y%m%dT%H%M%SZ")
 	    ((not with-time-p) ";VALUE=DATE:%Y%m%d")
 	    (t (replace-regexp-in-string "%Z"
-					 org-e-icalendar-timezone
-					 org-e-icalendar-date-time-format
+					 org-icalendar-timezone
+					 org-icalendar-date-time-format
 					 t)))
       ;; Convert timestamp into internal time in order to use
       ;; `format-time-string' and fix any mistake (i.e. MI >= 60).
       (encode-time 0 mi h d m y)
-      (or utc (and with-time-p (org-e-icalendar-use-UTC-date-time-p)))))))
+      (or utc (and with-time-p (org-icalendar-use-UTC-date-time-p)))))))
 
-(defun org-e-icalendar-get-categories (entry info)
-  "Return categories according to `org-e-icalendar-categories'.
+(defun org-icalendar-get-categories (entry info)
+  "Return categories according to `org-icalendar-categories'.
 ENTRY is an headline or an inlinetask element.  INFO is a plist
 used as a communication channel."
   (mapconcat
@@ -427,11 +426,11 @@ used as a communication channel."
 		 (setq categories
 		       (append (nreverse (org-export-get-tags entry info nil t))
 			       categories)))))
-	    org-e-icalendar-categories)
+	    org-icalendar-categories)
       ;; Return list of categories, following specified order.
       (nreverse categories))) ","))
 
-(defun org-e-icalendar-transcode-diary-sexp (sexp uid summary)
+(defun org-icalendar-transcode-diary-sexp (sexp uid summary)
   "Transcode a diary sexp into iCalendar format.
 SEXP is the diary sexp being transcoded, as a string.  UID is the
 unique identifier for the entry.  SUMMARY defines a short summary
@@ -445,7 +444,7 @@ or subject for the event."
 	 (insert sexp "\n"))
        (org-diary-to-ical-string (current-buffer))))))
 
-(defun org-e-icalendar-cleanup-string (s)
+(defun org-icalendar-cleanup-string (s)
   "Cleanup string S according to RFC 5545."
   (when s
     ;; Protect "\", "," and ";" characters. and replace newline
@@ -455,7 +454,7 @@ or subject for the event."
      (replace-regexp-in-string "[\\,;]" "\\\&" s)
      nil t)))
 
-(defun org-e-icalendar-fold-string (s)
+(defun org-icalendar-fold-string (s)
   "Fold string S according to RFC 5545."
   (org-element-normalize-string
    (mapconcat
@@ -481,7 +480,7 @@ or subject for the event."
 
 ;;; Filters
 
-(defun org-e-icalendar-clear-blank-lines (headline back-end info)
+(defun org-icalendar-clear-blank-lines (headline back-end info)
   "Remove trailing blank lines in HEADLINE export.
 HEADLINE is a string representing a transcoded headline.
 BACK-END and INFO are ignored."
@@ -493,16 +492,16 @@ BACK-END and INFO are ignored."
 
 ;;;; Headline and Inlinetasks
 
-;; The main function is `org-e-icalendar-entry', which extracts
+;; The main function is `org-icalendar-entry', which extracts
 ;; information from an headline or an inlinetask (summary,
 ;; description...) and then delegates code generation to
-;; `org-e-icalendar--vtodo' and `org-e-icalendar--vevent', depending
+;; `org-icalendar--vtodo' and `org-icalendar--vevent', depending
 ;; on the component needed.
 
-;; Obviously, `org-e-icalendar--valarm' handles alarms, which can
+;; Obviously, `org-icalendar--valarm' handles alarms, which can
 ;; happen within a VTODO component.
 
-(defun org-e-icalendar-entry (entry contents info)
+(defun org-icalendar-entry (entry contents info)
   "Transcode ENTRY element into iCalendar format.
 
 ENTRY is either an headline or an inlinetask.  CONTENTS is
@@ -530,43 +529,43 @@ inlinetask within the section."
 		    (not (org-element-property :icalendar-mark entry)))
 	 (let ((todo-type (org-element-property :todo-type entry))
 	       (uid (or (org-element-property :id entry) (org-id-new)))
-	       (summary (org-e-icalendar-cleanup-string
+	       (summary (org-icalendar-cleanup-string
 			 (or (org-element-property :summary entry)
 			     (org-export-data
 			      (org-element-property :title entry) info))))
-	       (loc (org-e-icalendar-cleanup-string
+	       (loc (org-icalendar-cleanup-string
 		     (org-element-property :location entry)))
 	       ;; Build description of the entry from associated
 	       ;; section (headline) or contents (inlinetask).
 	       (desc
-		(org-e-icalendar-cleanup-string
+		(org-icalendar-cleanup-string
 		 (or (org-element-property :description entry)
 		     (let ((contents (org-export-data inside info)))
 		       (cond
 			((not (org-string-nw-p contents)) nil)
-			((wholenump org-e-icalendar-include-body)
+			((wholenump org-icalendar-include-body)
 			 (let ((contents (org-trim contents)))
 			   (substring
 			    contents 0 (min (length contents)
-					    org-e-icalendar-include-body))))
-			(org-e-icalendar-include-body (org-trim contents)))))))
-	       (cat (org-e-icalendar-get-categories entry info)))
+					    org-icalendar-include-body))))
+			(org-icalendar-include-body (org-trim contents)))))))
+	       (cat (org-icalendar-get-categories entry info)))
 	   (concat
-	    ;; Events: Delegate to `org-e-icalendar--vevent' to
+	    ;; Events: Delegate to `org-icalendar--vevent' to
 	    ;; generate "VEVENT" component from scheduled, deadline,
 	    ;; or any timestamp in the entry.
 	    (let ((deadline (org-element-property :deadline entry)))
 	      (and deadline
 		   (memq (if todo-type 'event-if-todo 'event-if-not-todo)
-			 org-e-icalendar-use-deadline)
-		   (org-e-icalendar--vevent
+			 org-icalendar-use-deadline)
+		   (org-icalendar--vevent
 		    entry deadline (concat "DL-" uid)
 		    (concat "DL: " summary) loc desc cat)))
 	    (let ((scheduled (org-element-property :scheduled entry)))
 	      (and scheduled
 		   (memq (if todo-type 'event-if-todo 'event-if-not-todo)
-			 org-e-icalendar-use-scheduled)
-		   (org-e-icalendar--vevent
+			 org-icalendar-use-scheduled)
+		   (org-icalendar--vevent
 		    entry scheduled (concat "SC-" uid)
 		    (concat "S: " summary) loc desc cat)))
 	    ;; When collecting plain timestamps from an headline and
@@ -575,58 +574,56 @@ inlinetask within the section."
 	    (let ((counter 0))
 	      (mapconcat
 	       'identity
-	       (org-element-map
-		(cons (org-element-property :title entry)
-		      (org-element-contents inside))
-		'timestamp
-		(lambda (ts)
-		  (let ((uid (format "TS%d-%s" (incf counter) uid)))
-		    (org-e-icalendar--vevent entry ts uid summary loc desc cat)))
-		info nil (and (eq type 'headline) 'inlinetask))
+	       (org-element-map (cons (org-element-property :title entry)
+				      (org-element-contents inside))
+		   'timestamp
+		 (lambda (ts)
+		   (let ((uid (format "TS%d-%s" (incf counter) uid)))
+		     (org-icalendar--vevent entry ts uid summary loc desc cat)))
+		 info nil (and (eq type 'headline) 'inlinetask))
 	       ""))
 	    ;; Task: First check if it is appropriate to export it.
-	    ;; If so, call `org-e-icalendar--vtodo' to transcode it
+	    ;; If so, call `org-icalendar--vtodo' to transcode it
 	    ;; into a "VTODO" component.
 	    (when (and todo-type
 		       (case (plist-get info :with-vtodo)
 			 (all t)
 			 (unblocked
 			  (and (eq type 'headline)
-			       (not (org-e-icalendar-blocked-headline-p
+			       (not (org-icalendar-blocked-headline-p
 				     entry info))))
 			 ('t (eq todo-type 'todo))))
-	      (org-e-icalendar--vtodo entry uid summary loc desc cat))
+	      (org-icalendar--vtodo entry uid summary loc desc cat))
 	    ;; Diary-sexp: Collect every diary-sexp element within
 	    ;; ENTRY and its title, and transcode them.  If ENTRY is
 	    ;; an headline, skip inlinetasks: they will be handled
 	    ;; separately.
-	    (when org-e-icalendar-include-sexps
+	    (when org-icalendar-include-sexps
 	      (let ((counter 0))
 		(mapconcat 'identity
 			   (org-element-map
-			    (cons (org-element-property :title entry)
-				  (org-element-contents inside))
-			    'diary-sexp
-			    (lambda (sexp)
-			      (org-e-icalendar-transcode-diary-sexp
-			       (org-element-property :value sexp)
-			       (format "DS%d-%s" (incf counter) uid)
-			       summary))
-			    info nil (and (eq type 'headline) 'inlinetask))
+			       (cons (org-element-property :title entry)
+				     (org-element-contents inside))
+			       'diary-sexp
+			     (lambda (sexp)
+			       (org-icalendar-transcode-diary-sexp
+				(org-element-property :value sexp)
+				(format "DS%d-%s" (incf counter) uid)
+				summary))
+			     info nil (and (eq type 'headline) 'inlinetask))
 			   ""))))))
        ;; If ENTRY is an headline, call current function on every
        ;; inlinetask within it.  In agenda export, this is independent
        ;; from the mark (or lack thereof) on the entry.
        (when (eq type 'headline)
 	 (mapconcat 'identity
-		    (org-element-map
-		     inside 'inlinetask
-		     (lambda (task) (org-e-icalendar-entry task nil info))
-		     info) ""))
+		    (org-element-map inside 'inlinetask
+		      (lambda (task) (org-icalendar-entry task nil info))
+		      info) ""))
        ;; Don't forget components from inner entries.
        contents))))
 
-(defun org-e-icalendar--vevent
+(defun org-icalendar--vevent
   (entry timestamp uid summary location description categories)
   "Create a VEVENT component.
 
@@ -639,15 +636,15 @@ description of the event.  CATEGORIES defines the categories the
 event belongs to.
 
 Return VEVENT component as a string."
-  (org-e-icalendar-fold-string
+  (org-icalendar-fold-string
    (if (eq (org-element-property :type timestamp) 'diary)
-       (org-e-icalendar-transcode-diary-sexp
+       (org-icalendar-transcode-diary-sexp
 	(org-element-property :raw-value timestamp) uid summary)
      (concat "BEGIN:VEVENT\n"
-	     (org-e-icalendar-convert-timestamp timestamp "DTSTAMP" nil t) "\n"
+	     (org-icalendar-convert-timestamp timestamp "DTSTAMP" nil t) "\n"
 	     "UID:" uid "\n"
-	     (org-e-icalendar-convert-timestamp timestamp "DTSTART") "\n"
-	     (org-e-icalendar-convert-timestamp timestamp "DTEND" t) "\n"
+	     (org-icalendar-convert-timestamp timestamp "DTSTART") "\n"
+	     (org-icalendar-convert-timestamp timestamp "DTEND" t) "\n"
 	     ;; RRULE.
 	     (when (org-element-property :repeater-type timestamp)
 	       (format "RRULE:FREQ=%s;INTERVAL=%d\n"
@@ -661,10 +658,10 @@ Return VEVENT component as a string."
 		  (format "DESCRIPTION:%s\n" description))
 	     "CATEGORIES:" categories "\n"
 	     ;; VALARM.
-	     (org-e-icalendar--valarm entry timestamp summary)
+	     (org-icalendar--valarm entry timestamp summary)
 	     "END:VEVENT"))))
 
-(defun org-e-icalendar--vtodo
+(defun org-icalendar--vtodo
   (entry uid summary location description categories)
   "Create a VTODO component.
 
@@ -675,7 +672,7 @@ the task.  DESCRIPTION provides the complete description of the
 task.  CATEGORIES defines the categories the task belongs to.
 
 Return VTODO component as a string."
-  (let ((start (or (and (memq 'todo-start org-e-icalendar-use-scheduled)
+  (let ((start (or (and (memq 'todo-start org-icalendar-use-scheduled)
 			(org-element-property :scheduled entry))
 		   ;; If we can't use a scheduled time for some
 		   ;; reason, start task now.
@@ -687,14 +684,14 @@ Return VTODO component as a string."
 				 :day-start (nth 3 now)
 				 :month-start (nth 4 now)
 				 :year-start (nth 5 now)))))))
-    (org-e-icalendar-fold-string
+    (org-icalendar-fold-string
      (concat "BEGIN:VTODO\n"
 	     "UID:TODO-" uid "\n"
-	     (org-e-icalendar-convert-timestamp start "DTSTAMP" nil t) "\n"
-	     (org-e-icalendar-convert-timestamp start "DTSTART") "\n"
-	     (and (memq 'todo-due org-e-icalendar-use-deadline)
+	     (org-icalendar-convert-timestamp start "DTSTAMP" nil t) "\n"
+	     (org-icalendar-convert-timestamp start "DTSTART") "\n"
+	     (and (memq 'todo-due org-icalendar-use-deadline)
 		  (org-element-property :deadline entry)
-		  (concat (org-e-icalendar-convert-timestamp
+		  (concat (org-icalendar-convert-timestamp
 			   (org-element-property :deadline entry) "DUE")
 			  "\n"))
 	     "SUMMARY:" summary "\n"
@@ -715,7 +712,7 @@ Return VTODO component as a string."
 		       "COMPLETED"))
 	     "END:VTODO"))))
 
-(defun org-e-icalendar--valarm (entry timestamp summary)
+(defun org-icalendar--valarm (entry timestamp summary)
   "Create a VALARM component.
 
 ENTRY is the calendar entry triggering the alarm.  TIMESTAMP is
@@ -733,7 +730,7 @@ Return VALARM component as a string, or nil if it isn't allowed."
 	 (let ((warntime
 		(org-element-property :appt-warntime entry)))
 	   (if warntime (string-to-number warntime) 0))))
-    (and (or (> alarm-time 0) (> org-e-icalendar-alarm-time 0))
+    (and (or (> alarm-time 0) (> org-icalendar-alarm-time 0))
 	 (org-element-property :hour-start timestamp)
 	 (format "BEGIN:VALARM
 ACTION:DISPLAY
@@ -741,16 +738,16 @@ DESCRIPTION:%s
 TRIGGER:-P0DT0H%dM0S
 END:VALARM\n"
 		 summary
-		 (if (zerop alarm-time) org-e-icalendar-alarm-time alarm-time)))))
+		 (if (zerop alarm-time) org-icalendar-alarm-time alarm-time)))))
 
 
 ;;;; Template
 
-(defun org-e-icalendar-template (contents info)
+(defun org-icalendar-template (contents info)
   "Return complete document string after iCalendar conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist used
 as a communication channel."
-  (org-e-icalendar--vcalendar
+  (org-icalendar--vcalendar
    ;; Name.
    (if (not (plist-get info :input-file)) (buffer-name (buffer-base-buffer))
      (file-name-nondirectory
@@ -759,13 +756,13 @@ as a communication channel."
    (if (not (plist-get info :with-author)) ""
      (org-export-data (plist-get info :author) info))
    ;; Timezone.
-   (if (org-string-nw-p org-e-icalendar-timezone) org-e-icalendar-timezone
+   (if (org-string-nw-p org-icalendar-timezone) org-icalendar-timezone
      (cadr (current-time-zone)))
    ;; Description.
    (org-export-data (plist-get info :title) info)
    contents))
 
-(defun org-e-icalendar--vcalendar (name owner tz description contents)
+(defun org-icalendar--vcalendar (name owner tz description contents)
   "Create a VCALENDAR component.
 NAME, OWNER, TZ, DESCRIPTION and CONTENTS are all strings giving,
 respectively, the name of the calendar, its owner, the timezone
@@ -777,10 +774,10 @@ PRODID:-//%s//Emacs with Org mode//EN
 X-WR-TIMEZONE:%s
 X-WR-CALDESC:%s
 CALSCALE:GREGORIAN\n"
-		  (org-e-icalendar-cleanup-string name)
-		  (org-e-icalendar-cleanup-string owner)
-		  (org-e-icalendar-cleanup-string tz)
-		  (org-e-icalendar-cleanup-string description))
+		  (org-icalendar-cleanup-string name)
+		  (org-icalendar-cleanup-string owner)
+		  (org-icalendar-cleanup-string tz)
+		  (org-icalendar-cleanup-string description))
 	  contents
 	  "END:VCALENDAR\n"))
 
@@ -789,7 +786,7 @@ CALSCALE:GREGORIAN\n"
 ;;; Interactive Functions
 
 ;;;###autoload
-(defun org-e-icalendar-export-to-ics
+(defun org-icalendar-export-to-ics
   (&optional async subtreep visible-only body-only)
   "Export current buffer to an iCalendar file.
 
@@ -815,29 +812,29 @@ between \"BEGIN:VCALENDAR\" and \"END:VCALENDAR\".
 Return ICS file name."
   (interactive)
   (let ((file (buffer-file-name (buffer-base-buffer))))
-    (when (and file org-e-icalendar-store-UID)
-      (org-e-icalendar-create-uid file 'warn-user)))
+    (when (and file org-icalendar-store-UID)
+      (org-icalendar-create-uid file 'warn-user)))
   ;; Export part.  Since this back-end is backed up by `e-ascii',
   ;; ensure links will not be collected at the end of sections.
   (let ((outfile (org-export-output-file-name ".ics" subtreep)))
     (if async
 	(org-export-async-start
 	    (lambda (f)
-	      (org-export-add-to-stack f 'e-icalendar)
-	      (run-hook-with-args 'org-e-icalendar-after-save-hook f))
-	  `(let ((org-e-ascii-links-to-notes nil))
+	      (org-export-add-to-stack f 'icalendar)
+	      (run-hook-with-args 'org-icalendar-after-save-hook f))
+	  `(let ((org-ascii-links-to-notes nil))
 	     (expand-file-name
 	      (org-export-to-file
-	       'e-icalendar ,outfile ,subtreep ,visible-only ,body-only
+	       'icalendar ,outfile ,subtreep ,visible-only ,body-only
 	       '(:ascii-charset utf-8)))))
-      (let ((org-e-ascii-links-to-notes nil))
-	(org-export-to-file 'e-icalendar outfile subtreep visible-only body-only
+      (let ((org-ascii-links-to-notes nil))
+	(org-export-to-file 'icalendar outfile subtreep visible-only body-only
 			    '(:ascii-charset utf-8)))
-      (run-hook-with-args 'org-e-icalendar-after-save-hook outfile)
+      (run-hook-with-args 'org-icalendar-after-save-hook outfile)
       outfile)))
 
 ;;;###autoload
-(defun org-e-icalendar-export-agenda-files (&optional async)
+(defun org-icalendar-export-agenda-files (&optional async)
   "Export all agenda files to iCalendar files.
 When optional argument ASYNC is non-nil, export happens in an
 external process."
@@ -854,7 +851,7 @@ external process."
 	  `(let (output-files)
 	     (mapc (lambda (file)
 		     (with-current-buffer (org-get-agenda-file-buffer file)
-		       (push (expand-file-name (org-e-icalendar-export-to-ics))
+		       (push (expand-file-name (org-icalendar-export-to-ics))
 			     output-files)))
 		   ',files)
 	     output-files)))
@@ -865,12 +862,12 @@ external process."
 		  (catch 'nextfile
 		    (org-check-agenda-file file)
 		    (with-current-buffer (org-get-agenda-file-buffer file)
-		      (org-e-icalendar-export-to-ics))))
+		      (org-icalendar-export-to-ics))))
 		files)
 	(org-release-buffers org-agenda-new-buffers)))))
 
 ;;;###autoload
-(defun org-e-icalendar-combine-agenda-files (&optional async)
+(defun org-icalendar-combine-agenda-files (&optional async)
   "Combine all agenda files into a single iCalendar file.
 
 A non-nil optional argument ASYNC means the process should happen
@@ -878,28 +875,30 @@ asynchronously.  The resulting file should be accessible through
 the `org-export-stack' interface.
 
 The file is stored under the name chosen in
-`org-e-icalendar-combined-agenda-file'."
+`org-icalendar-combined-agenda-file'."
   (interactive)
   (if async
       (let ((files (org-remove-if-not 'file-exists-p (org-agenda-files t))))
 	(org-export-async-start
 	    (lambda (dummy)
 	      (org-export-add-to-stack
-	       (expand-file-name org-e-icalendar-combined-agenda-file)
-	       'e-icalendar))
-	  `(apply 'org-e-icalendar--combine-files nil ',files)))
-    (apply 'org-e-icalendar--combine-files nil (org-agenda-files t))))
-
-(defun org-e-icalendar-export-current-agenda ()
-  "Export current agenda view to an iCalendar file.
-The file is stored under the name
-`org-e-icalendar-combined-agenda-file'.  This function assumes
-major mode for current buffer is `org-agenda-mode'."
-  (apply 'org-e-icalendar--combine-files
-	 (org-create-marker-find-array (org-agenda-collect-markers))
-	 (org-agenda-files nil 'ifmode)))
-
-(defun org-e-icalendar--combine-files (restriction &rest files)
+	       (expand-file-name org-icalendar-combined-agenda-file)
+	       'icalendar))
+	  `(apply 'org-icalendar--combine-files nil ',files)))
+    (apply 'org-icalendar--combine-files nil (org-agenda-files t))))
+
+(declare-function org-agenda-collect-markers "org-agenda" ())
+(declare-function org-create-marker-find-array "org-agenda" (marker-list))
+(defun org-icalendar-export-current-agenda (file)
+  "Export current agenda view to an iCalendar FILE.
+This function assumes major mode for current buffer is
+`org-agenda-mode'."
+  (let ((org-icalendar-combined-agenda-file file))
+    (apply 'org-icalendar--combine-files
+	   (org-create-marker-find-array (org-agenda-collect-markers))
+	   (org-agenda-files nil 'ifmode))))
+
+(defun org-icalendar--combine-files (restriction &rest files)
   "Combine entries from multiple files into an iCalendar file.
 RESTRICTION, when non-nil, is an alist where key is a file name
 and value a list of buffer positions pointing to entries that
@@ -909,19 +908,19 @@ files to build the calendar from."
   (org-agenda-prepare-buffers files)
   (unwind-protect
       (progn
-	(with-temp-file org-e-icalendar-combined-agenda-file
+	(with-temp-file org-icalendar-combined-agenda-file
 	  (insert
-	   (org-e-icalendar--vcalendar
+	   (org-icalendar--vcalendar
 	    ;; Name.
-	    org-e-icalendar-combined-name
+	    org-icalendar-combined-name
 	    ;; Owner.
 	    user-full-name
 	    ;; Timezone.
-	    (if (org-string-nw-p org-e-icalendar-timezone)
-		org-e-icalendar-timezone
+	    (if (org-string-nw-p org-icalendar-timezone)
+		org-icalendar-timezone
 	      (cadr (current-time-zone)))
 	    ;; Description.
-	    org-e-icalendar-combined-description
+	    org-icalendar-combined-description
 	    ;; Contents.
 	    (concat
 	     ;; Agenda contents.
@@ -931,8 +930,8 @@ files to build the calendar from."
 		  (org-check-agenda-file file)
 		  (with-current-buffer (org-get-agenda-file-buffer file)
 		    ;; Create ID if necessary.
-		    (when org-e-icalendar-store-UID
-		      (org-e-icalendar-create-uid file))
+		    (when org-icalendar-store-UID
+		      (org-icalendar-create-uid file))
 		    (let ((marks (cdr (assoc (expand-file-name file)
 					     restriction))))
 		      (unless (and restriction (not marks))
@@ -950,21 +949,25 @@ files to build the calendar from."
 				      (sort marks '>))
 				     org-export-before-processing-hook)))
 			  (org-export-as
-			   'e-icalendar nil nil t
+			   'icalendar nil nil t
 			   (list :ascii-charset 'utf-8
 				 :icalendar-agenda-view restriction))))))))
 	      files "")
 	     ;; BBDB anniversaries.
-	     (when (and org-e-icalendar-include-bbdb-anniversaries
+	     (when (and org-icalendar-include-bbdb-anniversaries
 			(require 'org-bbdb nil t))
 	       (with-temp-buffer
 		 (org-bbdb-anniv-export-ical)
 		 (buffer-string)))))))
-	(run-hook-with-args 'org-e-icalendar-after-save-hook
-			    org-e-icalendar-combined-agenda-file))
+	(run-hook-with-args 'org-icalendar-after-save-hook
+			    org-icalendar-combined-agenda-file))
     (org-release-buffers org-agenda-new-buffers)))
 
 
-(provide 'org-e-icalendar)
+(provide 'ox-icalendar)
 
-;;; org-e-icalendar.el ends here
+;; Local variables:
+;; generated-autoload-file: "org-loaddefs.el"
+;; End:
+
+;;; ox-icalendar.el ends here

+ 260 - 0
lisp/ox-jsinfo.el

@@ -0,0 +1,260 @@
+;;; ox-jsinfo.el --- Org HTML Export Extension for org-info.js
+
+;; Copyright (C) 2004-2013 Free Software Foundation, Inc.
+
+;; Author: Carsten Dominik <carsten at orgmode dot org>
+;; Keywords: outlines, hypermedia, calendar, wp
+;; Homepage: http://orgmode.org
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+
+;; This file implements the support for Sebastian Rose's JavaScript
+;; org-info.js to display an Org mode file exported to HTML in an
+;; Info-like way, or using folding similar to the outline structure of
+;; Org mode itself.
+
+;; Documentation for using this module is in the Org manual.  The
+;; script itself is documented by Sebastian Rose in a file distributed
+;; with the script.  FIXME: Accurate pointers!
+
+;;; Code:
+
+(require 'ox-html)
+
+(add-to-list 'org-export-filter-options-functions 'org-infojs-install-script)
+
+(defgroup org-export-infojs nil
+  "Options specific for using org-info.js in HTML export."
+  :tag "Org Export HTML INFOJS"
+  :group 'org-export-html)
+
+(defcustom org-export-html-use-infojs 'when-configured
+  "Non-nil when Sebastian Rose's Java Script org-info.js should be active.
+This option can be nil or t to never or always use the script.
+It can also be the symbol `when-configured', meaning that the
+script will be linked into the export file if and only if there
+is a \"#+INFOJS_OPT:\" line in the buffer.  See also the variable
+`org-infojs-options'."
+  :group 'org-export-html
+  :group 'org-export-infojs
+  :type '(choice
+	  (const :tag "Never" nil)
+	  (const :tag "When configured in buffer" when-configured)
+	  (const :tag "Always" t)))
+
+(defconst org-infojs-opts-table
+  '((path PATH "http://orgmode.org/org-info.js")
+    (view VIEW "info")
+    (toc TOC :with-toc)
+    (ftoc FIXED_TOC "0")
+    (tdepth TOC_DEPTH "max")
+    (sdepth SECTION_DEPTH "max")
+    (mouse MOUSE_HINT "underline")
+    (buttons VIEW_BUTTONS "0")
+    (ltoc LOCAL_TOC "1")
+    (up LINK_UP :html-link-up)
+    (home LINK_HOME :html-link-home))
+  "JavaScript options, long form for script, default values.")
+
+(defvar org-infojs-options)
+(when (and (boundp 'org-infojs-options)
+	   (assq 'runs org-infojs-options))
+  (setq org-infojs-options (delq (assq 'runs org-infojs-options)
+				 org-infojs-options)))
+
+(defcustom org-infojs-options
+  (mapcar (lambda (x) (cons (car x) (nth 2 x))) org-infojs-opts-table)
+  "Options settings for the INFOJS JavaScript.
+Each of the options must have an entry in `org-export-html/infojs-opts-table'.
+The value can either be a string that will be passed to the script, or
+a property.  This property is then assumed to be a property that is defined
+by the Export/Publishing setup of Org.
+The `sdepth' and `tdepth' parameters can also be set to \"max\", which
+means to use the maximum value consistent with other options."
+  :group 'org-export-infojs
+  :type
+  `(set :greedy t :inline t
+	,@(mapcar
+	   (lambda (x)
+	     (list 'cons (list 'const (car x))
+		   '(choice
+		     (symbol :tag "Publishing/Export property")
+		     (string :tag "Value"))))
+	   org-infojs-opts-table)))
+
+(defcustom org-infojs-template
+  "<script type=\"text/javascript\" src=\"%SCRIPT_PATH\">
+/**
+ *
+ * @source: %SCRIPT_PATH
+ *
+ * @licstart  The following is the entire license notice for the
+ *  JavaScript code in %SCRIPT_PATH.
+ *
+ * Copyright (C) 2012-2013  Sebastian Rose
+ *
+ *
+ * The JavaScript code in this tag is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GNU GPL) as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option)
+ * any later version.  The code is distributed WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
+ *
+ * As additional permission under GNU GPL version 3 section 7, you
+ * may distribute non-source (e.g., minimized or compacted) forms of
+ * that code without the copy of the GNU GPL normally required by
+ * section 4, provided you include this license notice and a URL
+ * through which recipients can access the Corresponding Source.
+ *
+ * @licend  The above is the entire license notice
+ * for the JavaScript code in %SCRIPT_PATH.
+ *
+ */
+</script>
+
+<script type=\"text/javascript\">
+
+/*
+@licstart  The following is the entire license notice for the
+JavaScript code in this tag.
+
+Copyright (C) 2012-2013 Free Software Foundation, Inc.
+
+The JavaScript code in this tag is free software: you can
+redistribute it and/or modify it under the terms of the GNU
+General Public License (GNU GPL) as published by the Free Software
+Foundation, either version 3 of the License, or (at your option)
+any later version.  The code is distributed WITHOUT ANY WARRANTY;
+without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
+
+As additional permission under GNU GPL version 3 section 7, you
+may distribute non-source (e.g., minimized or compacted) forms of
+that code without the copy of the GNU GPL normally required by
+section 4, provided you include this license notice and a URL
+through which recipients can access the Corresponding Source.
+
+
+@licend  The above is the entire license notice
+for the JavaScript code in this tag.
+*/
+
+<!--/*--><![CDATA[/*><!--*/
+%MANAGER_OPTIONS
+org_html_manager.setup();  // activate after the parameters are set
+/*]]>*///-->
+</script>"
+  "The template for the export style additions when org-info.js is used.
+Option settings will replace the %MANAGER-OPTIONS cookie."
+  :group 'org-infojs
+  :type 'string)
+
+(defun org-infojs-install-script (exp-plist backend)
+  "Install script in export options when appropriate.
+EXP-PLIST is a plist containing export options.  BACKEND is the
+export back-end currently used."
+  (unless (or (not (org-export-derived-backend-p backend 'html))
+	      (not org-export-html-use-infojs)
+	      (and (eq org-export-html-use-infojs 'when-configured)
+		   (or (not (plist-get exp-plist :infojs-opt))
+		       (string-match "\\<view:nil\\>"
+				     (plist-get exp-plist :infojs-opt)))))
+    (let* ((template org-infojs-template)
+	   (ptoc (plist-get exp-plist :with-toc))
+	   (hlevels (plist-get exp-plist :headline-levels))
+	   (sdepth hlevels)
+	   (tdepth (if (integerp ptoc) (min ptoc hlevels) hlevels))
+	   (options (plist-get exp-plist :infojs-opt))
+	   (table org-infojs-opts-table)
+	   style)
+      (dolist (entry table)
+	(let* ((opt (car entry))
+	       (var (nth 1 entry))
+	       ;; Compute default values for script option OPT from
+	       ;; `org-infojs-options' variable.
+	       (default
+		 (let ((default (cdr (assq opt org-infojs-options))))
+		   (if (and (symbolp default) (not (memq default '(t nil))))
+		       (plist-get exp-plist default)
+		     default)))
+	       ;; Value set through INFOJS_OPT keyword has precedence
+	       ;; over the default one.
+	       (val (if (and options
+			     (string-match (format "\\<%s:\\(\\S-+\\)" opt)
+					   options))
+			(match-string 1 options)
+		      default)))
+	  (case opt
+	    (path (setq template
+			(replace-regexp-in-string
+			 "%SCRIPT_PATH" val template t t)))
+	    (sdepth (when (integerp (read val))
+		      (setq sdepth (min (read val) sdepth))))
+	    (tdepth (when (integerp (read val))
+		      (setq tdepth (min (read val) tdepth))))
+	    (otherwise (setq val
+			     (cond
+			      ((or (eq val t) (equal val "t")) "1")
+			      ((or (eq val nil) (equal val "nil")) "0")
+			      ((stringp val) val)
+			      (t (format "%s" val))))
+		       (push (cons var val) style)))))
+      ;; Now we set the depth of the *generated* TOC to SDEPTH,
+      ;; because the toc will actually determine the splitting.  How
+      ;; much of the toc will actually be displayed is governed by the
+      ;; TDEPTH option.
+      (setq exp-plist (plist-put exp-plist :with-toc sdepth))
+      ;; The table of contents should not show more sections than we
+      ;; generate.
+      (setq tdepth (min tdepth sdepth))
+      (push (cons "TOC_DEPTH" tdepth) style)
+      ;; Build style string.
+      (setq style (mapconcat
+		   (lambda (x) (format "org_html_manager.set(\"%s\", \"%s\");"
+				  (car x)
+				  (cdr x)))
+		   style "\n"))
+      (when (and style (> (length style) 0))
+	(and (string-match "%MANAGER_OPTIONS" template)
+	     (setq style (replace-match style t t template))
+	     (setq exp-plist
+		   (plist-put
+		    exp-plist :html-style-extra
+		    (concat (or (plist-get exp-plist :html-style-extra) "")
+			    "\n"
+			    style)))))
+      ;; This script absolutely needs the table of contents, so we
+      ;; change that setting.
+      (unless (plist-get exp-plist :with-toc)
+	(setq exp-plist (plist-put exp-plist :with-toc t)))
+      ;; Return the modified property list.
+      exp-plist)))
+
+
+
+(provide 'ox-infojs)
+(provide 'ox-jsinfo)
+
+;; Local variables:
+;; generated-autoload-file: "org-loaddefs.el"
+;; End:
+
+;;; ox-jsinfo.el ends here

File diff suppressed because it is too large
+ 442 - 434
contrib/lisp/org-e-latex.el


File diff suppressed because it is too large
+ 201 - 231
contrib/lisp/org-e-man.el


+ 22 - 18
contrib/lisp/org-md.el

@@ -1,4 +1,4 @@
-;;; org-md.el --- Markdown Back-End for Org Export Engine
+;;; ox-md.el --- Markdown Back-End for Org Export Engine
 
 ;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
 
@@ -21,7 +21,7 @@
 ;;; Commentary:
 
 ;; This library implements a Markdown back-end (vanilla flavour) for
-;; Org exporter, based on `e-html'.
+;; Org exporter, based on `html' back-end.
 ;;
 ;; It provides two commands for export, depending on the desired
 ;; output: `org-md-export-as-markdown' (temporary buffer) and
@@ -29,7 +29,7 @@
 
 ;;; Code:
 
-(require 'org-e-html)
+(require 'ox-html)
 
 
 
@@ -53,7 +53,7 @@ This variable can be set to either `atx' or `setext'."
 
 ;;; Define Back-End
 
-(org-export-define-derived-backend md e-html
+(org-export-define-derived-backend md html
   :export-block ("MD" "MARKDOWN")
   :filters-alist ((:filter-parse-tree . org-md-separate-elements))
   :menu-entry
@@ -99,14 +99,13 @@ TREE is the parse tree being exported.  BACKEND is the export
 back-end used.  INFO is a plist used as a communication channel.
 
 Assume BACKEND is `md'."
-  (org-element-map
-   tree org-element-all-elements
-   (lambda (elem)
-     (unless (eq (org-element-type elem) 'org-data)
-       (org-element-put-property
-	elem :post-blank
-	(let ((post-blank (org-element-property :post-blank elem)))
-	  (if (not post-blank) 1 (max 1 post-blank)))))))
+  (org-element-map tree org-element-all-elements
+    (lambda (elem)
+      (unless (eq (org-element-type elem) 'org-data)
+	(org-element-put-property
+	 elem :post-blank
+	 (let ((post-blank (org-element-property :post-blank elem)))
+	   (if (not post-blank) 1 (max 1 post-blank)))))))
   ;; Return updated tree.
   tree)
 
@@ -264,9 +263,9 @@ a communication channel."
 	 (function
 	  (lambda (raw-path info)
 	    ;; Treat links to `file.org' as links to `file.html', if
-            ;; needed.  See `org-e-html-link-org-files-as-html'.
+            ;; needed.  See `org-html-link-org-files-as-html'.
 	    (cond
-	     ((and org-e-html-link-org-files-as-html
+	     ((and org-html-link-org-files-as-html
 		   (string= ".org"
 			    (downcase (file-name-extension raw-path "."))))
 	      (concat (file-name-sans-extension raw-path) "."
@@ -288,7 +287,7 @@ a communication channel."
 					   (org-export-get-headline-number
 					    destination info)
 					   ".")))))))
-	  ((org-export-inline-image-p link org-e-html-inline-image-rules)
+	  ((org-export-inline-image-p link org-html-inline-image-rules)
 	   (let ((path (let ((raw-path (org-element-property :path link)))
 			 (if (not (file-name-absolute-p raw-path)) raw-path
 			   (expand-file-name raw-path)))))
@@ -373,7 +372,7 @@ contextual information."
   (setq text (replace-regexp-in-string "[`*_\\]" "\\\\\\&" text))
   ;; Handle special strings, if required.
   (when (plist-get info :with-special-strings)
-    (setq text (org-e-html-convert-special-strings text)))
+    (setq text (org-html-convert-special-strings text)))
   ;; Handle break preservation, if required.
   (when (plist-get info :preserve-breaks)
     (setq text (replace-regexp-in-string "[ \t]*\n" "  \n" text)))
@@ -485,5 +484,10 @@ Return output file's name."
       (org-export-to-file 'md outfile subtreep visible-only))))
 
 
-(provide 'org-md)
-;;; org-md.el ends here
+(provide 'ox-md)
+
+;; Local variables:
+;; generated-autoload-file: "org-loaddefs.el"
+;; End:
+
+;;; ox-md.el ends here

File diff suppressed because it is too large
+ 730 - 710
contrib/lisp/org-e-odt.el


+ 114 - 0
lisp/ox-org.el

@@ -0,0 +1,114 @@
+;;; ox-org.el --- Org Back-End for Org Export Engine
+
+;; Copyright (C) 2013  Free Software Foundation, Inc.
+
+;; Author: Nicolas Goaziou <n.goaziou@gmail.com>
+;; Keywords: org, wp
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This library implements an Org back-end for Org exporter.  Since
+;; its usage is mainly internal, it doesn't provide any interactive
+;; function.
+
+;;; Code:
+(require 'ox)
+
+(org-export-define-backend org
+  ((babel-call . org-org-identity)
+   (bold . org-org-identity)
+   (center-block . org-org-identity)
+   (clock . org-org-identity)
+   (code . org-org-identity)
+   (diary-sexp . org-org-identity)
+   (drawer . org-org-identity)
+   (dynamic-block . org-org-identity)
+   (entity . org-org-identity)
+   (example-block . org-org-identity)
+   (fixed-width . org-org-identity)
+   (footnote-definition . org-org-identity)
+   (footnote-reference . org-org-identity)
+   (headline . org-org-headline)
+   (horizontal-rule . org-org-identity)
+   (inline-babel-call . org-org-identity)
+   (inline-src-block . org-org-identity)
+   (inlinetask . org-org-identity)
+   (italic . org-org-identity)
+   (item . org-org-identity)
+   (keyword . org-org-keyword)
+   (latex-environment . org-org-identity)
+   (latex-fragment . org-org-identity)
+   (line-break . org-org-identity)
+   (link . org-org-identity)
+   (node-property . org-org-identity)
+   (paragraph . org-org-identity)
+   (plain-list . org-org-identity)
+   (planning . org-org-identity)
+   (property-drawer . org-org-identity)
+   (quote-block . org-org-identity)
+   (quote-section . org-org-identity)
+   (radio-target . org-org-identity)
+   (section . org-org-identity)
+   (special-block . org-org-identity)
+   (src-block . org-org-identity)
+   (statistics-cookie . org-org-identity)
+   (strike-through . org-org-identity)
+   (subscript . org-org-identity)
+   (superscript . org-org-identity)
+   (table . org-org-identity)
+   (table-cell . org-org-identity)
+   (table-row . org-org-identity)
+   (target . org-org-identity)
+   (timestamp . org-org-identity)
+   (underline . org-org-identity)
+   (verbatim . org-org-identity)
+   (verse-block . org-org-identity)))
+
+(defun org-org-identity (blob contents info)
+  "Transcode BLOB element or object back into Org syntax."
+  (funcall
+   (intern (format "org-element-%s-interpreter" (org-element-type blob)))
+   blob contents))
+
+(defun org-org-headline (headline contents info)
+  "Transcode HEADLINE element back into Org syntax."
+  (unless (plist-get info :with-todo-keywords)
+    (org-element-put-property headline :todo-keyword nil))
+  (unless (plist-get info :with-tags)
+    (org-element-put-property headline :tags nil))
+  (unless (plist-get info :with-priority)
+    (org-element-put-property headline :priority nil))
+  (org-element-headline-interpreter headline contents))
+
+(defun org-org-keyword (keyword contents info)
+  "Transcode KEYWORD element back into Org syntax.
+Ignore keywords targeted at other export back-ends."
+  (unless (member (org-element-property :key keyword)
+		  (mapcar
+		   (lambda (block-cons)
+		     (and (eq (cdr block-cons) 'org-element-export-block-parser)
+			  (car block-cons)))
+		   org-element-block-name-alist))
+    (org-element-keyword-interpreter keyword nil)))
+
+
+(provide 'ox-org)
+
+;; Local variables:
+;; generated-autoload-file: "org-loaddefs.el"
+;; End:
+
+;;; ox-org.el ends here

File diff suppressed because it is too large
+ 260 - 252
contrib/lisp/org-e-publish.el


File diff suppressed because it is too large
+ 277 - 310
contrib/lisp/org-e-texinfo.el


File diff suppressed because it is too large
+ 539 - 489
contrib/lisp/org-export.el


+ 2 - 1
mk/org-fixup.el

@@ -70,7 +70,8 @@ work correctly if this file is not up-to-date."
   (with-temp-buffer
     (set-visited-file-name "org-loaddefs.el")
     (insert ";;; org-loaddefs.el --- autogenerated file, do not edit\n;;\n;;; Code:\n")
-    (let ((files (directory-files default-directory nil "^\\(org\\|ob\\)\\(-.*\\)?\\.el$")))
+    (let ((files (directory-files default-directory
+				  nil "^\\(org\\|ob\\|ox\\)\\(-.*\\)?\\.el$")))
       (mapc (lambda (f) (generate-file-autoloads f)) files))
     (insert "\f\n(provide 'org-loaddefs)\n")
     (insert "\f\n;; Local Variables:\n;; version-control: never\n")

+ 58 - 57
testing/lisp/test-org-export.el

@@ -1,4 +1,4 @@
-;;; test-org-export.el --- Tests for org-export.el
+;;; test-ox.el --- Tests for ox.el
 
 ;; Copyright (C) 2012, 2013  Nicolas Goaziou
 
@@ -21,7 +21,7 @@
 
 ;;; Code:
 
-(unless (featurep 'org-export)
+(unless (featurep 'ox)
   (signal 'missing-test-dependency "org-export"))
 
 (defmacro org-test-with-backend (backend &rest body)
@@ -73,38 +73,22 @@ already filled in `info'."
 
 (ert-deftest test-org-export/bind-keyword ()
   "Test reading #+BIND: keywords."
-  ;; Test with `org-export-all-BIND' set to t.
+  ;; Test with `org-export-allow-bind-keywords' set to t.
   (should
    (org-test-with-temp-text "#+BIND: variable value"
-     (let ((org-export-allow-BIND t))
+     (let ((org-export-allow-bind-keywords t))
        (org-export--install-letbind-maybe)
        (eq variable 'value))))
-  ;; Test with `org-export-all-BIND' set to nil.
+  ;; Test with `org-export-allow-bind-keywords' set to nil.
   (should-not
    (org-test-with-temp-text "#+BIND: variable value"
-     (let ((org-export-allow-BIND nil))
-       (org-export--install-letbind-maybe)
-       (boundp 'variable))))
-  ;; Test with `org-export-all-BIND' set to 'confirm and
-  ;; `org-export--allow-BIND-local' to t .
-  (should
-   (org-test-with-temp-text "#+BIND: variable value"
-     (let ((org-export-allow-BIND 'confirm))
-       (org-set-local 'org-export--allow-BIND-local t)
-       (org-export--install-letbind-maybe)
-       (eq variable 'value))))
-  ;; Test with `org-export-all-BIND' set to 'confirm and
-  ;; `org-export--allow-BIND-local' to nil.
-  (should-not
-   (org-test-with-temp-text "#+BIND: variable value"
-     (let ((org-export-allow-BIND 'confirm))
-       (org-set-local 'org-export--allow-BIND-local nil)
+     (let ((org-export-allow-bind-keywords nil))
        (org-export--install-letbind-maybe)
        (boundp 'variable))))
   ;; BIND keywords are case-insensitive.
   (should
    (org-test-with-temp-text "#+bind: variable value"
-     (let ((org-export-allow-BIND t))
+     (let ((org-export-allow-bind-keywords t))
        (org-export--install-letbind-maybe)
        (eq variable 'value)))))
 
@@ -302,6 +286,15 @@ Paragraph"
 	 (string-match
 	  "\\`\\* Head1[ \t]+:archive:\n\\'"
 	  (org-export-as 'test nil nil nil '(:with-archived-trees t)))))))
+  ;; Clocks.
+  (let ((org-clock-string "CLOCK:"))
+    (org-test-with-temp-text "CLOCK: [2012-04-29 sun. 10:45]"
+      (org-test-with-backend test
+	(should
+	 (equal (org-export-as 'test nil nil nil '(:with-clocks t))
+		"CLOCK: [2012-04-29 sun. 10:45]\n"))
+	(should
+	 (equal (org-export-as 'test nil nil nil '(:with-clocks nil)) "")))))
   ;; Drawers.
   (let ((org-drawers '("TEST")))
     (org-test-with-temp-text ":TEST:\ncontents\n:END:"
@@ -316,39 +309,12 @@ Paragraph"
 	(should
 	 (equal (org-export-as 'test nil nil nil '(:with-drawers ("FOO")))
 		":FOO:\nkeep\n:END:\n")))))
-  ;; Timestamps.
-  (org-test-with-temp-text "[2012-04-29 sun. 10:45]<2012-04-29 sun. 10:45>"
-    (org-test-with-backend test
-      (should
-       (equal (org-export-as 'test nil nil nil '(:with-timestamps t))
-	      "[2012-04-29 sun. 10:45]<2012-04-29 sun. 10:45>\n"))
-      (should
-       (equal (org-export-as 'test nil nil nil '(:with-timestamps nil)) ""))
-      (should
-       (equal (org-export-as 'test nil nil nil '(:with-timestamps active))
-	      "<2012-04-29 sun. 10:45>\n"))
-      (should
-       (equal (org-export-as 'test nil nil nil '(:with-timestamps inactive))
-	      "[2012-04-29 sun. 10:45]\n"))))
-  ;; Clocks.
-  (let ((org-clock-string "CLOCK:"))
-    (org-test-with-temp-text "CLOCK: [2012-04-29 sun. 10:45]"
-      (org-test-with-backend test
-	(should
-	 (equal (org-export-as 'test nil nil nil '(:with-clocks t))
-		"CLOCK: [2012-04-29 sun. 10:45]\n"))
-	(should
-	 (equal (org-export-as 'test nil nil nil '(:with-clocks nil)) "")))))
-  ;; Plannings.
-  (let ((org-closed-string "CLOSED:"))
-    (org-test-with-temp-text "CLOSED: [2012-04-29 sun. 10:45]"
+  (let ((org-drawers '("FOO" "BAR")))
+    (org-test-with-temp-text ":FOO:\nkeep\n:END:\n:BAR:\nremove\n:END:"
       (org-test-with-backend test
 	(should
-	 (equal (org-export-as 'test nil nil nil '(:with-plannings t))
-		"CLOSED: [2012-04-29 sun. 10:45]\n"))
-	(should
-	 (equal (org-export-as 'test nil nil nil '(:with-plannings nil))
-		"")))))
+	 (equal (org-export-as 'test nil nil nil '(:with-drawers (not "BAR")))
+		":FOO:\nkeep\n:END:\n")))))
   ;; Inlinetasks.
   (when (featurep 'org-inlinetask)
     (should
@@ -366,13 +332,37 @@ Paragraph"
 	  (org-test-with-backend test
 	    (org-export-as 'test nil nil nil '(:with-inlinetasks nil)))))
       "")))
+  ;; Plannings.
+  (let ((org-closed-string "CLOSED:"))
+    (org-test-with-temp-text "CLOSED: [2012-04-29 sun. 10:45]"
+      (org-test-with-backend test
+	(should
+	 (equal (org-export-as 'test nil nil nil '(:with-plannings t))
+		"CLOSED: [2012-04-29 sun. 10:45]\n"))
+	(should
+	 (equal (org-export-as 'test nil nil nil '(:with-plannings nil))
+		"")))))
   ;; Statistics cookies.
   (should
    (equal ""
 	  (org-test-with-temp-text "[0/0]"
 	    (org-test-with-backend test
 	      (org-export-as
-	       'test nil nil nil '(:with-statistics-cookies nil)))))))
+	       'test nil nil nil '(:with-statistics-cookies nil))))))
+  ;; Timestamps.
+  (org-test-with-temp-text "[2012-04-29 sun. 10:45]<2012-04-29 sun. 10:45>"
+    (org-test-with-backend test
+      (should
+       (equal (org-export-as 'test nil nil nil '(:with-timestamps t))
+	      "[2012-04-29 sun. 10:45]<2012-04-29 sun. 10:45>\n"))
+      (should
+       (equal (org-export-as 'test nil nil nil '(:with-timestamps nil)) ""))
+      (should
+       (equal (org-export-as 'test nil nil nil '(:with-timestamps active))
+	      "<2012-04-29 sun. 10:45>\n"))
+      (should
+       (equal (org-export-as 'test nil nil nil '(:with-timestamps inactive))
+	      "[2012-04-29 sun. 10:45]\n")))))
 
 (ert-deftest test-org-export/comment-tree ()
   "Test if export process ignores commented trees."
@@ -669,7 +659,18 @@ body\n")))
 	    (org-export-define-backend parent ((:headline . parent)))
 	    (org-export-define-derived-backend test parent
 	      :translate-alist ((:headline . test)))
-	    (org-export-backend-translate-table 'test)))))
+	    (org-export-backend-translate-table 'test))))
+  ;; Options defined in the new back have priority over those defined
+  ;; in parent.
+  (should
+   (eq 'test
+       (let (org-export-registered-backends)
+	 (org-export-define-backend parent
+	   ((:headline . parent))
+	   :options-alist ((:a nil nil 'parent)))
+	 (org-export-define-derived-backend test parent
+	   :options-alist ((:a nil nil 'test)))
+	 (plist-get (org-export--get-global-options 'test) :a)))))
 
 (ert-deftest test-org-export/derived-backend-p ()
   "Test `org-export-derived-backend-p' specifications."
@@ -2213,5 +2214,5 @@ Another text. (ref:text)
 		     (org-element-map tree 'code 'identity info t) info 2))))))
 
 
-(provide 'test-org-export)
+(provide 'test-ox)
 ;;; test-org-export.el end here