<p><a href="https://github.com/techee" class="user-mention">@techee</a> </p>

<blockquote>
<p>In my opinion, the whole prefix of the message that should be removed [...]</p>
</blockquote>

<p>I can remove the "FunctionName() failed:" from the spawn module. The other prefixes, if any, are added by the callers.</p>

<blockquote>
<p>ui_set_statusbar(TRUE, _("Cannot execute grep tool '%s';"<br>
       " check the path setting in Preferences.")</p>
</blockquote>

<p>This is indeed user friendly, but tells us absolutely nothing about why grep failed. My suggestion above was to maybe display a user friendly message, but also put the full text in Status or Debug -> Messages.</p>

<p>If we are going to display something like this, with no information from the actual GError message, there would be no reason to touch the spawn module...</p>

<p>(BTW, this particular message was not correct, unless you read "cannot execute" very widely: it was produced if g_find_program_in_path() failed, and the execution itself was about 60 lines below, with a completely different message.)</p>

<blockquote>
<p>_("Could not parse terminal command \"%s\" "<br>
               "(check Terminal tool setting in Preferences)")</p>
</blockquote>

<p>spawn_async() parses the command line and reports any errors in more detail. It also rejects insecure program names under Windows, which is not really a parsing error.</p>

<p>TL;DR:</p>

<p>Now, if I also remove the parsed command text from the spawn GError, leaving only the error description text (my 2nd suggestion), these may be unified and become:</p>

<p>Cannot execute grep tool "%s": . Check the path setting in Preferences.<br>
Cannot execute terminal command "%s": . Check the path setting in Preferences.</p>

<p>For example:</p>

<p>Cannot execute grep tool "c:\msys32\usr\bin\grep.exe": The system cannot find the file specified. Check the path setting in Preferences.</p>

<p>Cannot execute terminal command "": Text was empty (or contained only whitespace). Check the path setting in Preferences.</p>

<p>Seems pretty reasonable to me.</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/issues/541#issuecomment-147111111">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ_ChbmqMmOH-hB41uLomdB3PJEc5ks5o6UCLgaJpZM4FNtnl.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/issues/541#issuecomment-147111111"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>