Hello, Achim Gratz <strom...@nexgo.de> writes:
> After some consideration, I think this is what the macro should look > like: > > (defmacro org-export-with-current-buffer-copy (&rest body) > "Apply BODY in a copy of the current buffer. > > The copy preserves local variables and visibility of the original > buffer. > > Point is at buffer's beginning when BODY is applied." > `(org-with-gensyms (original-buffer offset buffer-string overlays) > (let ((original-buffer (current-buffer)) > (offset (1- (point-min))) > (buffer-string (buffer-string)) > (overlays (mapcar > 'copy-overlay (overlays-in (point-min) (point-max))))) > (with-temp-buffer > (let ((buffer-invisibility-spec nil)) > (org-clone-local-variables > original-buffer > > "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") > (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)) Not exactly. With this version, symbols generated with gensym are never used, and the macro isn't hygienic anymore. I still think your first take about this macro was the good one. I've pushed something very similar. Could you verify if it is correct on the compiling side? > The org-export-define-derived-backend macro seems similarly starstruck, > but I really don't know what you think the expansion should be. Something along the lines of: #+begin_src emacs-lisp (progn (defconst org-e-beamer-options-alist '(...) "Alist between filters keywords and back-end specific filters. See `org-export-filters-alist' for more information.") (defvar org-e-beamer-translate-alist '(...) "Alist between element or object types and translators.")) #+end_src > One of your recent changes introduced four test fail when org-element is > compiled. I haven't yet looked why that would be, the four tests are: > > FAILED test-org-export/table-cell-alignment > FAILED test-org-export/table-cell-borders > FAILED test-org-export/table-row-ends-header-p > FAILED test-org-export/table-row-starts-header-p Could you paste the error reported by ERT? I can't think of any recent change in this area. > The new org-e-beamer.el doesn't compile at all: > org-e-beamer.el:258:1:Error: Wrong type argument: listp, > org-e-beamer-export-block It should be fixed. Thank you. Regards, -- Nicolas Goaziou