-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support HEAD version of org-mode (ox-org/template)
- Loading branch information
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
;;; ox-pandoc.el --- org exporter for pandoc. -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2014 KAWABATA, Taichi | ||
;; Copyright (C) 2014-2015 KAWABATA, Taichi | ||
|
||
;; Filename: ox-pandoc.el | ||
;; Description: Another org exporter for Pandoc | ||
;; Author: KAWABATA, Taichi <[email protected]> | ||
;; Created: 2014-07-20 | ||
;; Version: 1.150630 | ||
;; Version: 1.150706 | ||
;; Package-Requires: ((org "8.2") (emacs "24") (dash "2.8") (ht "2.0")) | ||
;; Keywords: tools | ||
;; URL: https://github.com/kawabata/ox-pandoc | ||
|
@@ -1168,9 +1168,15 @@ Option table is created in this stage." | |
(epub-chapter-level . :epub-chapter-level) | ||
(epub-cover-image . :epub-cover-image) | ||
(bibliography . :bibliography)))) | ||
(if (functionp 'org-org-template) | ||
(org-org-template contents info) | ||
contents)) | ||
;; 'ox-pandoc' is derived from 'ox-org'. If 'ox-org' defines its own | ||
;; template, then this template function (org-pandoc-template) calls | ||
;; original ox-org template at the end. | ||
(let ((org-template | ||
(cdr (assoc 'template | ||
(org-export-get-all-transcoders 'org))))) | ||
(if org-template | ||
(funcall org-template contents info) | ||
contents))) | ||
|
||
(defun org-pandoc-put-options (options) | ||
"Put alist OPTIONS to `org-pandoc-option-table'." | ||
|
@@ -1301,7 +1307,7 @@ OPTIONS is a hashtable. It runs asynchronously." | |
(let ((version (with-temp-buffer | ||
(call-process org-pandoc-command nil t nil "-v") | ||
(buffer-string)))) | ||
(if (not (string-match "^pandoc.* \\([0-9]+\\)\\.\\([0-9]+\\)" version)) | ||
(if (not (string-match "^pandoc.*? \\([0-9]+\\)\\.\\([0-9]+\\)" version)) | ||
(display-warning 'ox-pandoc "Pandoc version number can not be retrieved.") | ||
(let ((major (string-to-number (match-string 1 version))) | ||
(minor (string-to-number (match-string 2 version)))) | ||
|