After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787348 - TOC-aware search
TOC-aware search
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
3.22.x
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-06 08:47 UTC by Johannes Berg
Modified: 2018-05-22 17:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johannes Berg 2017-09-06 08:47:21 UTC
Right now, searching will display the search results like this:


foo *asdf* bar      17
lorem *asdf* ipsum  27

in the side bar, and at the same time the TOC will not be visible.

I frequently search in long documents (e.g. the 802.11 spec with 3.5k pages), and the page numbers mean nothing to me - I usually am looking for search results within specific chapters (as there may be dozens or hundreds of results overall).

Given a document with the structure

Section 1
+ Chapter 1.1
+ Chapter 1.2
Section 2
+ Chapter 2.1
+ Chapter 2.2

it would be very nice to (optionally?) display the search results embedded into the TOC:

Section 1
+ Chapter 1.1
foo *asdf* bar      17
Section 2
+ Chapter 2.2
lorem *asdf* ipsum  27

Note how the leaf nodes, here "Chapter X.Y" are elided when they contain no results.
Comment 1 Germán Poo-Caamaño 2017-09-06 12:29:38 UTC
Evince can detect when the document has a TOC, and show the results accordingly.

I have my doubts regarding the level of granularity to show, because it is common to find documents with sections in the same page.

I think, that even showing only the first level in the TOC would be an improvement, although in short-ish documents (e.g. scholar papers) still will be necessary to use some heuristic to determine to which section a text belongs (when those sections are in the same page).
Comment 2 Johannes Berg 2017-09-06 12:42:44 UTC
(In reply to Germán Poo-Caamaño from comment #1)

> I have my doubts regarding the level of granularity to show, because it is
> common to find documents with sections in the same page.

Sure, but evince should - in theory at least, since you can jump to a very specific part of the page by using the TOC - know exactly which section a search result belongs to?

It only keeps the page->TOC entry mapping now for the reverse display (patch from my brother Benjamin), but that's just an implementation detail?

IOW, I'm not really sure what you're saying here.
Comment 3 Johannes Berg 2017-09-06 13:08:19 UTC
Or maybe I should say - yes, I think the following _would_ be useful for a search result:

Section 1
+ Chapter 1.1
foo *asdf* bar      17
+ Chapter 1.2
Another *asdf* here 17
+ Chapter 1.3
And *asdf* again    17
Section 2
+ Chapter 2.2
lorem *asdf* ipsum  27


(note three hits on the same page, in different chapters)
Comment 4 GNOME Infrastructure Team 2018-05-22 17:22:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/831.