From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <2020-01-19T13-36-19@devnull.Karl-Voit.at> Reply-To: Karl Voit Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58367) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1it9ov-0000hx-63 for emacs-orgmode@gnu.org; Sun, 19 Jan 2020 07:36:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1it9ot-0008O9-O7 for emacs-orgmode@gnu.org; Sun, 19 Jan 2020 07:36:49 -0500 Received: from ciao.gmane.io ([159.69.161.202]:57704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1it9ot-0008Md-Hj for emacs-orgmode@gnu.org; Sun, 19 Jan 2020 07:36:47 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1it9or-000Gsd-F9 for emacs-orgmode@gnu.org; Sun, 19 Jan 2020 13:36:45 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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/