Git Product home page Git Product logo

pdf-continuous-scroll-mode.el's Introduction

pdf-continuous-scroll-mode.el

A pdf-tools extension that implements continuous scroll.

THIS PACKAGE IS DEPRECATED

A better implementation is provided by the image-roll package.

Demo

pdf-continuous-scroll-demo.gif

It includes keybindings to just work also on Spacemacs.

Development notes can be found in the wiki section.

Requirements

To use the new pdf-continuous-scroll-mode, your Emacs must have been compiled with SVG support (the cleaner version of my pdf-tools fork eliminates this requirement).

However, compiling Emacs generally is very easy. Just make sure you have the librsvg development (dev/devel) library installed before compiling.

Installation

Note: If, for some reason, you prefer to use the previous two buffer solution then you could just download and load the script from e.g. this previous commit.

Note: If you are using git to update the package, then you might want to use ‘reset –hard’, as I am frequently using ‘push –force’.

To keep this package updated it is recommended to install it using a Quelpa recipe. Spacemacs users can install the package (using Quelpa) by adding the following lines to the list of additional packages in their .spacemacs file:

(pdf-continuous-scroll-mode :location (recipe
                                       :fetcher github
                                       :repo "dalanicolai/pdf-continuous-scroll-mode.el"))

Then just load the package using use-package (if you’d like to defer loading), require or just M-x load-library.

Unlike the previous two-buffer implementation, currently this implementation does not add an option for toggling the functionality.

You can set the scroll step size via the customizable variable book-scroll-fraction.

Comments

  • Currently the redisplay functionality does not work correctly yet (e.g.

splitting buffers does not work correctly yet. Although in Spacemacs the issues seem to ‘fix themselves’ after just doing some scrolling, in vanilla Emacs this trick does not seem to work).

As it is not trivial to find out how this functionality works exactly, help or donations are very welcome.

  • isearch functionality gets broken. However, pdf-occur does work, just without the highlighting because that makes use of isearch functionality.

Contribute

As investigating how to get things right takes me a lot of time (both doc-view and pdf-tools are quite complex packages, and they are almost undocumented unfortunately). It really took me weeks to partly unravel how these packages work. As I am the extreme opposite of being rich, donations are very welcome (you could also have a look at my other packages on my github profile page, for example the new alternative pdf-server that adds extra annotation features and support for EPUB, and some more document types, to pdf-tools).

Comment: Personally, I think the improved functionality quite much increases the value of Emacs for research/study purposes

Of course if you know some elisp you could also help investigating/fixing issues yourself. To save you a lot of time, you can read the ‘development notes’ in the wiki section.

Any feedback is welcome (possibly by opening an issue in the repo).

Keybindings

EmacsSpacemacsFunction
C-njpdf-continuous-scroll-forward
C-pkpdf-continuous-scroll-backward
nJpdf-continuous-next-page
pKpdf-continuous-previous-page
M-<g gpdf-cscroll-first-page
M->Gpdf-cscroll-last-page
Qqpdf-cscroll-kill-buffer-and-windows
C-c C-a lSPC m a l (, a l)pdf-cscroll-annot-list-annotations

Comments

Related: double page layout

In this comment the user apnewberry posted code to realize a double page layout

Related projects

Extend pdf-tools annotation capabilities via pymupdf. The new, alternative, pdf-tools server, will provide the same functionality directly as a pdf-tools feature (including possibility for scripting).

Show djvu annotations within Emacs (extending djvu.el, and improving djvu2.2l). There is also a Spacemacs djvu layer which additionally implements smooth scrolling in djvu.

The best way to create and attach Table of contents to pdf and djvu documents. There is also a toc-layer for Spacemacs

A super nice calibre frontend within Emacs

handy or fun Emacs lisp functions https://github.com/dalanicolai/dala-emacs-lisp

For example I like the elisp raytracer

pdf-continuous-scroll-mode.el's People

Contributors

