Subject: Re: bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

From: Andrea Corallo <[email-masked]>
Date: Sat, 21 Nov 2020 20:35:03 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Stefan Kangas <[email-masked]>
>> Date: Sat, 21 Nov 2020 11:22:58 -0800
>> Cc: [email-masked]
>> 
>> > FWIW, I think this should be controlled by a user option.  It is not
>> > at all obvious that everyone would like compilation processes to be
>> > killed automatically, people might want to wait for them to complete.
>> 
>> Compiling in the background should in my opinion work as transparently
>> as possible.  The fact that we cache compilation results should be
>> considered an implementation detail.  We don't need to shape our
>> outwardly behavior by such implementation details.
>
> I understand your opinion, but I don't think that's the only opinion
> that could exist.  Caching the compiled modules can hardly be regarded
> as an implementation detail when compilation takes a tangible amount
> of time -- which is why we cache the results in the first place.  IOW,
> if compilation is interrupted, Emacs will try to compile it again the
> next time, and the code will run slower than expected.  So if this is
> an implementation detail, it will be acutely obvious to users, and
> they may wish to wait a bit with exiting Emacs to let the compilation
> run to the end.  It is not unlike the case where you sent an email
> message and want to exit Emacs before the message transmission has
> ended.  Users will appreciate a degree of control in these cases.
>
>> We could of course support what you suggest.  I'm not against it as an
>> option.  But I don't think it is very important, and it would take some
>> time and effort to implement and maintain.  I'm not sure that effort is
>> well-spent at this point, and would rather leave it for the future.
>
> I think interrupting compilation also comes with maintenance
> head-aches, such as the temporary files left behind, incomplete .eln
> files we'd need to clean up, etc.
>
>> IOW, I think we should work on reasonable defaults first, and only add
>> options in later once we are sure that we really need them.
>
> I think the argument is about what is "reasonable" here, all the rest
> is agreed upon.

I also think this option should be controlled by a customize.

I can picture most "power users" legitimately willing to be informed of
these processes being killed if present at exit.  OTOH I guess the
majority of non "power users" would like just to close Emacs
transparently.

Because of this my idea I think I'm for the transparent behavior as
default.

  Andrea