Bug 352657 - Synctex: synchronization between PDF viewer (okular) and text editor (kate) doesn't work in current version of okular
Summary: Synctex: synchronization between PDF viewer (okular) and text editor (kate) d...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.23.0
Platform: Debian unstable Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-13 11:43 UTC by Frederic Tronel
Modified: 2015-09-13 14:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to solve the issue. (1.03 KB, patch)
2015-09-13 11:44 UTC, Frederic Tronel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Tronel 2015-09-13 11:43:23 UTC
Synctex: synchronization between PDF viewer (okular) and text editor (kate) doesn't work in current version of okular.
The bug is due to a change of the parameters accepted by kate.
kate used to accept the "--use" option. This option has disappeared.
When configured with kate in the editor settings,  okular still calls kate by passing the
"--use" option.

This should be changed (the "--use" option is now implicit).
I have attached a patch.

Reproducible: Always

Steps to Reproduce:
1. Compile a Latex document with pdflatex and activate synctex (e.g. put a \synctex=1 in the preamble of the document). 
2. Open the resulting PDF with okular.
3. Configure okular so that it uses "kate" as editor ("Settings -> Configure Okular -> Editor -> Kate).
4. Left mouse button + shift in any part of document should launch a instance of kate to edit the corresponding .tex document.
5. With the current version of okular, nothing happens.
6. On the console a "--use unknown option" message appears.

Actual Results:  
With the current version of okular, nothing happens.
On the console a "--use unknown option" message appears.

Expected Results:  
Kate should be launched.

Apply the following patch:

diff --git a/conf/okular_core.kcfg b/conf/okular_core.kcfg
index 054b5c1..35aaa9d 100644
--- a/conf/okular_core.kcfg
+++ b/conf/okular_core.kcfg
@@ -76,7 +76,7 @@
    </choices>
   </entry>
   <entry key="ExternalEditorCommand" type="String">
-    <default>kate --use --line %l --column %c</default>
+    <default>kate --line %l --column %c</default>
   </entry>
  </group>
  <group name="Core Presentation" >
diff --git a/core/texteditors_p.h b/core/texteditors_p.h
index 026d344..e41084d 100644
--- a/core/texteditors_p.h
+++ b/core/texteditors_p.h
@@ -22,7 +22,7 @@ static inline QHash< int, QString > buildEditorsMap()
 {
     QHash< int, QString > editors;
     editors.insert( SettingsCore::EnumExternalEditor::Kate,
-        QString::fromLatin1( "kate --use --line %l --column %c" ) );
+        QString::fromLatin1( "kate --line %l --column %c" ) );
     editors.insert( SettingsCore::EnumExternalEditor::Kile,
         QString::fromLatin1( "kile --line %l" ) );
     editors.insert( SettingsCore::EnumExternalEditor::Scite,
Comment 1 Frederic Tronel 2015-09-13 11:44:23 UTC
Created attachment 94537 [details]
Patch to solve the issue.
Comment 2 Albert Astals Cid 2015-09-13 14:41:51 UTC
Git commit 4fee5131e9daf98443049954e5d70a4fdf363197 by Albert Astals Cid, on behalf of Frederic Tronel.
Committed on 13/09/2015 at 14:41.
Pushed by aacid into branch 'Applications/15.08'.

Do not --use when invoking kate anymore

M  +1    -1    conf/okular_core.kcfg
M  +1    -1    core/texteditors_p.h

http://commits.kde.org/okular/4fee5131e9daf98443049954e5d70a4fdf363197