[Top][All Lists]

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

Re: Emacs Lisp Depth

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


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

  (defun ngz-scramble-contents ()
    (let ((tree (org-element-parse-buffer)))
      (org-element-map tree '(code comment comment-block example-block 
                                   keyword link node-property plain-text 
        (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)))
                obj :value (replace-regexp-in-string "[[:alnum:]]" "x" value))))
             (unless (string= (org-element-property :type obj) "radio")
               (org-element-put-property obj :raw-link "http://orgmode.org";)))
              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))))


Nicolas Goaziou

reply via email to

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