[RFC][PATCH] Change to GuiView::goToFileRow

Stephan Witt st.witt at gmx.net
Fri Feb 14 21:10:06 UTC 2020

Am 14.02.2020 um 21:00 schrieb Stephan Witt <st.witt at gmx.net>:
> Hi all,
> I’ve a problem in LyX master with reverse search I don’t have in 2.3.x.
> Unfortunately I cannot see the difference in LyX code causing it.
> The situation is: on Mac the directory /var is an symlink to private/var.
> So the temporary files are with real path below /private/var/. The SyncTex
> file contains this path name, e.g.
> Input:1:/private/var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.pfyyHSvCxUfX/lyx_tmpbuf0/./Tutorial.tex
> But the reverse search script is called with file name:
> /var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.pfyyHSvCxUfX/lyx_tmpbuf0/Tutorial.tex
> Some normalization happens here. I’ve changed the lyxeditor script to see the call. It’s not
> the operation in line 85 (were sed is used to remove /private from path name).
> To make the GuiView::goToFileRow() implementation more robust I came to the attached patch.
> I’m confident it cannot hurt. But as I don’t understand the situation completely I ask for comments.

I think I got it myself. The difference is the Qt5 implementation of QDir::tempPath() probably.
I’ve armed the sources with debug output and with Qt-5.9.8 I get this:

frontends/qt4/GuiView.cpp (3505): goToFileRow: row 628 in file /var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.akFIHtU22126/lyx_tmpbuf0/Tutorial.tex
frontends/qt4/GuiView.cpp (3506): goToFileRow: abstmp /var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.akFIHtU22126
frontends/qt4/GuiView.cpp (3507): goToFileRow: realtmp /private/var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.akFIHtU22126

So the correction in LyX goToFileRow implementation is triggered. But with Qt-5.12.6 this has changed.

What’s your opinion how to solve that?


More information about the lyx-devel mailing list