After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632317 - SyncSource sends the filename of the input relative to the pdf.
SyncSource sends the filename of the input relative to the pdf.
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-16 21:34 UTC by José Aliste
Modified: 2010-11-21 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[shell] Send the URI of the input file instead of the filename in SyncSource. (1.67 KB, patch)
2010-10-16 21:34 UTC, José Aliste
none Details | Review
[shell] Send the URI of the input file instead of the filename in SyncSource. (1.91 KB, patch)
2010-11-09 02:11 UTC, José Aliste
committed Details | Review

Description José Aliste 2010-10-16 21:34:21 UTC
Currently, SyncSource sends the filename of the input relative to the pdf. It would
be better if SyncSource sends the uri of the input. This also makes the DBUS API
more consistent since SyncView needs the URI.
Comment 1 José Aliste 2010-10-16 21:34:24 UTC
Created attachment 172514 [details] [review]
[shell] Send the URI of the input file instead of the filename in SyncSource.
Comment 2 José Aliste 2010-11-08 21:33:23 UTC
Review of attachment 172514 [details] [review]:

Arg... I just realized that behaviour of the synctex-parser depends on the version of pdflatex used to compile the file, so in some systems the filename is the complete path and in others just the relative pathm, which makes this patch obsolete. I will try to find a better solution.
Comment 3 Peter B. Jørgensen 2010-11-08 22:27:56 UTC
That sounds bad. I see only ugly solutions to this problem. I hope it is possible to find out what convention is used by looking at the synctex.gz file
Comment 4 José Aliste 2010-11-09 02:11:04 UTC
Created attachment 174115 [details] [review]
[shell] Send the URI of the input file instead of the filename in SyncSource.
Comment 5 José Aliste 2010-11-09 02:15:22 UTC
Actually, in the same machine pdflatex can either compile using relative pathnames or absolute pathnames (for some reason when compiling with rubber absolute pathnames are used and when compiling with plain pdflatex, relative ones are used) So the solution is just ask whether the filename of the link is absolute or not. 

@Carlos, I could not find a better solution to get the relative uri of the input file wrt the uri of the pdf. Other option would be to change the current_dir and use g_file_build_from_path but seems wrong.
Comment 6 José Aliste 2010-11-21 14:25:49 UTC
As discussed in IRC, I tried to factor the File logic of launch_external_uri and this patch, but it does not work since g_build_filename does not work with relative paths containing '..'. so, I'd say the patch is good to go.
Comment 7 Carlos Garcia Campos 2010-11-21 14:41:43 UTC
Comment on attachment 174115 [details] [review]
[shell] Send the URI of the input file instead of the filename in SyncSource.

please, push it. Thanks!.
Comment 8 José Aliste 2010-11-21 15:07:14 UTC
I just pushed to git master.