diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-08-03 09:44:34 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-08-03 09:44:34 +0200 |
commit | f5161671ceb882b7a946d0632fbbf5c380952556 (patch) | |
tree | 46ffdb67928e7afc8ac5cb631b372091f84be61e | |
parent | 216521ea2ba54106d0dc6a29248d5691deca5dcd (diff) | |
download | org-mode-f5161671ceb882b7a946d0632fbbf5c380952556.tar.gz |
ox: Re-introduce `org-export-current-backend' for compatibility
* lisp/ox.el (org-export-current-backend): New variable.
(org-export-as): Use new variable.
Thanks to Christophe Rhodes for providing a preliminary patch.
-rw-r--r-- | lisp/ox.el | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -301,6 +301,17 @@ and its CDR is a list of export options.") This marker will be used with `C-u C-c C-e' to make sure export repetition uses the same subtree if the previous command was restricted to a subtree.") +;; For compatibility with Org < 8 +(defvar org-export-current-backend nil + "Name, if any, of the back-end used during an export process. + +Its value is a symbol such as `html', `latex', `ascii', or nil if +the back-end is anonymous (see `org-export-create-backend') or if +there is no export process in progress. + +It can be used to teach Babel blocks how to act differently +according to the back-end used.") + ;;; User-configurable Variables ;; @@ -2925,7 +2936,8 @@ Return code as a string." (narrow-to-region (point) (point-max)))) ;; Initialize communication channel with original buffer ;; attributes, unavailable in its copy. - (let* ((info (org-combine-plists + (let* ((org-export-current-backend backend) + (info (org-combine-plists (list :export-options (delq nil (list (and subtreep 'subtree) |