Subject: bug#13889: lenient loading, feature request

From: Andreas Röhler <[email-masked]>
Date: Thu, 15 Jul 2021 08:56:40 +0200

On 15.07.21 08:36, Lars Ingebrigtsen wrote:
> Andreas Röhler <[email-masked]> writes:
>
>>> It might be a better idea to have a command that would continue
>>> loading from where it stopped.  This would allow the user to fix
>>> manually whatever was broken, and then continue from there.
>> Probably both is useful.
>> Someone might face a deadline the very day.
>> Emacs must work. No time to fix errors just now...
>> Error must not be as simple as a missing parenthesis.
>> Also imagine colleagues around, awaiting the result, wondering what
>> the guy is doing ;)
> Popping up the .emacs file with point where the error is would be more
> helpful than the current:
>
> ---
> Warning (initialization): An error occurred while loading ‘/home/larsi/.emacs’:
>
> Invalid read syntax: ), 1, 0
> ---
>
> I'm not sure how a general "continue loading" switch would work.  It's
> easy enough if there's a command that's erroring out -- we could ignore
> the error and continue loading.  But if it's a read-level error, then we
> don't really know where to continue loading from.
>
> I guess we could advance point by one character and try again in a loop
> -- that'd usually get us past the error points after a while...
>
Thought at something like

(unwind-protect BODYFORM UNWINDFORMS...)

here as

(unwind-protect load-current load-remaining...)