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, 17 Jun 2024 14:55:04 +0300

> From: Björn Bidar <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 17 Jun 2024 06:49:47 +0300
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> Date: Sun, 16 Jun 2024 00:35:11 +0300
> >> From:  Björn Bidar via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <[email-masked]>
> >> 
> >> 
> >> If there's no open frame when using the emacsclient version of the
> >> mailto handler no frame to show the newly created message buffer
> >> will be opened.
> >> 
> >> 1. Use Emacs (client) as mailto handler
> >> 2. Make sure all frames are closed
> >> 3. Open mailto link
> >> 4. See bug
> >
> > Thanks, but please tell more details.  Specifically, how do you do
> > item 1 above?  Also item 3.  Someone will have to reproduce these
> > steps to try to debug them, so we need to know those details.
> 
> 1. The Emacs Client Email desktop file emacsclient-mail.desktop
>    is set as application to open mailto links
>    in the users desktop environment, in my case this is KDE.
> 3. Open mailto link means open a mailto link in a application such
>    as a browser to be specific I used the website below to test:
>    https://www.scottseverance.us/mailto.html
> 
> Emacs is running with emacs --fg-daemon without any frames open.

Thanks.  If you invoke the same command, does it also fail to display
a frame?  I don't have access to a system where I can use
emacsclient-mail.desktop, so I did the following to emulate that:

  . start emacs --fg-daemon
  . from a different terminal started this command:

      ./lib-src/emacsclient --alternate-editor= --create-frame --eval "(message-mailto (pop server-eval-args-left))" [email-masked]'

This opened a new frame with a mail composition buffer shown.  So the
problem is not reproduced on my system.

Can someone else please try reproducing this?