Bug 263732 - add a commandline flag for dynamically specifying reverse-search editor command
Summary: add a commandline flag for dynamically specifying reverse-search editor command
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.10.5
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 12:10 UTC by Mark Edgington
Modified: 2022-02-18 13:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Edgington 2011-01-20 12:10:00 UTC
Version:           0.10.5 (using KDE 4.4.5) 
OS:                Linux

It would be good for Okular to support some means (e.g. a commandline argument) of setting the command to execute for reverse-search *dynamically*.

One example where this is useful is in the case that you run more than one VIM server, and would like for each vim-instance to be able to communicate to okular what vim servername it should use when executing the reverse-search command.


Reproducible: Didn't try
Comment 1 Patrick Massot 2017-08-18 14:17:33 UTC
It seems this is still not fixed in 1.0.3 and I see nothing indicating it's fixed in git master branch.

I don't know anything about C but, if it were python, this would be a ten minutes fix, so I guess it can't be much more than an hour of work to make reverse-search actually usable in Okular. In its current state it's usable only provided you have exactly one instance of the target editor opened, or else you need to go to the preference dialog each time you open okular. Indeed, how Okular could know which editor instance to communicate with?

Maybe we should be more explicit: what is needed is a command line flag allowing to set the value of what is currently in the preference dialog OkularSettings/editor/command.

It would be a great addition to Okular's greatness.
Comment 2 andreas.naumann 2022-02-06 16:49:01 UTC
The current implementation has a side effect. If one sets the external editor through the commandline, the change will be written to the configuration. Thus when opening other pdfs later, the external editor from the  last command-line setting will be used.
Comment 3 Albert Astals Cid 2022-02-18 13:33:32 UTC
Git commit 147a638619b4f8bbe80f42b9279c1e993cafc783 by Albert Astals Cid, on behalf of Andreas Naumann.
Committed on 18/02/2022 at 13:33.
Pushed by aacid into branch 'master'.

Adds option editor-cmd to the commandline

Adds the option "editor-cmd" for the [feature request](https://bugs.kde.org/show_bug.cgi?id=263732) .

M  +3    -3    autotests/annotationtoolbartest.cpp
M  +16   -16   autotests/mainshelltest.cpp
M  +19   -6    core/document.cpp
M  +15   -0    core/document.h
M  +3    -0    core/document_p.h
M  +8    -3    part/part.cpp
M  +1    -0    part/part.h
M  +13   -3    part/preferencesdialog.cpp
M  +1    -1    part/preferencesdialog.h
M  +1    -0    shell/main.cpp
M  +17   -0    shell/okular_main.cpp
M  +7    -0    shell/shell.cpp
M  +27   -12   shell/shellutils.cpp
M  +2    -2    shell/shellutils.h

https://invent.kde.org/graphics/okular/commit/147a638619b4f8bbe80f42b9279c1e993cafc783