emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Emacs Lisp Depth


From: Nicolas Goaziou
Subject: Re: [O] Emacs Lisp Depth
Date: Tue, 16 Sep 2014 15:38:43 +0200

Hello,

Fabrice Popineau <address@hidden> writes:

> Am I the only one to have hit the bottom of the default max_specpdl_size
> and max_lisp_eval_depth values ?
> I had already set max_specpdl_size to 2600 and I had to raise it again.
>
> I have an Org file of about 10000 lines, and I am exporting x100 beamer
> slides and a latex document for about 200 pages .
>
> Curious to hear about other reports.

This is likely due to a bug or an inefficient algorithm. Does it happen
with other back-ends as well? Does it happen when parsing (i.e., simply
calling `org-element-parse-buffer'?

Could you send the file you're exporting in private? If needed, you can
use the following function (provided you can parse the buffer) to hide
contents

  (defun ngz-scramble-contents ()
    (interactive)
    (let ((tree (org-element-parse-buffer)))
      (org-element-map tree '(code comment comment-block example-block 
fixed-width
                                   keyword link node-property plain-text 
verbatim)
        (lambda (obj)
          (case (org-element-type obj)
            ((code comment comment-block example-block fixed-width keyword
                   node-property verbatim)
             (let ((value (org-element-property :value obj)))
               (org-element-put-property
                obj :value (replace-regexp-in-string "[[:alnum:]]" "x" value))))
            (link
             (unless (string= (org-element-property :type obj) "radio")
               (org-element-put-property obj :raw-link "http://orgmode.org";)))
            (plain-text
             (org-element-set-element
              obj (replace-regexp-in-string "[[:alnum:]]" "x" obj)))))
        nil nil nil t)
      (let ((buffer (get-buffer-create "*Scrambled text*")))
        (with-current-buffer buffer
          (insert (org-element-interpret-data tree))
          (goto-char (point-min)))
        (switch-to-buffer buffer))))


Regards,

-- 
Nicolas Goaziou



reply via email to

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