0

My goal is to use org-pdftools as described in this blogpost. I started by trying to make pdf-tools work with continuous scrolling, but I'm running into various problems. It is getting way complicated and would appreciate some help. For context, I'm on Mac and put most of my config in config.org file and load it from init.el.

  1. When I put (pdf-tools-install) in config.org, Emacs uses DocView when I open a pdf file. I need to run M-x pdf-tools-install everytime I open Emacs. When I put (pdf-tools-install) in init.el, this problem is gone. Why is this happening?
  2. To enable continuous scroll with pdf-tools, I'd like to use pdf-continuous-scroll-mode.el or image-roll.el. I've not been able to get them to work. This SE post has a suggestion on how to enable this fix. It didn't work for me. What is the correct way to do this? Are there better ways to enable continuous-scroll with pdf-tools?
  3. While working on above, I came to know about quelpa and tried installing it following the official instructions as M-x package-install RET quelpa RET but Emacs can't find this package. I've added the third method from the instructions to init.el but I have no idea if it is working (no errors at startup though). I get an error if I add this line (require 'quelpa-use-package), the error is:
Warning (initialization): An error occurred while loading ‘.emacs.d/init.el’:

File is missing: Cannot open load file, No such file or directory, quelpa-use-package

I don't get what's going on. What is the correct way to use quelpa, install the continuous-scroll feature, and start using pdf-tools?

vpk
  • 105
  • 4
  • I guess you haven't added Melpa to your package-archives yet, you can find instructions [here](https://melpa.org/#/getting-started) (dont forget to finish with `M-x package-refresh-contents`). After that, it should be easy to install Quelpa by following its [installation instructions](https://github.com/quelpa/quelpa#installation) (b.t.w. from Emacs 29 we can install packages directly from github). Finally, I would recommend you to try `image-roll` first. Note that it only works with [the pdf-roll branch of my pdf-tools fork](https://github.com/dalanicolai/pdf-tools/tree/pdf-roll). – dalanicolai Apr 23 '23 at 10:06
  • Thanks for the reply @dalanicolai! Melpa is already in my package-archives. I still get "no match" when I run `M-x package-install RET quelpa RET` after `M-x package-refresh-contents`. I have added the snipped to init.el instead but don't know if it installed quelpa (third option in the link you and I posted on quelpa installation). Finally, what is the way to enable smooth scrolling if I want to use original `pdf-tools`? Is `pdf-continuous-scroll-mode.el` an option in that case? – vpk Apr 23 '23 at 15:21
  • Can you find the quelpa package in the `M-x package-list-packages` buffer? If no, do you see any Melpa package listed at all (probably no). If not, then somehow you did not successfully add the Melpa archive. Indeed, `pdf-continuous-scroll-mode.el` is easier to use and install. You can simply use it with the 'default' pdf-tools. Don't follow the installation instructions (there will be no more updates), simply download/clone the file and load it manually. Then do `M-x pdf-continuous-scroll-mode` from a pdf-tools buffer to activate it. Beware that this is a simple (but efficient) 2 buffer hack. – dalanicolai Apr 23 '23 at 15:35
  • No, quelpa doesn't show up in `M-x package-list-packages` buffer. What melpa packages should I search for? I believe I have installed some org packages from Melpa, but that was a while ago so not sure. Thanks for your work with continuous scroll! Do you know anything better that works with default `pdf-tools`? – vpk Apr 23 '23 at 17:54
  • @dalanicolai I fixed the melpa issue and `quelpa` is now installed. I also downloaded your `.el` file and have this in my config `(load "~/.emacs.d/pdf-continuous-scroll-mode.el")` but I can't do `M-x pdf-continuous-scroll-mode`. Could you please help with this? – vpk Apr 24 '23 at 17:11
  • @dalanicolai any suggestions? thanks! – vpk Apr 26 '23 at 18:12
  • I have worked quite a lot on pdf's inside Emacs, so that I do not remember exactly what I did when. Anyway, I have quickly tested the `pdf-continuous-scroll-mode` again now, and I have found that in its latest version I have removed the mode itself, i.e. you can simply use `pdf-continuous-scroll-forward/backward` (`C-n/p`) directly, and you can just use it with the [standard pdf-tools package](https://github.com/vedang/pdf-tools). Note, that although the scrolling works fine, `pdf-continuous-scroll-mode` does not work flawlessly in multiple buffers. – dalanicolai Apr 27 '23 at 11:27

0 Answers0