Am 15.02.2020 um 13:12 schrieb Enrico Forestieri <[email protected]>: > > On Fri, Feb 14, 2020 at 10:10:06PM +0100, Stephan Witt wrote: >> Am 14.02.2020 um 21:00 schrieb Stephan Witt <[email protected]>: >>> >>> 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 2.3.4.2 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? > > I may be dense, but I still fail to see the problem here and thus why your > patch corrects it.
I don’t like the patch anymore either. Much to complex, IMO. The problem is as follows: The buffer lookup uses package().temp_dir().absFileName() as temporary directory base name. This name isn’t the real path of it for Qt-5.9.8 and with Qt-5.12.6 it’s the real path name. One example for the result of package().temp_dir().absFileName() is: Qt-5.9.8 has /var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.akFIHtU22126 Qt-5.12.6 has /private/var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.akFIHtU22126 The path name externally given may be the real path or not. In my case it’s not (Skim output). With this scenario the lookup is done with the non real path but the buffer uses the real path and the lookup fails because of that. I came up with another path. IMHO easier to understand. And it works with all variants of Qt and input. A more generic fix would be to change the buffer lookup to use real path all the time internally. Stephan
goToFileRow-2.patch
Description: Binary data
-- lyx-devel mailing list [email protected] http://lists.lyx.org/mailman/listinfo/lyx-devel
