help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: functions to download mailing list archives


From: Óscar Fuentes
Subject: Re: functions to download mailing list archives
Date: Mon, 13 Jun 2022 01:04:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

GH <project@gnuhacker.org> writes:

> so Im writing functions to interact with ~lists.gnu.org~ http interfaces
>
> For example this function to download lists mbox archives:

[snip]

> But sadly the recursion stop with this warning:
>
> file-local-name: Lisp nesting exceeds `max-lisp-eval-depth'
>
> any idea to fix?

Instead of a recursive function use a recursive data structure: a list.

The outer function puts in the list the initial URL, and then, in a
loop, pops from the list a URL, downloads it, adds to the list the
referenced URLs and repeats until the list is empty or some other
condition is met.

Some complications may remain: for instance, you need to detect cycles
(the failure on your posted code probably comes from that). A list also
comes handy for that, if you walk the list with dolist instead of
popping elements and add new ones with add-to-list, which omits elements
which are already in the list.



reply via email to

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