Bug 380330 - Bookmarks disconnected after path change
Summary: Bookmarks disconnected after path change
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.25.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-29 22:29 UTC by Jeff Dooley
Modified: 2020-12-03 16:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Okular Bookmarks Screenshot (122.58 KB, image/png)
2017-05-29 22:29 UTC, Jeff Dooley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Dooley 2017-05-29 22:29:23 UTC
Created attachment 105767 [details]
Okular Bookmarks Screenshot

I created a new bug, even though I recognize this bug is tightly linked to Bug 158837.

The reason I'm documenting this as a new bug is because I am _NOT_ highlighting this as a readability issue from the sidebar. In fact, I don't even use the sidebar normally, until I started investigating this issue.

From my perspective, following a change to the path (either file name, or a changed directory), the bookmarks are completely lost (!). Now, I have since learned that they are not in-fact lost, but instead simply disconnected to my updated file name.

The issue is not readability. The issue is that I may not want to bother bookmarking future PDF files in future. File name and path name changes occur _all the time_. You can't see them all in the attached screenshot, but I have about 20 bookmarks in that one research paper. I have to re-link them individually or just re-create them anew, which is probably easier.

This is a major nuisance. Had I not researched this bug, as an ordinary user I would have not understood why my bookmarks just disappeared from the Bookmarks menubar for no apparent reason. Since path changes are commonplace in my typical workflow, it makes me wonder whether okular bookmarks are worth using at all.
Comment 1 Nate Graham 2018-08-20 12:35:47 UTC
Confirming the issue. Okular devs, is there any way we could store this information inside the PDF file itself, like we do for annotations? Is there a field we can use?
Comment 2 Albert Astals Cid 2018-08-20 20:45:23 UTC
Let's say you save the bookmarks on a pdf file (which you can not), how do you pretend to know all the bookmarks you have on your system? You need a file that points to those files, so you have the same problem.

Basically bookmarks need to point at files. If you move the file the bookmark will be lost, there's no way around it (well actually if the move was done by a "KDE App" it could try to update the bookmark files, but if you do a move with the terminal, there's no way to fix this (unless you add a global file moving watching daemon))
Comment 3 Nate Graham 2018-08-20 20:52:22 UTC
(In reply to Albert Astals Cid from comment #2)
> Basically bookmarks need to point at files. If you move the file the
> bookmark will be lost, there's no way around it (well actually if the move
> was done by a "KDE App" it could try to update the bookmark files
That would be a pretty good 90% solution, I think.


> but if you do a move with the terminal, there's no way to fix this
> (unless you add a global file moving watching daemon))
Doesn't Baloo already do this? We might be able to leverage it here.
Comment 4 Albert Astals Cid 2018-08-20 21:00:42 UTC
(In reply to Nate Graham from comment #3)
> (In reply to Albert Astals Cid from comment #2)
> > Basically bookmarks need to point at files. If you move the file the
> > bookmark will be lost, there's no way around it (well actually if the move
> > was done by a "KDE App" it could try to update the bookmark files
> That would be a pretty good 90% solution, I think.

I'd say your number is too high, but ok :D

> > but if you do a move with the terminal, there's no way to fix this
> > (unless you add a global file moving watching daemon))
> Doesn't Baloo already do this? We might be able to leverage it here.

But not everyone runs baloo (I don't) and also i think you can exclude some folders from baloo watching so it's not really the panacea either

Anyhow both of those "solutions" is something kind of outside the scope of okular, so other people's ideas/workforce welcome :)
Comment 5 Jeff Dooley 2018-08-21 03:46:25 UTC
(In reply to Albert Astals Cid from comment #2)
> Let's say you save the bookmarks on a pdf file (which you can not), how do
> you pretend to know all the bookmarks you have on your system? You need a
> file that points to those files, so you have the same problem.

Bookmarks that are only scoped within a single PDF file (not all files in the system) would be the only bookmarks I care about. I already know how to find the files I need, and I have numerous tools available to find files. However, "bookmarks", like the physical pieces of fabric or paper inside a book, only help me to find interesting bits of information within a PDF file that I already have opened. So the metaphor of broken links across the file path/ tree is pretty much irrelevant, I would say.
Comment 6 Jeff Dooley 2018-08-21 04:11:26 UTC
(In reply to Jeff Dooley from comment #5)
> (In reply to Albert Astals Cid from comment #2)
> > Let's say you save the bookmarks on a pdf file (which you can not), how do
> > you pretend to know all the bookmarks you have on your system? You need a
> > file that points to those files, so you have the same problem.
> 
> Bookmarks that are only scoped within a single PDF file (not all files in
> the system) would be the only bookmarks I care about. 

Please disregard my comment above. I initially misunderstood the feedback. However, I still don't understand why file extended attributes could not be used, which would preserve the linkage to the file despite its movement.
Comment 7 azzamsa 2018-11-01 09:02:51 UTC
Other pdf reader e.g Foxit. Treat the bookmark like a TOC and save it within the pdf. 

Sometimes it confuse me to differentiate between TOC and bookmark. So my trick is to use (MY) and the end of my bookmark.

Does okular consider this approach too ?
Comment 8 Nate Graham 2020-10-12 18:21:46 UTC
*** Bug 427465 has been marked as a duplicate of this bug. ***