<p>In <a href="https://github.com/geany/geany/pull/701#discussion_r42655396">src/spawn.c</a>:</p>
<pre style='color:#555'>> @@ -577,7 +604,83 @@ static gboolean spawn_async_with_pipes(const gchar *working_directory, const gch
>  
>    spawned = g_spawn_async_with_pipes(working_directory, full_argv, envp,
>            G_SPAWN_SEARCH_PATH | (child_pid ? G_SPAWN_DO_NOT_REAP_CHILD : 0), NULL, NULL,
> -          child_pid, stdin_fd, stdout_fd, stderr_fd, error);
> +          child_pid, stdin_fd, stdout_fd, stderr_fd, &gerror);
> +
> +  if (!spawned)
> +  {
> +          gint en = 0;
> +          const gchar *message = gerror->message;
> +
> +          /* try to cut glib citing of the program name or working directory: they may be long,
> +             and only the caller knows whether they're UTF-8. We lose the exact chdir error. */
> +          switch (gerror->code)
</pre>
<p>Unfortunately not. All "en" errors are returned by exec(), so they are the most common ones. And it's not about shrinking only.</p>

<p>The first reason is that g_spawn cites possibly non-UTF-8 text in a GError. Put something like this in geany_debug(), and Help -> Debug Messages will abort Geany with an assertion. And if that can happen, how can I be sure about the status bar, or the Status tab? The next gtk+ version may cause Geany to abort.</p>

<p>The second reason is to unify the format. g_spawn() cites the program name for some errors, but not for others, whereas we want standard <code>Cannot execute <what program> "<program>": <error text>. Check the path setting in <...></code> messages everywhere. At least that's the current consensus.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/701/files#r42655396">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxh0A0yKlMZrxnuNhF5IFAaoh1fYks5o98PvgaJpZM4GRgsl.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/701/files#r42655396"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>