when typing the name of a bookmark stored in a PDF document, krunner doesn't list it please move if this is a bug related to krunner not to okular Reproducible: Always
To Baloo devels: Just pass the href of the bookmarks.xml file back to Okular, right now it fails to open the file at the exact point of the bookmark, but that's trivially fixable once you're calling back.
Hi. Could you please provide the following info - 1. How do you store a bookmark in Okular? Do you mean a manually created "Bookmark" or the "Table of Contents". 2. You're expecting that when you make a bookmark called "Dog" in file.pdf, and then you search for "Dog", the 'file.pdf' comes in the results?
I create the bookmark manually and I expect the bookmark "Dog" to be listed as bookmark in krunner. krunner usually displays bookmarks (from the browser for example) as custom results. If I select the result I expect Okular to open the PDF and to scroll to the bookmarks position.
Marking as CONFIRMED.
Would be really nice to have that Feature.
I would like to work on this, where do I start looking around in the code?
Hey Pinak. I know this bug is assigned to Baloo, but it's going to be very difficult to implement in Baloo. We discussed this a little (Okular developers and I), and we think it might be more sensible for us to write a krunner for specially searching through Okular. Reasons why Baloo is not the best candidate for solving this - - Baloo is just a file indexer. It indexes the metadata inside the files. - Okular does not store annotations inside the file. Rather, it stores them in an xml file in its data directory. You'll have to look for that files name. - If Baloo were to be used, one would have to index that file specifically and then associate it with the pdf files. It gets quite complex. - Additionally, Baloo's current architecture just makes it return file paths. For this we would need it to return a custom url which okular could recognize and them open in that specific location.
"Okular does not store annotations inside the file" -> "Okular does not store bookmarks inside the file"
In order to cover several similar use-cases, such as: a) searching by Okular bookmarks / reviews (in KRunner and Dolpnin) b) searching by KMail tags/mail-attached notes(in KRunner) .. I think there should be possibility to write some plugin-based particular providers used to carry on additional metadata to Baloo. Beside this, baloo feature to return custom urls(which is quite complex) could be used to implement obvious feature to show preview/snippets in a regular text search results list.
After quick Baloo sources viewing I have two suggestions: A) Baloo EmailIndexer does not index mail attributes(that's why KMail mail notes/comments are not included to full-text mail index). I think it is pretty easy to improve. B) In a similar way it would be great for Okular to save its bookmarks to Akonadi DB rather than to own preference file, so Baloo would be able to use Akonadi additional metadata to improve filesystem full-text index including pdf's bookmarks and review comments