@zhekov In my opinion, the whole prefix of the message that should be removed, i.e.:
search_find_in_files: spawn_with_callbacks() failed: CreateProcess() failed:
This is something the users shouldn't see when GError message is displayed - it's just something that might be useful for debugging (might be fine to put it to the debugging messages).
Regarding the grep message, I think it wasn't a good idea to replace the original error message:
ui_set_statusbar(TRUE, _("Cannot execute grep tool '%s';"
" check the path setting in Preferences."), tool_prefs.grep_cmd);
with
if (command_grep == NULL)
command_line = g_strdup_printf("%s %s --", tool_prefs.grep_cmd, opts);
else
{
command_line = g_strdup_printf("\"%s\" %s --", command_grep, opts);
The original message didn't use the GError at all and I think in this case it's the right thing to do - we know that the grep command failed to execute so we tell the user plus the info what needs to be changed.
I didn't go through all the uses of the new spawn module but I can imagine such a thing happens on other places too - from the special case where the spawn() is called we can probably create a more useful error message than what the spawn() itself can generate.
—
Reply to this email directly or view it on GitHub.