Bug 311045 - Search strings should be parsable from the command-line
Summary: Search strings should be parsable from the command-line
Status: RESOLVED DUPLICATE of bug 362038
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.15.3
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL: http://ge.tt/5qMRFmS/v/0?c
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-02 21:30 UTC by Florian Moretz
Modified: 2019-03-16 00:08 UTC (History)
5 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 Florian Moretz 2012-12-02 21:30:06 UTC
Evince offers a command-line argument that allows users to parse a search string into the search field. For instance,

evince --find=searchterm document.pdf

will open the document with "searchterm" in the search field. Invoking the search field  - e.g. by hitting CTRL+F - then searches through the document for "searchterm".

The key application of this feature is the integration of PDF viewers into document indexers such as Recoll (http://www.lesbonscomptes.com/recoll/release-1.18.html). 

As of its newest release, Recoll supports the indexing of phrases in the context of their position within the document. If a corresponding match is found Recoll directly parses the page number and the stemmed search term to evince. You can see the feature in action here: https://www.youtube.com/watch?v=GeeIBP8PbGE

One important note: Evince only searches through the document after activating its search field. This option is important as searching through large PDF documents can be ressource heavy at times. If the instance of the search term is obvious enough on the page, e.g. in case of a heading,  a search  might be unnecessary. Giving the user the option to either use the automatic search or manually scan through the page for the search term alleviates this.

Proposal:

Add a command-line option akin to the one in Evince, which allows parsing search terms to Okular's search field. Optionally add a command line switch that determines whether Okular immediately engages in a search upon opening the document or only after activating the search field.
 
-------------------------------------------------------------------------------------------------------------------------

Summary: 

Adding a command-line option to parse search strings into okular would significantly improve its integration with powerful indexing tools such as Recoll

Reproducible: Always
Comment 1 Florian Moretz 2012-12-02 23:04:38 UTC
I forgot to add that this option should preferrably work with the "--unique" switch, so that you can easily jump between pages and search terms within the same instance of an opened document.

Also, here's a link to download the original screencast of the youtube video I linked to above: http://ge.tt/5qMRFmS/v/0?c
Comment 2 João Netto 2019-03-14 23:46:29 UTC
Isn't this implemented with https://phabricator.kde.org/D18144?
Comment 3 Albert Astals Cid 2019-03-16 00:08:15 UTC
Yes

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