007kevin / pdf-view-restore

Add support to saving and reopening last known pdf position.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not store data within folder of PDF file

novoid opened this issue · comments

Hi,

I would love to use your awesome package that got mentioned multiple times in my news feeds.

However, as far as I understood the source code, each folder where I open a PDF gets its own data file that stores the file position(s).

If this is true, this is behavior which is very unusual considering other Emacs extensions. Further more, this behavior I can't accept in my work place, sharing files with lots of colleagues, "littering" our shared folders.

Therefore I'd suggest to store one single file that contains folder names + PDF file names + their position within the .emacs.d sub-hierarchy. This has huge advantages for shared folders where different people potentially want different positions within the same PDF file.

If https://github.com/emacscollective/no-littering is widespread enough, I'd even prefer $HOME/.emacs.d/var/pdf-view-restore/* (in no-littering-var-directory) which is a very clean solution IMHO.

Thanks for your cool project!

Hi there!

Thank you for your feedback! Its great to hear someone is enjoying the project.

As for the data being saved relative to the pdf documents, if you modify pdf-view-restore-filename
such as:

(setq pdf-view-restore-filename "~/.emacs.d/var/pdf-view-restore")

then all save information should be saved there. There is a caveat however in that pdf's with the same name will conflict with one another. As for that, I'll have to make modifications to include the directory sometime in the future.

Cheers,
Kevin

Very good to know that this setting works for the code, including paths and so forth.
Thanks for your help and greetings from Graz, Austria!