Subject: bug#14619: closed (Re: bug#21357: 24.5; Daemon leaves Mac OSX App open after closing GUI frame)

From: "Ryan C. Thompson" <[email-masked]>
Date: Sat, 9 Oct 2021 12:02:10 -0400

On 10/9/21 10:58 AM, GNU bug Tracking System wrote:
> Your bug report
>
> #21357: 24.3; Daemon mode and NS App could play nicer together
>
> which was filed against the emacs package, has been closed.
>
> The explanation is attached below, along with your original report.
> If you require more details, please reply to [email-masked].

Ok, I have tested this a bit, and I think it's an improvement over the 
previous behavior. However, I notice some weird edge cases that would 
need to be fixed before I could recommend this for general use. Try the 
following:

0. Start with no emacs running

1. Run "emacs --daemon". The emacs daemon should launch normally.

2. Try to launch the Emacs app normally. Nothing happens.

I'm not sure exactly what *should* happen when you do this, but doing 
nothing is clearly wrong. Possibly defensible choices include:

- automatically detecting a running daemon and running "emacsclient -c" 
instead of "emacs"

- ignoring the daemon and launching a separate non-daemon instance of Emacs

- Popping up a dialogue box informing the user that there's already an 
emacs daemon running?

- Somehow making this a user preference?

In addition, "emacsclient -c" does indeed create a new frame and 
activate the NS app, but that frame is created behind all other OS 
windows, unless it is the frame created upon launch by "emacsclient -c 
-a ''", in which case it appears in front of all other OS windows. This 
seems like it should be governed by a preference, but the default should 
probably be to appear in front, or else the user might not realize that 
the frame was actually created.