emacs-orgmode
[Top][All Lists]
Advanced

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

ICS agenda export exceeds max-specpdl-size probably because of org-depen


From: Karl Voit
Subject: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)
Date: Sun, 19 Jan 2020 13:36:40 +0100
User-agent: slrn/pre1.0.0-18 (Linux)

Hi all,


BACKGROUND:

I'm using org-depend since ages[1]. As a matter of fact, it was the
initial reason why I started with Org mode in the first place.

One of my many workflows[2] exports the agenda for the upcoming 60
days into an ICS file via a cron job during night:

: emacs-snapshot --batch --load /home/vk/.emacs.d/init.el --eval '(progn 
(my-export-agenda))'

my-export-agenda[6] basically consists of:
: (org-agenda-list nil nil 60)
: (org-agenda-write (concat my-user-emacs-directory 
"var/export/agenda-export.ics"))

This ICS file is then postprocessed and uploaded to my calendar server
so that my mobile phone calendar is able to display events and
appointments.


This workflow stopped working end of December.


ERRORS and INVESTIGATION:

Error message when this batch run of Emacs exits after 5 hours(!):
: Lisp nesting exceeds ‘max-lisp-eval-depth’

I updated my Org version[3] recently to get v9.3 from git maint. This
was Wed Dec 4 10:37:19 2019 +0100. So the issue with the ICS export
did not appear at the same time of the update.

I also get:
: [...]
: Preparing diary...done
: Preparing diary...done
: Position saved to mark ring, go back with ‘C-c &’. [1038 times]
: org-before-first-heading-p: Variable binding depth exceeds max-specpdl-size

I changed the value for the variables without changing the result:
: (setq max-specpdl-size 10000)
: (setq max-lisp-eval-depth 50000)

I even upgraded my Emacs version from 25 to 27[3]. No change.

I reduced my set of org-agenda-files and did some test runs: most
single org files resulted in an ICS export. Some single org files did
result in the error.

Reducing the export period from 60 to 7 days did not change the error.

I also get following as execution cancellation error:
: Before first headline at position 586 in buffer  *temp*-99684

When running the job, I see *lots* lines like[4]:
: Garbage collecting...
: Garbage collecting...done

To me, it's a data-related issue with my Org mode files so that others
most likely are not able to reproduce my issue at all.

Disabling org-depend results in a working ICS export that took much
less time. I'm not sure if org-depend is directly related or just
reduces "the complexity" such that the job is able to be finalized.


QUESTIONS:

I'm looking for ideas what I may check in order to be able to use
org-depend again.

Should I do a profiler report? How do I have to do this in order to
get good results?

Further more: is here somebody able to tell if org-edna[5] does have
this issues as well? After all, org-edna is somewhat more complex than
org-depend.


A migration from org-depend to org-edna would be doable to me but with
a decent effort. (I'm thinking of migrating only tasks that are not
DONE or CANCELLED as I do think closed tasks do not irritate org-edna
with old org-depend syntax.)



[1] https://karl-voit.at/2016/12/18/org-depend/
    Almost everything I use is :BLOCKER: properties and very
    rarely :TRIGGER: events.

[2] just a selection is described on 
https://karl-voit.at/2019/09/25/using-orgmode/

[3] Org mode version 9.3 (release_9.3-3-g46319b.dirty @ mixed installation!
    GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
                       3.22.11) of 2019-12-15, unofficial emacs-snapshot build

[4] I setup up "gcmh" package because of a comment on:
    
https://www.reddit.com/r/orgmode/comments/e9p84n/scaling_org_better_to_use_more_medsize_files_or/fcm5bsc/

[5] https://elpa.gnu.org/packages/org-edna.html

[6] https://github.com/novoid/dot-emacs/blob/master/config.org


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




reply via email to

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