Subject: Re: bug#38264: 27.0.50; Emacs terminates unexpectedly when noninteractive is t

From: Ihor Radchenko <[email-masked]>
Date: Wed, 20 Nov 2019 00:57:18 +0800

> This is a feature: in non-interactive mode entering a debugger
> displays the backtrace and then kills Emacs.

It indeed makes sense. However, it does not make sense when
noninteractive is manually set to 't in normal interactive mode.
It may be difficult to see this backtrace if emacs was started graphically.
Note that package.el, for example, can set noninteractive to 't at some 
point (see package-generate-autoloads), even if emacs is otherwise
interactive. 

> Why are you binding noninteractive to t while debug-on-error is
> enabled?

Similar to package.el, straight.el also binds noninteractive to 't when
generating autoloads. As a result, emacs sometimes terminates when
building packages (https://github.com/raxod502/straight.el/issues/431).

Regards,
Ihor

Eli Zaretskii <[email-masked]> writes:

> tags 38264 notabug
> thanks
>
>> From: Ihor Radchenko <[email-masked]>
>> Date: Tue, 19 Nov 2019 10:51:39 +0800
>> 
>> When I try to run the following code, graphical emacs window terminates
>> losing all the unsaved data.
>> 
>> (setq debug-on-error t)
>> (let ((noninteractive t))
>>   (/ 1 0))
>> 
>> The problem is reproducible with emacs -Q.
>> Running the code without debug-on-error set to t does not trigger
>> termination. 
>
> This is a feature: in non-interactive mode entering a debugger
> displays the backtrace and then kills Emacs.
>
> Why are you binding noninteractive to t while debug-on-error is
> enabled?