From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: new exporter Date: Mon, 02 Jul 2012 12:19:01 +0200 Message-ID: <87hatqh3e2.fsf@gmail.com> References: <3C38420E-E2FA-4CAB-B3FD-9C5F8584E60A@gmail.com> <81fwadrgoo.fsf@gmail.com> <87396dzlai.fsf_-_@Rainer.invalid> <871ulqgb4t.fsf@gmail.com> <87y5nyx4ku.fsf@Rainer.invalid> <87a9zq7htj.fsf@Rainer.invalid> <87r4t261fw.fsf@Rainer.invalid> <87k3yu15wj.fsf@gmail.com> <87395hkj7u.fsf@Rainer.invalid> <87fw9gwmet.fsf@Rainer.invalid> <87pq8j2a0y.fsf@gmail.com> <87r4sy3rve.fsf@Rainer.invalid> <87fw9d1eif.fsf@gmail.com> <87r4sv5tmm.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sldm2-0003oN-7J for emacs-orgmode@gnu.org; Mon, 02 Jul 2012 06:22:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sldls-0008Bc-2s for emacs-orgmode@gnu.org; Mon, 02 Jul 2012 06:22:29 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:41925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sldlr-0008B4-Qk for emacs-orgmode@gnu.org; Mon, 02 Jul 2012 06:22:20 -0400 Received: by wibhq4 with SMTP id hq4so2202024wib.12 for ; Mon, 02 Jul 2012 03:22:17 -0700 (PDT) In-Reply-To: <87r4sv5tmm.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 01 Jul 2012 18:33:05 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Achim Gratz Cc: emacs-orgmode@gnu.org Hello, Achim Gratz 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