]> code.delx.au - gnu-emacs/blobdiff - lisp/org/org-exp.el
Merge Org 7.9.3e (commit b07a9bb).
[gnu-emacs] / lisp / org / org-exp.el
index 6b506cd1275da4ce747152eea6c4a891d63f6415..5ccaec3e67fcb1ad952772b50abdd159473739cc 100644 (file)
@@ -1,6 +1,6 @@
 ;;; org-exp.el --- Export internals for Org-mode
 
-;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2013 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
@@ -48,6 +48,7 @@
 (declare-function org-table-colgroup-line-p "org-table" (line))
 (declare-function org-pop-to-buffer-same-window "org-compat"
                  (&optional buffer-or-name norecord label))
+(declare-function org-unescape-code-in-region "org-src" (beg end))
 
 (autoload 'org-export-generic "org-export-generic" "Export using the generic exporter" t)
 
@@ -1790,7 +1791,7 @@ from the buffer."
                 beg-content end-content
                 `(org-protected t original-indentation ,ind org-native-text t))
                ;; strip protective commas
-               (org-strip-protective-commas beg-content end-content)
+               (org-unescape-code-in-region beg-content end-content)
                (delete-region (match-beginning 0) (match-end 0))
                (save-excursion
                  (goto-char beg)
@@ -2112,7 +2113,8 @@ Also, store forced alignment information found in such lines."
       (put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t))
     (goto-char (point-min))
     (while (re-search-forward re-plain-link nil t)
-      (unless (get-text-property (match-beginning 0) 'org-normalized-link)
+      (unless (or (get-text-property (match-beginning 0) 'org-normalized-link)
+                 (assoc :tags (org-context)))
        (goto-char (1- (match-end 0)))
        (org-if-unprotected-at (1+ (match-beginning 0))
          (let* ((s (concat (match-string 1)
@@ -3046,12 +3048,11 @@ to the value of `temporary-file-directory'."
          (eval ;; convert to fmt -- mimicking `org-run-like-in-org-mode'
           (list 'let org-local-vars
                 (list (intern (format "org-export-as-%s" fmt))
-                      nil nil nil ''string t))))
+                      nil nil ''string t dir))))
       (delete-file tmp-file))))
 
 ;;;###autoload
-(defun org-export-as-org (arg &optional hidden ext-plist
-                             to-buffer body-only pub-dir)
+(defun org-export-as-org (arg &optional ext-plist to-buffer body-only pub-dir)
   "Make a copy with not-exporting stuff removed.
 The purpose of this function is to provide a way to export the source
 Org file of a webpage in Org format, but with sensitive and/or irrelevant
@@ -3230,7 +3231,6 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
    org-archive-location
    "org file:~/org/%s.org"))
 
-;;;###autoload
 (defun org-insert-export-options-template ()
   "Insert into the buffer a template with information for exporting."
   (interactive)
@@ -3348,4 +3348,8 @@ The depends on the variable `org-export-copy-to-kill-ring'."
 
 (provide 'org-exp)
 
+;; Local variables:
+;; generated-autoload-file: "org-loaddefs.el"
+;; End:
+
 ;;; org-exp.el ends here