Am Dienstag, 23. Juli 2019, 09:13:00 CEST schrieb Jürgen Spitzmüller: > Am Dienstag, den 23.07.2019, 01:22 +0200 schrieb Kornel Benko: > > ATM, we have this line for forward search (see Tools->Preferences- > > >Output->General) > > > > Pdf command: okular --unique "$$o#src:$$n $$f" > > > > In this form it does not work, because the provided pdf-file-name > > does not contain path. > > It used to work. I just tried: it also does not work if we submit a > full path to the pdf file. > > This looks like a bug in okular. > > Jürgen >
No, it works here with full path. BUT the attached patch makes it to work too, I don't know why. The only reason I can think of is that the compiler somehow optimizes the destruction of 'p' too early. Kornel
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index 6e87f00..5b01aed 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -4494,13 +4494,15 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) command = subst(command, "$$n", texrow); command = subst(command, "$$f", fulltexname); command = subst(command, "$$t", texname); command = subst(command, "$$o", outname); - PathChanger p(path); - Systemcall one; - one.startscript(Systemcall::DontWait, command); + { + PathChanger p(path); + Systemcall one; + one.startscript(Systemcall::DontWait, command); + } break; } case LFUN_SPELLING_CONTINUOUSLY: lyxrc.spellcheck_continuously = !lyxrc.spellcheck_continuously;
signature.asc
Description: This is a digitally signed message part.