unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: dalanicolai <dalanicolai@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: {PATCH] continuous scroll for doc-view (FOR REVIEW))
Date: Sun, 16 Jan 2022 23:07:05 +0100	[thread overview]
Message-ID: <CACJP=3nxOQP0efPZDXAjXm1DQMmVQo_80Vp-F+jW0fKFsxhknA@mail.gmail.com> (raw)
In-Reply-To: <86o84d3sy2.fsf@mail.linkov.net>

[-- Attachment #1: Type: text/plain, Size: 2251 bytes --]

The variable i created because I intended to make continuous scroll a
configurable option,
but in the end it was much easier to first implement it not as an option.

As I write below, I got continuous-scroll working very fine in pdf-tools.
But a drawback of the
design with the overlay and the placeholders, is that now it is not
(easily) possible to split
the buffer and scroll it in two different windows, because the
drawing/deleting of the images
effects the (overlays in the) other buffer also.

Anyway, as I mentioned already I was focusing on pdf-tools now, because it
seemed much
less work to me to implement continuous scroll there, while it provides
also a more powerful
pdf-reader/editor. I have successfully implemented continuous scroll and
got most basic
functionality like outline, links, annotations etc. working. So using it
works nice for the most part,
except when resizing the window, for some reason, the redisplay does not
work correctly there.
The overlay seems to be in the correct position. From checking the
`overlay-properties` it seems
 to also hold the image correctly, but even though the buffer has been
scrolled to the right position,
the overlay does not show the image (it shows an empty image, but when I
save the image from
the overlay and open it in image-mode, I do correctly see the image of a
page).

Maybe at some point, although pdf-tools is not yet part of core emacs, some
expert here might
like to have a look at it. The code can be found here
<https://github.com/dalanicolai/pdf-tools/tree/simple-continuous-scroll>.

On Sat, 15 Jan 2022 at 19:40, Juri Linkov <juri@linkov.net> wrote:

> >     A triplet or a doublet means that the scroll bar can't be used for
> >     scrolling all pages?  Have you tried to prefill with overlays for all
> >     pages?
> >
> > Yes, like in the Proof of Concept, all overlays are inserted at once, but
> > they are 'triplet'
> > only showing a triplet of images at the time. So the full buffer can be
> > scrolled with the mouse/scroll-bar
>
> Thanks, I agree this is the right thing to do: placeholders for all pages,
> and a triplet of images for the active page.
>
> Also I noticed in your patch a new variable `doc-view-continuous-scroll'.
> But it's not yet used?
>

[-- Attachment #2: Type: text/html, Size: 2856 bytes --]

      reply	other threads:[~2022-01-16 22:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 10:53 {PATCH] continuous scroll for doc-view (FOR REVIEW)) dalanicolai
2022-01-13 10:58 ` dalanicolai
2022-01-13 11:08   ` dalanicolai
2022-01-14  8:03 ` Juri Linkov
2022-01-14 10:44   ` dalanicolai
2022-01-14 11:03     ` dalanicolai
2022-01-15 18:09       ` dalanicolai
2022-01-15 18:13     ` Juri Linkov
2022-01-16 22:07       ` dalanicolai [this message]

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='CACJP=3nxOQP0efPZDXAjXm1DQMmVQo_80Vp-F+jW0fKFsxhknA@mail.gmail.com' \
    --to=dalanicolai@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    /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).