Bug 306844 - Shift+Click should process source references even in selection (or zoom) mode
Summary: Shift+Click should process source references even in selection (or zoom) mode
Status: RESOLVED DUPLICATE of bug 306886
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.15.1
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-15 14:40 UTC by Christoph Lange
Modified: 2012-09-16 13:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
TeX source for pdflatex (80 bytes, text/x-tex)
2012-09-15 14:40 UTC, Christoph Lange
Details
PDF output from pdflatex (10.76 KB, application/unknown)
2012-09-15 14:41 UTC, Christoph Lange
Details
Sync file from pdflatex (526 bytes, application/x-gzip)
2012-09-15 14:41 UTC, Christoph Lange
Details
TeX source for lualatex (80 bytes, text/x-tex)
2012-09-15 14:41 UTC, Christoph Lange
Details
PDF output from lualatex (10.70 KB, application/unknown)
2012-09-15 14:42 UTC, Christoph Lange
Details
Sync file from lualatex (514 bytes, application/x-gzip)
2012-09-15 14:42 UTC, Christoph Lange
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Lange 2012-09-15 14:40:03 UTC
When opening a PDF file created with the synctex feature of pdflatex or lualatex, Okular no longer supports inverse search, i.e. it does not respond to Shift+Click.

(Note, I didn't find any corresponding entry in the “configure shortcuts” dialog – could that mean my configuration is broken?)

To make sure that it is not a problem with invoking my editor, I set the command line for the “custom text editor” to “kdialog --msgbox %l”.

BTW, I _think_ that inverse search should work regardless how Okular has been started. If step (1) below shouldn't work for you, try to start Okular by forward search, e.g.

okular --unique 'file:///home/clange/tmp/test-lua.pdf#src:3/home/clange/tmp/./test-lua.tex'

Reproducible: Always

Steps to Reproduce:
1. Open the attached file test-lua.pdf (or test-pdf.pdf) in Okular.
2. Go to some page, do a Shift+Click on some text.
Actual Results:  
Nothing happens

Expected Results:  
Okular should open the TeX source in some editor.
Comment 1 Christoph Lange 2012-09-15 14:40:47 UTC
Created attachment 73940 [details]
TeX source for pdflatex
Comment 2 Christoph Lange 2012-09-15 14:41:16 UTC
Created attachment 73941 [details]
PDF output from pdflatex
Comment 3 Christoph Lange 2012-09-15 14:41:34 UTC
Created attachment 73942 [details]
Sync file from pdflatex
Comment 4 Christoph Lange 2012-09-15 14:41:52 UTC
Created attachment 73943 [details]
TeX source for lualatex
Comment 5 Christoph Lange 2012-09-15 14:42:12 UTC
Created attachment 73944 [details]
PDF output from lualatex
Comment 6 Christoph Lange 2012-09-15 14:42:28 UTC
Created attachment 73945 [details]
Sync file from lualatex
Comment 7 Christoph Lange 2012-09-15 14:43:32 UTC
I should add that I'm using the following program versions to generate the PDF and sync files:

$ lualatex --version
This is LuaTeX, Version beta-0.70.1-2012081406

$ pdflatex --version
pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012)
Comment 8 Michel Ludwig 2012-09-15 15:59:41 UTC
When I open your document "test-pdf.pdf" with Okular (after having copied the synctex file as well) and do Shift+click, Okular prints on the console:

Okular::Document::processSourceReference: No such file: "/home/clange/tmp/./test-pdf.tex"

Then, after creating a file at this location, it is opened correctly. So, everything works fine with this file here with Okular from the master branch.

Was your original document located in the directory indicated above?
Comment 9 Christoph Lange 2012-09-15 16:24:41 UTC
Thanks, Michael! – below please find a reply to your comment.

But first of all, note that my bug report turned out to be invalid (sorry!), or at least its title and description should be changed. It turned out that I had the text selection tool (Ctrl+4) enabled when the “bug” occurred. With the hand tool (Ctrl+1) it works.

Now the question is whether that's a bug or a feature. One might argue that for navigating through a document, including navigating from the document to its source code, the hand tool is the right one. On the other hand, does Shift+Click do anything useful with the other tools? If not, one could consider enabling inverse search in these cases as well, as Shift+Click wouldn't shadow any keybindings recognized by these other tools. – For example, I tried the selection tool (Ctrl+3) and had Shift pressed while selecting. This didn't change the selection behavior (as it would do in some other programs, e.g. selecting squares instead of rectangles – which of course wouldn't make that much sense in PDFs).

(In reply to comment #8)
> Okular::Document::processSourceReference: No such file:
> "/home/clange/tmp/./test-pdf.tex"
Oh – sorry, …
> Was your original document located in the directory indicated above?
… but, indeed. I forgot that the source file location ends up hard-coded in the sync file. I should have run my test in a directory that exists everywhere, e.g. /tmp.

Good point about console error messages: It might have helped my investigations if I had got any, but I didn't.
Comment 10 Michel Ludwig 2012-09-16 11:17:41 UTC
Ok, I've changed the title. But Albert has to decide whether this is acceptable for Okular or not ;)

Console debugging output can usually be enabled with "kdebugdialog".
Comment 11 Christoph Lange 2012-09-16 11:37:33 UTC
great, thanks for your help!
Comment 12 Albert Astals Cid 2012-09-16 13:55:45 UTC

*** This bug has been marked as a duplicate of bug 306886 ***