emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] new exporter


From: Achim Gratz
Subject: Re: [O] new exporter
Date: Wed, 27 Jun 2012 22:05:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Achim Gratz writes:
> Nicolas Goaziou writes:
>> That may not solve the problem, but could at least simplify it.
>
> The problem can be demonstrated with just this code snippet in place of
> org-export.el:
[...]
> So it might be a bit easier to solve now (I hope).

This code snippet has at last after revealed where the problem is: the
function call to (current-buffer) gets unquoted, when it clearly needs
to be in the expansion.  The literal expansion of the buffer content
into the compiled bytecode is similarly explained by an unquoting of
(buffer-string).  Here's a patch that seems to fix the compilation
(without changelog and everything because I think you may want to check
the rest of the new exporters for similar constructs).

--8<---------------cut here---------------start------------->8---
 contrib/lisp/org-export.el |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el
index 7e82050..8776086 100644
--- a/contrib/lisp/org-export.el
+++ b/contrib/lisp/org-export.el
@@ -2475,9 +2475,9 @@ (defmacro org-export-with-current-buffer-copy (&rest body)
 
 Point is at buffer's beginning when BODY is applied."
   (org-with-gensyms (original-buffer offset buffer-string overlays)
-    `(let ((,original-buffer ,(current-buffer))
+    `(let ((,original-buffer (current-buffer))
           (,offset ,(1- (point-min)))
-          (,buffer-string ,(buffer-string))
+          (,buffer-string (buffer-string))
           (,overlays (mapcar
                       'copy-overlay (overlays-in (point-min) (point-max)))))
        (with-temp-buffer
-- 
1.7.10.4
--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]