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: Tue, 26 Jun 2012 07:39:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

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




reply via email to

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