Browse Source

ox: Add :input-buffer to communication channel

* lisp/ox.el (org-export--get-buffer-attributes): Add :input-buffer
  property.
Nicolas Goaziou 11 years ago
parent
commit
205e586dd1
1 changed files with 6 additions and 1 deletions
  1. 6 1
      lisp/ox.el

+ 6 - 1
lisp/ox.el

@@ -1333,6 +1333,10 @@ The back-end could then be called with, for example:
 ;;   - category :: tree
 ;;   - type :: list of elements and objects
 ;;
+;; + `:input-buffer' :: Original buffer name.
+;;   - category :: option
+;;   - type :: string
+;;
 ;; + `:input-file' :: Full path to input file, if any.
 ;;   - category :: option
 ;;   - type :: string or nil
@@ -1787,7 +1791,8 @@ Assume buffer is in Org mode.  Narrowing, if any, is ignored."
   "Return properties related to buffer attributes, as a plist."
   ;; Store full path of input file name, or nil.  For internal use.
   (let ((visited-file (buffer-file-name (buffer-base-buffer))))
-    (list :input-file visited-file
+    (list :input-buffer (buffer-name (buffer-base-buffer))
+	  :input-file visited-file
 	  :title (if (not visited-file) (buffer-name (buffer-base-buffer))
 		   (file-name-sans-extension
 		    (file-name-nondirectory visited-file))))))