From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: new exporter Date: Tue, 26 Jun 2012 07:39:20 +0200 Message-ID: <87a9zq7htj.fsf@Rainer.invalid> References: <3C38420E-E2FA-4CAB-B3FD-9C5F8584E60A@gmail.com> <81fwadrgoo.fsf@gmail.com> <87396dzlai.fsf_-_@Rainer.invalid> <871ulqgb4t.fsf@gmail.com> <87y5nyx4ku.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjOUy-0003fD-FZ for emacs-orgmode@gnu.org; Tue, 26 Jun 2012 01:39:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjOUw-00017L-8s for emacs-orgmode@gnu.org; Tue, 26 Jun 2012 01:39:36 -0400 Received: from plane.gmane.org ([80.91.229.3]:34395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjOUw-00017H-1g for emacs-orgmode@gnu.org; Tue, 26 Jun 2012 01:39:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SjOUs-0002Cl-BL for emacs-orgmode@gnu.org; Tue, 26 Jun 2012 07:39:30 +0200 Received: from pd9eb2839.dip.t-dialin.net ([217.235.40.57]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jun 2012 07:39:30 +0200 Received: from Stromeko by pd9eb2839.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jun 2012 07:39:30 +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: emacs-orgmode@gnu.org Achim Gratz writes: > As long as I don't compile org-export.el, all tests are now passing. > Thank you. I've had a look at the byte-compiled code and traced at least one of those errors to the following construct in org-export.el(org-export-as): #BEGIN_SRC emacs_lisp … (save-excursion (save-restriction ;; Narrow buffer to an appropriate region or subtree for ;; parsing. If parsing subtree, be sure to remove main headline ;; too. (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) ;; 1. Get export environment from original buffer. Store ;; original footnotes definitions in communication channel as ;; they might not be accessible anymore in a narrowed parse ;; tree. Also install user's and developer's filters. (let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) ;; 2. Get parse tree. Buffer isn't parsed directly. ;; Instead, a temporary copy is created, where include ;; keywords are expanded and code blocks are evaluated. (tree (let ((buf (or (buffer-file-name (buffer-base-buffer)) (current-buffer)))) … #END_SRC This causes the (current-buffer) to expand literally into the byte-code (look at the byte-code!) instead of being compiled as a function, which obviously isn't going to work. This does not happen if I either remove the cond form or if I wrap the BODY in save-restriction in progn, but I haven't done any further investigation if the code still works with that change and if maybe there are other places that are similarly struck. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables