[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] new exporter
From: |
Nicolas Goaziou |
Subject: |
Re: [O] new exporter |
Date: |
Mon, 02 Jul 2012 12:19:01 +0200 |
Hello,
Achim Gratz <address@hidden> 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
- Re: [O] new exporter, Achim Gratz, 2012/07/01
- Re: [O] new exporter,
Nicolas Goaziou <=
- Re: [O] new exporter, Achim Gratz, 2012/07/12
- Re: [O] new exporter, Nicolas Goaziou, 2012/07/13
- Re: [O] new exporter, Achim Gratz, 2012/07/13
- Re: [O] new exporter, Nicolas Goaziou, 2012/07/14
- Re: [O] new exporter, Achim Gratz, 2012/07/14
- Re: [O] new exporter, Jambunathan K, 2012/07/14
- Re: [O] new exporter, Jambunathan K, 2012/07/14
- Re: [O] new exporter, Achim Gratz, 2012/07/15
- Re: [O] new exporter, Nicolas Goaziou, 2012/07/15