dalanicolai avatar haselwarter avatar jun0 avatar phundrak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdf-continuous-scroll-mode.el's Issues

Invalid function: book image positions

Hey recently updated to the new single buffer pdf-continuous-scroll-mode.el and was working well yesterday. Unfortunately today I can open pdfs but cannot scroll or move pages using any of the relevant commands. Mini buffer is complaining:

image-set-window-vscroll: Invalid function: book-image-positions
image-mode-reapply-winprops: Invalid function: book-image-positions
image-mode-window-get: Wrong type argument: listp

Config:

(use-package! pdf-continuous-scroll-mode)
(map! :map pdf-view-mode-map ""#'pdf-continuous-scroll-forward)
(map! :map pdf-view-mode-map ""#'pdf-continuous-scroll-backward)
(setq book-page-vertical-margin 0)
(setq pdf-view-image-relief 1)
(setq pdf-continuous-suppress-introduction 1)

natural scrolling?

Hi, I use natural scrolling and it works great with pdf-tools but it some how not working with this package, it uses conventional scrolling. It would be nice if there is a flag to resolve this issue (may be already there but I am not able to find it). This is a great work and highly appreciated, I was looking for some thing for a long time. Thank you.

Add support for doc-view

Sometimes I using Emacs to read some doc/odt documents, and these moments I missing your package. Is it possible to support an doc-view too?

error

Errors:
-
An error occurred while installing pdf-continuous-scroll-mode (error: (error Package ‘emacs-27.1’ is unavailable))
-

Key definitions update

Some key definitions in pdf-view-mode-map are no longer valid. For example, M-g (M-)g is defined to pdf-cscroll-view-goto-page, which is now a void function.

Plans to upload to Melpa?

As titled, I'd love to install this from MELPA. Do you have plans to merge this package to MELPA upstream?

Weird behavior

This happens just by scrolling using (pdf-continuous-scroll-forward 30) and (pdf-continuous-scroll-backward 30):
image

((system
  (type . darwin)
  (config . "x86_64-apple-darwin19.0.0")
  (shell . "/bin/dash")
  (uname . "Darwin 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64")
  (path "~/.nix-profile/bin" "/myBin/" "~/scripts//zsh/wrappers/brishz/" "~/scripts//zsh/wrappers/Zopen.app/Contents/Resources/MainMenu.nib/" "~/scripts//zsh/wrappers/Zopen.app/Contents/Resources/" "~/scripts//zsh/wrappers/Zopen.app/Contents/MacOS/" "~/scripts//zsh/wrappers/Zopen.app/Contents/" "~/scripts//zsh/wrappers/Zopen.app/" "~/scripts//zsh/wrappers/Zath.app/Contents/Resources/MainMenu.nib/" "~/scripts//zsh/wrappers/Zath.app/Contents/Resources/" "~/scripts//zsh/wrappers/Zath.app/Contents/MacOS/" "~/scripts//zsh/wrappers/Zath.app/Contents/" "~/scripts//zsh/wrappers/Zath.app/" "~/scripts//zsh/wrappers/" "~/scripts//zsh/rss-notifier/" "~/scripts//zsh/personal/" "~/scripts//zsh/interactive/auto-load/fuzzy/" "~/scripts//zsh/interactive/auto-load/clipboard/" "~/scripts//zsh/interactive/auto-load/" "~/scripts//zsh/interactive/" "~/scripts//zsh/fattened/" "~/scripts//zsh/fastsyntax/" "~/scripts//zsh/expensive/" "~/scripts//zsh/exorbitant/" "~/scripts//zsh/ensure-run/" "~/scripts//zsh/bugs/" "~/scripts//zsh/basic/auto-load/" "~/scripts//zsh/basic/" "~/scripts//zsh/auto-load/tests/" "~/scripts//zsh/auto-load/others/web APIs/" "~/scripts//zsh/auto-load/others/scraping/" "~/scripts//zsh/auto-load/others/proxy/" "~/scripts//zsh/auto-load/others/ios/" "~/scripts//zsh/auto-load/others/clojure/" "~/scripts//zsh/auto-load/others/" "~/scripts//zsh/auto-load/bugs/" "~/scripts//zsh/auto-load/" "~/scripts//zsh/aria2-helpers/" "~/scripts//zsh/" "~/scripts//supercollider/" "~/scripts//sh/" "~/scripts//setup/macOS/" "~/scripts//setup/" "~/scripts//rust/archive/" "~/scripts//rust/" "~/scripts//ruby/" "~/scripts//resources/iterm_colorschemes/" "~/scripts//resources/audio/zsh1/" "~/scripts//resources/audio/luna_mpv/" "~/scripts//resources/audio/luna/" "~/scripts//resources/audio/HP/spells/" "~/scripts//resources/audio/HP/" "~/scripts//resources/audio/" "~/scripts//resources/" "~/scripts//python/xonsh/" "~/scripts//python/url-encode/" "~/scripts//python/telegram-send/" "~/scripts//python/tecast/" "~/scripts//python/redis/" "~/scripts//python/iterm/" "~/scripts//python/ipython/" "~/scripts//python/gmail/" "~/scripts//python/genRSS/" "~/scripts//python/email/" "~/scripts//python/autogui/" "~/scripts//python/aria2/" "~/scripts//python/" "~/scripts//launchers/" "~/scripts//javascript/" "~/scripts//golang/" "~/scripts//export/" "~/scripts//deactivated-launchers/" "~/scripts//dash/" "~/scripts//configFiles/handbrake/" "~/scripts//configFiles/" "~/scripts//clojure/" "~/scripts//bin/" "~/scripts//bash/personal/" "~/scripts//bash/examples/" "~/scripts//bash/auto-load/" "~/scripts//bash/" "~/scripts//applescript/chrome/" "~/scripts//applescript/" "~/scripts//" "/usr/local/opt/curl/bin" "/usr/local/opt/qt/bin" "/Library/Java/JavaVirtualMachines/jdk-15.jdk/Contents/Home" "~/bin" "~/miniconda3/bin/" "~/anaconda/bin/" "~/.nimble/bin" "~/.poetry/bin" "~/.gem/bin" "/usr/libexec/" "~/kscripts/" "/usr/local/opt/texinfo/bin" "~/go/bin" "/Base/- Code/Resources/" "~/.local/bin" "/usr/local/sbin" "/usr/local/bin" "/snap/bin" "~/.cargo/bin" "/Library/TeX/texbin" "~/.dotnet/tools" "~/.emacs.d.doom/bin/" "~/code/node/snips-alice" "/Applications/SuperCollider.app/Contents/MacOS/" "/Applications/SuperCollider.app/Contents/Resources/" "/usr/sbin" "/usr/bin" "/bin" "/sbin" "~/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-unixorn-SLASH-git-extra-commands/bin" "~/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-unixorn-SLASH-git-extra-commands/bin" "/usr/local/Cellar/emacs-plus@27/27.1/libexec/emacs/27.1/x86_64-apple-darwin19.0.0"))
 (emacs
  (dir . "~/.emacs.d.doom/")
  (version . "27.1")
  (build . "Aug 18, 2020")
  (buildopts . "--disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus@27/27.1/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus@27/27.1 --with-xml2 --with-gnutls --without-dbus --with-imagemagick --with-modules --with-rsvg --with-xwidgets --with-ns --disable-ns-self-contained")
  (features . "RSVG IMAGEMAGICK GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS XWIDGETS PDUMPER LCMS2 GMP")
  (traits batch server-running envvar-file))
 (doom
  (dir . "~/doom.d/")
  (version . "2.0.9")
  (build . "HEAD -> develop 1456108d5 2020-09-10 18:03:32 -0400")
  (elc-files . 0)
  (modules :completion (company +tng) (ivy +fuzzy +icons) :ui doom doom-dashboard hl-todo hydra indent-guides modeline nav-flash ophints (popup +defaults) unicode vc-gutter vi-tilde-fringe :editor (evil +everywhere) file-templates fold snippets word-wrap :emacs dired electric undo vc :term vterm :checkers syntax :tools (eval +overlay) gist (lookup +dictionary +docsets +offline) magit pdf :lang clojure coq data emacs-lisp json javascript julia lua markdown (org +dragndrop +pandoc +gnuplot +jupyter +noter +present +roam) raku racket rst (ruby +rails) rust scala sh yaml :os macos :config (default +bindings))
  (packages (solarized-theme) (zoom) (blacken) (elpy) (pyvenv) (lispyville) (google-translate) (move-text) (rg) (deadgrep) (git-link) (neuron-mode) (nov) (hungry-delete) (ob-tmux) (julia-mode) (julia-repl) (eglot) (eglot-jl) (fzf) (org-drill))
  (unpin julia-mode julia-repl)
  (elpa "n/a")))

Some extra keybindings

Great mode. It really helps.

Disclaimer: This is more like a suggestion to make pdf-continuous-scroll-mode nicer to use and mode consistent with pdf-tools.

Since pdf-continuous-scroll-mode is a minor mode to be used with pdf-tools, if the user uses some keybinding that is not overwritten by pdf-continuous-scroll-mode the "magic" is lost and the two buffers lose sync.

I have defined some extra keybindinds that I use that could be included in pdf-continuous-scroll-mode by default.

(define-key pdf-continuous-scroll-mode-map (kbd "<prior>") 'pdf-continuous-previous-page)
(define-key pdf-continuous-scroll-mode-map (kbd "<next>") 'pdf-continuous-next-page)
(define-key pdf-continuous-scroll-mode-map (kbd "q") '(lambda ()  (interactive) (pdf-continuous-scroll-mode -1) (quit-window) ))

I'm not a list programmer, but maybe pdf-continuous-scroll-mode could advice functions in pdf-tools to either work like usual if the minor mode is disabled, or like the equivalent function in pdf-continuous-scroll-mode if the minor mode is active. Then whatever keybinding the user sets in pdf-view-mode-map would work when pdf-continuous-scroll-mode is activated. Does this makes sense?

[BUG] Does not handle some epdfinfo failure

My epdfinfo was broken (happens on macOS):

❯ epdfinfo
dyld: Library not loaded: /usr/local/opt/poppler/lib/libpoppler.102.dylib
  Referenced from: /usr/local/bin/epdfinfo
  Reason: image not found
[1]    32911 abort      epdfinfo

And this in turn broke pdf-continuous-scroll-mode.el with some rather unhelpful messages. Here is a stacktrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "Abort trap: 6")
  =(0 "Abort trap: 6")
  (if (= 0 (apply #'call-process executable cmdfile (current-buffer) nil (if pdf-info-epdfinfo-error-filename (progn (list pdf-info-epdfinfo-error-filename))))) nil (error "Error running `%s': %s" pdf-info-epdfinfo-program (buffer-string)))
  (progn (let ((temp-file pdffile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (set-buffer-multibyte nil) (insert pdf-info-empty-page-data)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-file cmdfile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert (format "renderpage:%s:1:100\nquit\n" (pdf-info-query--escape pdffile)))) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (if (= 0 (apply #'call-process executable cmdfile (current-buffer) nil (if pdf-info-epdfinfo-error-filename (progn (list pdf-info-epdfinfo-error-filename))))) nil (error "Error running `%s': %s" pdf-info-epdfinfo-program (buffer-string))))
  (unwind-protect (progn (let ((temp-file pdffile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (set-buffer-multibyte nil) (insert pdf-info-empty-page-data)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-file cmdfile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert (format "renderpage:%s:1:100\nquit\n" ...))) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (if (= 0 (apply #'call-process executable cmdfile (current-buffer) nil (if pdf-info-epdfinfo-error-filename (progn (list pdf-info-epdfinfo-error-filename))))) nil (error "Error running `%s': %s" pdf-info-epdfinfo-program (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-file pdffile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (set-buffer-multibyte nil) (insert pdf-info-empty-page-data)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-file cmdfile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert ...)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (if (= 0 (apply #'call-process executable cmdfile (current-buffer) nil (if pdf-info-epdfinfo-error-filename (progn ...)))) nil (error "Error running `%s': %s" pdf-info-epdfinfo-program (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-file pdffile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer ... ... ...) (save-current-buffer ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-file cmdfile) (temp-buffer (generate-new-buffer " *temp file*"))) (unwind-protect (prog1 (save-current-buffer ... ...) (save-current-buffer ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (if (= 0 (apply #'call-process executable cmdfile (current-buffer) nil (if pdf-info-epdfinfo-error-filename ...))) nil (error "Error running `%s': %s" pdf-info-epdfinfo-program (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (unwind-protect (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-file pdffile) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... ...))) (let ((temp-file cmdfile) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... ...))) (if (= 0 (apply ... executable cmdfile ... nil ...)) nil (error "Error running `%s': %s" pdf-info-epdfinfo-program (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (file-exists-p cmdfile) (progn (delete-file cmdfile))) (if (file-exists-p pdffile) (progn (delete-file pdffile))) (if (file-exists-p tempdir) (progn (delete-directory tempdir t))))
  (let* ((default-directory (expand-file-name "~/")) (cmdfile (make-temp-file "commands")) (pdffile (make-temp-file "empty.pdf")) (tempdir (make-temp-file "tmpdir" t)) (process-environment (cons (concat "TMPDIR=" tempdir) process-environment))) (unwind-protect (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let (... ...) (unwind-protect ... ...)) (let (... ...) (unwind-protect ... ...)) (if (= 0 ...) nil (error "Error running `%s': %s" pdf-info-epdfinfo-program ...))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (file-exists-p cmdfile) (progn (delete-file cmdfile))) (if (file-exists-p pdffile) (progn (delete-file pdffile))) (if (file-exists-p tempdir) (progn (delete-directory tempdir t)))))
  (let ((executable pdf-info-epdfinfo-program)) (if (stringp executable) nil (error "pdf-info-epdfinfo-program is unset or not a string")) (if (file-executable-p executable) nil (error "pdf-info-epdfinfo-program is not executable")) (if pdf-info-epdfinfo-error-filename (progn (if (and (stringp pdf-info-epdfinfo-error-filename) (file-writable-p pdf-info-epdfinfo-error-filename)) nil (error "pdf-info-epdfinfo-error-filename should contain wr...")))) (let* ((default-directory (expand-file-name "~/")) (cmdfile (make-temp-file "commands")) (pdffile (make-temp-file "empty.pdf")) (tempdir (make-temp-file "tmpdir" t)) (process-environment (cons (concat "TMPDIR=" tempdir) process-environment))) (unwind-protect (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ... ...) (let ... ...) (if ... nil ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (file-exists-p cmdfile) (progn (delete-file cmdfile))) (if (file-exists-p pdffile) (progn (delete-file pdffile))) (if (file-exists-p tempdir) (progn (delete-directory tempdir t))))))
  pdf-info-check-epdfinfo()
  (if (and (processp (pdf-info-process)) (eq (process-status (pdf-info-process)) 'run)) nil (if (pdf-info-process) (progn (tq-close pdf-info--queue) (setq pdf-info--queue nil))) (if (or force (eq pdf-info--queue t) (and (eq pdf-info-restart-process-p 'ask) (not noninteractive) (y-or-n-p "The epdfinfo server quit, restart it ? ")) (and pdf-info-restart-process-p (not (eq pdf-info-restart-process-p 'ask)))) nil (if (eq pdf-info-restart-process-p 'ask) (progn (setq pdf-info-restart-process-p nil))) (error "The epdfinfo server quit")) (pdf-info-check-epdfinfo) (let* ((process-connection-type) (default-directory "~") (proc (apply #'start-process "epdfinfo" " *epdfinfo*" pdf-info-epdfinfo-program (if pdf-info-epdfinfo-error-filename (progn (list pdf-info-epdfinfo-error-filename)))))) (save-current-buffer (set-buffer " *epdfinfo*") (erase-buffer)) (set-process-query-on-exit-flag proc nil) (set-process-coding-system proc 'utf-8-unix 'utf-8-unix) (setq pdf-info--queue (tq-create proc))))
  pdf-info-process-assert-running()
  pdf-info-query(features)
  (let (pdf-info-asynchronous) (pdf-info-query 'features))
  (setq pdf-info-features (let (pdf-info-asynchronous) (pdf-info-query 'features)))
  (or pdf-info-features (setq pdf-info-features (let (pdf-info-asynchronous) (pdf-info-query 'features))))
  pdf-info-features()
  (memq 'markup-annotations (pdf-info-features))
  (null (memq 'markup-annotations (pdf-info-features)))
  (not (null (memq 'markup-annotations (pdf-info-features))))
  pdf-info-markup-annotations-p()
  (if (pdf-info-markup-annotations-p) (list 'text 'file 'squiggly 'highlight 'underline 'strike-out) (list 'text 'file))
  (closure (t) nil (if (pdf-info-markup-annotations-p) (list 'text 'file 'squiggly 'highlight 'underline 'strike-out) (list 'text 'file)))()
  funcall((closure (t) nil (if (pdf-info-markup-annotations-p) (list 'text 'file 'squiggly 'highlight 'underline 'strike-out) (list 'text 'file))))
  eval((funcall #'(closure (t) nil (if (pdf-info-markup-annotations-p) (list 'text 'file 'squiggly 'highlight 'underline 'strike-out) (list 'text 'file)))))
  custom-initialize-reset(pdf-annot-list-listed-types (funcall #'(closure (t) nil (if (pdf-info-markup-annotations-p) (list 'text 'file 'squiggly 'highlight 'underline 'strike-out) (list 'text 'file)))))
  custom-declare-variable(pdf-annot-list-listed-types (funcall #'(closure (t) nil (if (pdf-info-markup-annotations-p) (list 'text 'file 'squiggly 'highlight 'underline 'strike-out) (list 'text 'file)))) "A list of annotation types displayed in the list b..." :group pdf-annot :type (set (const 3d) (const caret) (const circle) (const file) (const free-text) (const highlight) (const ink) (const line) (const link) (const movie) (const poly-line) (const polygon) (const popup) (const printer-mark) (const screen) (const sound) (const square) (const squiggly) (const stamp) (const strike-out) (const text) (const trap-net) (const underline) (const unknown) (const watermark) (const widget)))
  #<subr eval-buffer>(#<buffer  *load*> nil "/Users/evar/.emacs.d.doom/.local/straight/build/pd..." nil t)
  apply(#<subr eval-buffer> (#<buffer  *load*> nil "/Users/evar/.emacs.d.doom/.local/straight/build/pd..." nil t))
  eval-buffer(#<buffer  *load*> nil "/Users/evar/.emacs.d.doom/.local/straight/build/pd..." nil t)  ; Reading at buffer position 7827
  load-with-code-conversion("/Users/evar/.emacs.d.doom/.local/straight/build/pd..." "/Users/evar/.emacs.d.doom/.local/straight/build/pd..." nil t)
  require(pdf-annot)
  #<subr eval-buffer>()
  apply(#<subr eval-buffer> nil)
  eval-buffer()  ; Reading at buffer position 1107
  funcall-interactively(eval-buffer)
  call-interactively(eval-buffer nil nil)
  command-execute(eval-buffer)

Screen getting black for a while when using synctex double click

I use synctex to sync between my latex code and the output PDF. When I click on a word on pdf-tools it shows the correct word in the latex source.
But, it makes the screen black. Resizing Emacs brings back the output.
in my setting, I have used
(require 'pdf-continuous-scroll-mode) after the quelpa recipe.

Backward scroll of beamer pdf slides creates stack of buffers

This is a great package which works perfectly to visualize portrait oriented pdf files. However, when I try to use it on beamer landscape pdf slides, as soon as I start backscrolling (using the upward arrow key) this mode keeps stacking buffers on top of each other. Like so
Untitled
So my question is if there a workaround which does not interfere with the display of the portrait oriented pdf files? If needed this template can be used for testing purposes. Thank you in advance.

This package cannot be require'd

This package looks great, but if I have to directly use load, I won't use it. Adding a provide and the necessary require statements would make it much better (and make it easier to eventually get into MELPA).

Does not work with scroll wheel

This is a really cool mode! I tried it and it works great when scrolling with the arrow keys, but has the old behavior (snapping to the next page) when using the scroll wheel.

scroll-forward abruptly creates a bisecting buffer

Hello! This package is fantastic, but I cannot seem to fix this issue: When I use pdf-continuous-scroll-forward to a get to a new page, the new page's buffer immediately takes up half the screen. Demo

scroll-backward works well though.

pdf-cscroll-image-backward-hscroll not working

Hi,
I am getting the following error while executing pdf-cscroll-image-backward-hscroll:

pdf-cscroll-image-backward-hscroll: Wrong type argument: number-or-marker-p, nil

Here's my related config:

(setq quelpa-update-melpa-p nil)
(quelpa '(pdf-continuous-scroll-mode :fetcher github
                                     :repo "dalanicolai/pdf-continuous-scroll-mode.el"))

(require 'pdf-continuous-scroll-mode)
(add-hook 'pdf-view-mode-hook 'pdf-continuous-scroll-mode)

Demo:
https://gifyu.com/image/8RKA

switch window forces pdf to go to the first page or even go blank

Here is a gif showing the issue.
pdf-continuous

and my configs are as

;; (pdf-tools-install)
(use-package pdf-tools
  :ensure t
  ;; :commands (pdf-view-mode pdf-loader-install)
  :mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode)
  :magic ("%PDF" . pdf-view-mode)
  :config
  (pdf-tools-install)
  (define-pdf-cache-function pagelables)
  ;;In case of high-resolution screen like Mac
  (setq pdf-view-use-scaling t
	pdf-view-use-imagemagick nil)
  :hook
  (pdf-view-mode . (lambda ()
		     (display-line-numbers-mode -1)))
  )
(add-hook 'TeX-mode-hook
	  #'(lambda ()
	      (setq TeX-view-program-selection
		    '((output-pdf "PDF Tools")))
              ;; (setq TeX-view-program-list
              ;;       '(("PDF Tools" TeX-pdf-tools-sync-view)))
	      ))
(add-hook 'TeX-mode-hook
          #'(lambda ()
              (setq TeX-source-correlate-mode t)
              (with-eval-after-load "pdf-sync"
                (define-key TeX-source-correlate-map (kbd "C-c C-g")
                  'pdf-sync-forward-search))))

;;allow you to view pdf continuously
(use-package pdf-continuous-scroll-mode
  :straight (pdf-continuous-scroll-mode :type git :host github
					:repo "dalanicolai/pdf-continuous-scroll-mode.el")
  )
(setq pdf-continuous-suppress-introduction t)
(add-hook 'pdf-view-mode-hook 'pdf-continuous-scroll-mode)
(evil-define-key 'normal pdf-view-mode-map
  "j" 'pdf-continuous-scroll-forward
  (kbd "<down>") 'pdf-continuous-scroll-forward
  "gt" 'pdf-view-goto-page)

Any ideas how to fix it?

Is there other way to sponsor?

Thank you very much for your work, I have encountered some problems. Is there any other way? There is no doubt that you made a great work, thank you dalanicolai. All the things really help me a lot.
截屏2022-02-16 上午12 18 31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.