unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: emacs-devel@gnu.org
Subject: Multi image PDF continuous mode
Date: Thu, 09 Dec 2021 19:05:53 +0200	[thread overview]
Message-ID: <86lf0tq5zy.fsf@mail.linkov.net> (raw)

Doc-view has such a long-standing shortcoming that it doesn't allow
continuous scrolling of PDF pages when one PDF page at the top of the
window smoothly flows into the next PDF page at the bottom of the window.

But it seems there is no inherent limitation in Emacs that would
prevent implementing this.  And indeed after doc-view generates
PNG images in /tmp/docview*/*pdf/*.png it's possible to insert
absolute filenames of all PNG files into some buffer, then enable
two modes:

  M-x iimage-mode RET

that replaces filenames with images, and after

  M-x pixel-scroll-precision-mode RET

wheel-mouse scrolls consecutive PDF images smoothly
like all decent PDF viewers do.

OTOH, scrolling keys are not so nice, and PgUp/PgDn
insist on jumping to the top of the next image.
But maybe image-scroll-up and image-scroll-down
could be adapted to multi image buffers,
possibly by creating a new mode multi-image-mode.
Also mouse dragging could help in scrolling.

Now when looking at this problem from another point of view,
browsing a list of image files is what image-dired.el
is intended to do.  After doc-view generates a gallery
of PDF images, image-dired could be invoked on the output
directory of PNG images, and indeed in this case
the window layout of image-dired looks like what most
PDF viewers do: on the left side there is a narrow window
with thumbnails of PDF pages, and on the right side
a larger window with PDF pages.

PS: Actually, there is some weird problem in image-dired: when
the thumbnail window is resized to a width less than half-frame,
then image-dired creates a new thumbnail window.  But surely
this could be fixed.



             reply	other threads:[~2021-12-09 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 17:05 Juri Linkov [this message]
2021-12-09 19:24 ` Multi image PDF continuous mode Stefan Kangas
2021-12-09 19:35 ` Tomas Hlavaty
2021-12-09 20:05   ` Juri Linkov
2022-01-08  7:11     ` dalanicolai
2022-01-08  7:18       ` dalanicolai
2022-01-08  7:24         ` dalanicolai
2022-01-08  9:34       ` Stefan Kangas
2022-01-08 18:17       ` Juri Linkov
2022-01-08 21:32         ` dalanicolai
2022-01-10  8:13           ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86lf0tq5zy.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).