Subject: bug#79058: 30.1; involking signal using emacsclient takes very long time to complete ~2 seconds

From: Eli Zaretskii <[email-masked]>
Date: Thu, 24 Jul 2025 10:07:51 +0300

> From: Bror Winther <[email-masked]>
> Date: Thu, 24 Jul 2025 02:29:26 +0200
> Cc: [email-masked]
> 
>  No, --eval doesn't disable creation of a client frame.  Try this:
> 
>   $ emacsclient -t --eval '(message "foo")'
> 
>  This creates a client frame on the current terminal, and shows the
>  message "foo" there.
> 
> Right, sorry for the confusion with a -t og -c option that makes sense but with 
> just --eval alone I don’t think the server should wait. Would you be open to a 
> solution that ignores the wait if the caller client does not have a child frame. 
> I have not researched if it is possible but would like to know if it is even worth
>  spending time on it.

If we can reliably detect the case where the frame showing the message
will not be deleted when emacsclient disconnects, we could avoid
waiting in those cases.  But I very much doubt this is possible, let
alone simple: --eval argument and the functions it calls could, for
example, delete a frame by their own volition, or the frame could be
deleted because what emacsclient does triggers some Emacs mechanism
which deletes frames in certain cases, etc.

Since adding a variable provides a simple way of controlling this when
needed, in addition to ignoring non-essential errors we already have,
I doubt trying to do that automatically in some cases is worth your
time.