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.
This commit is contained in:
Nicolas Goaziou 2011-11-28 20:14:20 +01:00
parent e6ea9c59a0
commit 21758c30c9
1 changed files with 13 additions and 12 deletions

View File

@ -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))