problem of forward search without opening program and with SessionData in SumatraPDF-settings.txt
SumatraPDF version
- Version 3.5-3.5.2 no problem in previous versions
Describe the bug
without opening the sumatrapdf program and with SessionData in SumatraPDF-settings.txt, forward searching do not work.
To Reproduce Steps to reproduce the behavior:
-
Download test file https://github.com/GitHubRulesOK/MyNotes/raw/master/AppNotes/SumatraPDF/LATeX%20and%20Reverse-Search.zip and extract, we have a folder
\LATeX and Reverse-Search -
Download portable version of SumatraPDF (eg. version 3.5 64bit) and extract to the folder
\LATeX and Reverse-Search -
delete
SumatraPDF-settings.txt(if there is any) -
close all instance of SumatraPDF (if there is any), run
"SumatraPDF-3.5-64.exe" -forward-search "sync.tex" 19 "sync.pdf" -
the line "A much longer and more evil second footnote" is highlighted as expected.
-
close all instance of SumatraPDF, run
"SumatraPDF-3.5-64.exe" -forward-search "sync.tex" 19 "sync.pdf"again -
the line "A much longer and more evil second footnote" is not highlighted as expected.
-
close all instance of SumatraPDF, open
SumatraPDF-settings.txt, deleteSessionDatasection, save and close. -
run
"SumatraPDF-3.5-64.exe" -forward-search "sync.tex" 19 "sync.pdf"again -
the line "A much longer and more evil second footnote" is highlighted as expected.
Expected behavior In step 7 above, the line "A much longer and more evil second footnote" should be highlighed
File that reproduces the problem If this is related to a specific PDF etc. file, please attach the file.
Screenshots
step 4-5 above:
step 6-7 above:
Additional context
summary: If the pdf file is already opening, there is no problem. If SumatraPDF-settings.txt does not contain SessionData, there is no problem. The problem occurs when the pdf file is not opening and SumatraPDF-settings.txt contain SessionData.
HaHa my example file, well AFAIK it works so testing 3.5.2 (I can only currently test 32bit)
but there are other conditions to be met. (tabs and reuse and interference by other files opening in a session.)
When using as a previewer newer SumatraPDF is best used in tabbed mode HOWEVER that can pre-load other files at the same time as previewing the target which can upset the calling sequence.
Best try with a separate portable copy where the settings can be kept static (or use a dedicated "appdata" dir)
if I adapt to
"..\SumatraPDF-3.5.2-32.exe" -appdata "%cd%" -forward-search "sync.tex" 19 "sync.pdf"
the setting will be in same working folder also note the test should highlight 2 areas note AND footnote
I update the reproduction of the problem with more detail.
If the pdf file is already opening, there is no problem. If SumatraPDF-settings.txt does not contain SessionData, there is no problem (eg. SumatraPDF-settings.txt does not exist). The problem occurs when the pdf file is not opening and SumatraPDF-settings.txt contains SessionData.
That was what I meant by
HOWEVER that can pre-load other files at the same time as previewing the target which can upset the calling sequence.