emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Fabrice Popineau <fabrice.popineau@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Emacs Lisp Depth
Date: Tue, 16 Sep 2014 15:38:43 +0200	[thread overview]
Message-ID: <87sijrk7mk.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFgFV9PeSNRYJccX1wK-Sd3vfQ94PnKhkKrUz97mMbg=_QuZrA@mail.gmail.com> (Fabrice Popineau's message of "Tue, 16 Sep 2014 15:01:01 +0200")

Hello,

Fabrice Popineau <fabrice.popineau@gmail.com> 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

  parent reply	other threads:[~2014-09-16 13:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16 13:01 Emacs Lisp Depth Fabrice Popineau
2014-09-16 13:37 ` Doug Lewan
2014-09-16 13:38 ` Nicolas Goaziou [this message]
2014-09-21 14:04 ` Grant Rettke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sijrk7mk.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=fabrice.popineau@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).