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 710681 - History navigation is broken
History navigation is broken
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-22 20:42 UTC by woky
Modified: 2018-05-22 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add old_page to history on page-change (1.05 KB, patch)
2014-02-18 19:24 UTC, Anuj Khare
none Details | Review
Fix duplicate entries and set title of history when following a link (3.30 KB, patch)
2014-02-18 19:29 UTC, Anuj Khare
none Details | Review
Implements ev_link_set_title method (1.53 KB, patch)
2014-02-18 19:31 UTC, Anuj Khare
none Details | Review

Description woky 2013-10-22 20:42:05 UTC
Hello,

steps to reproduce:

1) Open this https://www.gnu.org/software/automake/manual/automake.pdf
2) Navigate to chapter "Miscellaneous Rules" via right menu
3) Scroll to "Include" chapter
4) Click "Section 3.5 [Canonicalization], page 22" (first link in chapter)
5) Click back in toolbar
6) Observe that you're brought back into beginning of "Miscellaneous Rules" chapter instead of the page from where you jumped previously

In this PDF document the buggy behavior I just described doesn't happen that often. In following document however, it happens very frequently, making history navigation completely unusable:

ftp://math.feld.cvut.cz/olsak/linal/linal2.pdf

Happens in Evince 3.10 as well as in Evince git aad31826 (Tue Oct 15 14:19:11 2013 +0700).

Someone on IRC noted that searching might also factor buggy history navigation:

< b> probably you should also factor in the jump behavior when searching
< b> today i noticed when pressing f3 to go to the next hit, at some point it starts looping between two hits
Comment 1 andreasfleig 2013-10-22 20:58:10 UTC
This is also a problem in 3.8.x. A properly working back button would do a lot to preserve the reading flow in scientific papers. Currently, if I follow a literature reference link, I have to manually scroll back to the position where I left off.
Comment 2 Stas Fomin 2013-11-26 13:44:07 UTC
Please, fix it!

Hypertext PDFs are completely unreadable in Evince without «Back».
I have to swith to Okular or use PDF.js because of this bug.
Comment 3 Anuj Khare 2014-02-18 19:22:57 UTC
Hi,

Presently, history is added at :
1) Page change (when change in page no. is greater than 1)
2) Clicking on some link

In both the cases, only the new page is added.

Issue :
This issue, along with the one in https://bugzilla.gnome.org/show_bug.cgi?id=696891 is because the page "from" which we jumped is not in the history because it does not fall into the above two categories.

Solution (Patch 1) :
It can be fixed by adding the old_page (to go back) to the history, on page change, in addition to new_page (to go forward if you come back).

Please note that :
1)This often will lead to 2 pages being added to the history at once, which might seem odd.
2)In some cases, subsequent pages might also get added.

However, these do not affect the usability and overall navigation is as desired.

Complication :
The ev_view_handle_link function emits both handle-link signal (which adds a link to history with apt title) and page-change. 
-Since now old_page is being added to history, we need to have page-change before handle-link.
-Hence, title of the link needs to be added now.

Possible solution (Patch 2) : 
I have proposed a patch which will first cause page-change, hence adding old_page and new_page.
Then modify the title of the latest link added to history in handle-link signal's cb, rather than adding a new link. 

For the same, a set_title method has been implemented in ev-link. (Patch 3)

Also, if the method is fine, then it can be improved by modifying the set_title method in history to take only the title instead of the link, and the handle-link method accordingly.

Kindly review, and suggest.
Comment 4 Anuj Khare 2014-02-18 19:24:24 UTC
Created attachment 269599 [details] [review]
Add old_page to history on page-change
Comment 5 Anuj Khare 2014-02-18 19:29:15 UTC
Created attachment 269601 [details] [review]
Fix duplicate entries and set title of history when following a link

The ev_history_add_link call is replaced by ev_history_set_current_link_title to prevent the new_page from being added twice, and also set its title.
Comment 6 Anuj Khare 2014-02-18 19:31:29 UTC
Created attachment 269602 [details] [review]
Implements ev_link_set_title method

This is used in the other patch.

I separated it because I'm not sure if this is the best way to do this.
Comment 7 Anuj Khare 2014-02-20 12:14:31 UTC
The same feature (going back) is requested in this bug : https://bugzilla.gnome.org/show_bug.cgi?id=707336 .
Comment 8 Ryan Reich 2014-03-03 04:14:21 UTC
I agree with the sentiment of the complaints here: as currently implemented, the back button makes hyperlinks useless.  It needs to remember the page linked from.
Comment 9 Jonathan Holmes 2015-03-30 20:55:17 UTC
I am having this problem with hyperlinks in my math papers in evince 3.10.3. In practice, I only navigate by clicking on hyperlinks and scrolling. The only thing the back button ever does is navigate to the page the pdf was first opened to, which is utterly pointless. I am going to have to switch to a new PDF viewer until this bug is fixed - evince is simply not usable for me.
Comment 10 Jae-hyeon Park 2015-03-31 14:23:17 UTC
Evince has a long tradition of being excellent except for history navigation.  See e.g. Bug 169903 (from 2005) in which a back button had even been regarded as a bloating feature.  Since then, there was a short window of time in which the back button at least brought me to the page from which I jumped by clicking on a reference.  This was the case e.g. with Evince 3.6.1.  Nevertheless, this was IMO inferior to what acroread and Okular offer: bringing back to the exact location within the document, not always to the top of a page.  That is, they remember not only the page number but also the coordinates of the point I was looking at.  This is a huge advantage when reading a paper full of equations.  Now, even that partial navigation support has been broken again and is remaining so until Evince 3.14.1.
Comment 11 woky 2015-03-31 14:39:31 UTC
I came here to unsubscribe because but it seems I can't (because I created the bug?). Please unsubscribe me. Thank you.

I've switched to Zathura long ago and I'm very happy with it. I also use Okular for some things (annotations). People also suggested llpp to me but I've little experience with it.

B-but Gnome runs on Wayland now. That's what matters. ))
Comment 12 GNOME Infrastructure Team 2018-05-22 15:19:59 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/399.