Subject: Re: bug#71579: 30.0.50; Mailto URI handler emacsclient doesn't show unless there's a visible frame

From: Eli Zaretskii <[email-masked]>
Date: Mon, 10 Mar 2025 19:07:25 +0200

> From: Björn Bidar <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Mon, 10 Mar 2025 13:14:37 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > I'm not familiar with the notion of "desktop" in the context of
> > emacsclient.  emacsclient either uses an existing frame or (if invoked
> > with -c, or if there's no existing frame) creates a new one.  is what
> > you see consistent with what I say?  Is what you see consistent with
> > what happens when you invoke emacsclient with a name of a file, not
> > mailto URI, and leave all the other command-line options of
> > emacsclient unaltered?  If there's a difference, please describe how
> > emacsclient behaves differently compared to the other use cases.
> 
> No there's no difference in the behaviour.  I'm not sure if in this
> context emacsclient is the deciding the factor as the function that is
> called in Emacsclient can decide how to open the new buffer.

Like I said, emacsclient uses a very simple rule to decide whether to
open a new frame.  Users can affect that decision by using the -c
command-line option.  Is that insufficient in this case for some
reason?  (and why is it important in which frame will the mailto URL
appear, anyway?)

> The no visible frame on the current "desktop" is just one example.
> If there is no frame open at all no new frame will be opened ether.

If the daemon has no visible frame, then emacsclient should cause it
to create one and show it.