Browse Source

contrib/lisp/org-export: Fix visibility influence on list parsing

* contrib/lisp/org-export.el (org-export-with-current-buffer-copy):
  Full invisibility prevents `current-column' from returning useful
  values.  Thus, keep visibility related text-properties and set
  `buffer-invisibility-spec' to nil.
Nicolas Goaziou 13 years ago
parent
commit
21758c30c9
1 changed files with 13 additions and 12 deletions
  1. 13 12
      contrib/lisp/org-export.el

+ 13 - 12
contrib/lisp/org-export.el

@@ -2005,18 +2005,19 @@ Point is at buffer's beginning when BODY is applied."
            (,overlays (mapcar
                        'copy-overlay (overlays-in (point-min) (point-max)))))
        (with-temp-buffer
-         (org-clone-local-variables
-          ,original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\)")
-         (insert ,buffer-string)
-         (mapc (lambda (ov)
-                 (move-overlay
-                  ov
-                  (- (overlay-start ov) ,offset)
-                  (- (overlay-end ov) ,offset)
-                  (current-buffer)))
-               ,overlays)
-         (goto-char (point-min))
-         (progn ,@body)))))
+         (let ((buffer-invisibility-spec nil))
+	   (org-clone-local-variables
+	    ,original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\)")
+	   (insert ,buffer-string)
+	   (mapc (lambda (ov)
+		   (move-overlay
+		    ov
+		    (- (overlay-start ov) ,offset)
+		    (- (overlay-end ov) ,offset)
+		    (current-buffer)))
+		 ,overlays)
+	   (goto-char (point-min))
+	   (progn ,@body))))))
 (def-edebug-spec org-export-with-current-buffer-copy (body))