On Fri, Mar 29, 2013 at 12:33 PM, Richard Heck <rgh...@lyx.org> wrote: > On 03/29/2013 12:22 PM, Scott Kostyshak wrote: >> >> On Fri, Mar 29, 2013 at 7:06 AM, Vincent van Ravesteijn <v...@lyx.org> >> wrote: >>> >>> Op 29-3-2013 6:59, Scott Kostyshak schreef: >>> >>>> On Thu, Mar 28, 2013 at 8:37 AM, Vincent van Ravesteijn <v...@lyx.org> >>>> wrote: >>>>> >>>>> >>>>> On Thu, Mar 28, 2013 at 8:19 AM, Scott Kostyshak <skost...@lyx.org> >>>>> wrote: >>>>>> >>>>>> See attached patch. >>>>>> >>>>>> Before, 'lyx -e pdf2' would give no error and would exit with 0. A use >>>>>> case is if a user has in a bash script the following command: >>>>>> >>>>>> lyx -e pdf2 "${mylxyfile}" || exit 1 >>>>>> >>>>>> where 'lyx' is mispelled as 'lxy' and thus yields an empty >>>>>> string. If LyX does not exit with an error, the script continues where >>>>>> the user probably intends for it to stop. >>>>>> >>>>>> Can it go in? >>>>>> >>>>>> Scott >>>>> >>>>> >>>>> What if the filename is not empty, but the file does not exist ? Does >>>>> it >>>>> exit with an error in that case ? >>>> >>>> It exits with code 1 but does not display an error message. The >>>> attached patch fixes this. >>>> >>>> Is it OK? >>>> >>>> Scott >>> >>> The message should be translated: >>> >>> docstring const error_message = >>> bformat(_("LyX failed to load the following file: >>> %1$s"), >>> from_utf8(fname.absFileName())); >>> lyxerr << to_utf8(error_message) << endl; >>> >>> Vincent >> >> Thanks, >> >> Attached is the patch (which I just copied from your code). > > > That looks like the previous patch. The one with translation can surely go > in.
You're right. I should use git send-email more often so that I don't get confused with attaching old vs. new patches. It's in at 70eddf2c Thanks, Scott