On Wed, Aug 30, 2023 at 07:36:08AM +0200, Jürgen Spitzmüller wrote: > Am Dienstag, dem 29.08.2023 um 23:30 +0200 schrieb Pavel Sanda: > > Quick check shows that the new approach breaks in multiple ways on my > > system. > > I'd like to see those.
- only first file from multiple files found is shown (fixable) - gimp is launched on the pdf file (fixable but not on the lyx side) although multiple pdf viewers are installed - when fixed old instead of new instance of pdfviewer is launched (probably fixable, but not on the lyx side) I didn't give it much time to see another consequences, only first issue might be worth of your attention. > > I'm sure there are ways to gradually fix this but I have different > > proposal. > > > > Would you mind that instead of just checking for empty results we > > allow the script also to return e.g. "?internally_handled?" and show > > no response in such case? > > I don't follow. In the current patch you have this: + target = rtrim(ret.result, "\n"); + if (target.empty()) { + frontend::Alert::error(_("Could not open file"), + bformat(_("No file was found using the pattern `%1$s'."), + from_utf8(tar))); + return; and I'd like to add before target.empty() something like if (target == "?internally_handled?") return; This way one can use the paperview script still for launching if need be. Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel