From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: {PATCH] continuous scroll for doc-view (FOR REVIEW)) Date: Sun, 16 Jan 2022 23:07:05 +0100 Message-ID: References: <86a6fypz3p.fsf@mail.linkov.net> <86o84d3sy2.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000059843b05d5ba42cd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2316"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 16 23:09:14 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9Di4-0000Sm-KQ for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Jan 2022 23:09:12 +0100 Original-Received: from localhost ([::1]:60786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9Di2-0001Ll-56 for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Jan 2022 17:09:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9DgH-0000ci-3k for emacs-devel@gnu.org; Sun, 16 Jan 2022 17:07:21 -0500 Original-Received: from [2607:f8b0:4864:20::929] (port=38561 helo=mail-ua1-x929.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9DgF-0003FJ-6B for emacs-devel@gnu.org; Sun, 16 Jan 2022 17:07:20 -0500 Original-Received: by mail-ua1-x929.google.com with SMTP id h11so27178463uar.5 for ; Sun, 16 Jan 2022 14:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=52m/9GY0RJJ3nWK8KJfL5gyBYjBqVeL7mA7ZExu+vlo=; b=YwF6m8Hjwjt3Uul+Dr0+dnIBvTe9EzVIXfM4kxHGr+wcc0InXbPJJtRxnjmZkLZKS/ kWzq7t8WzsQHbDFrKl6cA6EnB8mVuZsHjf/5f4dfH6mEoLGwi51y9ExzuOu+sXLAHK3t q90D8/5/zRqb5rp7n/mDN6uxFd27eDnHvewZU3KQB8+M6Fk2+sJhEijSMdgBJPWO8UEx zoBHsF6Le7tmSgOkbmXDma/deHjZ+kVj9D5e3WyJjPkKwbqCbj9pjvnAF++EE2aJPDpA SyXyiIbUh+tfC+NYctiLEAK5mXwn99rQTVDNiW2e2TWskc7sJe/wCPWLvAwFxazEhorm y/9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=52m/9GY0RJJ3nWK8KJfL5gyBYjBqVeL7mA7ZExu+vlo=; b=A6OuNCjOhmUjJqnhZzDMzpoEmm3flWMFZaocmS8kgmqJhDRa/cvWal3qhIZNrwimbr 67TlED5YjUz4pKLX5rTe8/q6GLwmJXe1l3BXrOv9NGNkF+vmjIlrNEvXUOPn74o3LLHj PL2kGSNB61J76Q2hccd5BuAlsSGHk7gRR/xPp7ndYSS774Qivlc+THJWoK2A5Br0MLJI VA53MdyEiSysEcGwDiQ6nyhwAPCsbJ6ve/G+h3DtpoLSIDsoHg19/tYWCOJZwz5tgLtm IdEez3JM82z3x3O1NwoqjVuy37pNeqTVmLmuBXTVXby7ZTiLYgijYZTCfz7ilTT7+coY 3GMw== X-Gm-Message-State: AOAM533znwbIav1cesWoWLklgdQ7lN0OSUL+KfJp9wybWkoKPx8vViYd gHUk8uYWF0fXDRowxp7vVKOlx4acT+bs5k6tnN7Nt2P3 X-Google-Smtp-Source: ABdhPJy/d4Fg1HNJQVsfupGbuyFwbbmkWgflo2MoBf6gK6qWoCNU6UoTcV5C6up0/Rbv4ytoesUp+JtGFWiRxn5wRvA= X-Received: by 2002:a67:1783:: with SMTP id 125mr6664893vsx.85.1642370837348; Sun, 16 Jan 2022 14:07:17 -0800 (PST) In-Reply-To: <86o84d3sy2.fsf@mail.linkov.net> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::929 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::929; envelope-from=dalanicolai@gmail.com; helo=mail-ua1-x929.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284848 Archived-At: --00000000000059843b05d5ba42cd Content-Type: text/plain; charset="UTF-8" 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 . On Sat, 15 Jan 2022 at 19:40, Juri Linkov 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? > --00000000000059843b05d5ba42cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The variable i created because I intended to make con= tinuous 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, i= s that now it is not (easily) possible to split
the buffer and sc= roll it in two different windows, because the drawing/deleting of the image= s
effects the (overlays in the) other buffer also.
=
Anyway, as I mentioned already I was focusing on pdf-tools n= ow, because it seemed much
less work to me to implement continuou= s scroll there, while it provides also a more powerful
pdf-reader= /editor. I have successfully implemented continuous scroll and got most bas= ic
functionality like outline, links, annotations etc. working. S= o 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 `o= verlay-properties` it seems
=C2=A0to also hold the image correctl= y, 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 whe= n I save the image from
the overlay and open it in image-mode, I = do correctly see the image of a page).

Maybe at so= me point, although pdf-tools is not yet part of core emacs, some expert her= e might
like to have a look at it. The code can be found here.

On Sat, 15 Jan 2022 at 19:40, Juri Linkov <juri@linkov.net> wrote:
>=C2=A0 =C2=A0 =C2=A0A triple= t or a doublet means that the scroll bar can't be used for
>=C2=A0 =C2=A0 =C2=A0scrolling all pages?=C2=A0 Have you tried to prefil= l with overlays for all
>=C2=A0 =C2=A0 =C2=A0pages?
>
> 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 b= e
> scrolled with the mouse/scroll-bar

Thanks, I agree this is the right thing to do: placeholders for all pages,<= br> 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?
--00000000000059843b05d5ba42cd--