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: Fri, 14 Jan 2022 12:03:21 +0100 Message-ID: References: <86a6fypz3p.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f7a5d905d588c072" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20600"; 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 Fri Jan 14 12:16:07 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 1n8KYx-00059F-41 for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 12:16:07 +0100 Original-Received: from localhost ([::1]:43460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8KYw-0003kI-7A for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 06:16:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8KMq-0004EC-53 for emacs-devel@gnu.org; Fri, 14 Jan 2022 06:03:37 -0500 Original-Received: from [2607:f8b0:4864:20::92e] (port=37394 helo=mail-ua1-x92e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8KMo-00036E-6r for emacs-devel@gnu.org; Fri, 14 Jan 2022 06:03:35 -0500 Original-Received: by mail-ua1-x92e.google.com with SMTP id o1so16289884uap.4 for ; Fri, 14 Jan 2022 03:03:33 -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=lj+A4xulCU4cRf01ZLpfw7EXLGo/eAkg0whlqlOhSsA=; b=Z7ZFfX9JGK58E8Lmj4rLUjzsdB/5zjVh1gB04wl6wVeOWfVL9oQQQVHrQGJprpXGHk 8JgqkqX4SCEU66RroOFH0728k9uUYCmWlTyTrcAUymlI7+FIe9nTelA78UDOSxK1uHYx 2g6SSuWY+vckvyWyPMvaX2f4pJNpH8J2DT+FL3ujRyYDCu3qm3zycYScZK777wGVaXCP bL9mcsYwcFgrUQyqgYJ3xSUgCn7gkWdG3FLbJ0xgL9dXH+9DCYKMCfjdm8IHW8qxJF2t rCnSf3hSQz8HtlUPFpmd2kEHzpOhhyD+pm9icEQr9JUn8UZpdcDBsm6H/4YfB6jSqeF+ 1KGg== 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=lj+A4xulCU4cRf01ZLpfw7EXLGo/eAkg0whlqlOhSsA=; b=z4bAHLQQXHf8jpm9NK3o4/5WfzKqnwsbGgtQ9y4Ejqfl/iLuxn8dFmLSfKEpwNXqLr p6a6DHnYunqv8dnJF39yiAVkSNUXOQzYURh5qLd1uRGnCBlmU3YFVJri4WbibIf1nDF0 f2tuAbQZK+6N0GUB3OCmwndjypxL3euvrAZppS2mBN13pXQp2kmAjjzW5E/LkLg1b++r QjRdMy0dEsEYNfH77zo1NFTfkkOarVX85oWtnbK9euCOj90WZTDXs3SqrISC6H9sc1uS O5HhXSs3UewNdTNznZ46v5EYDhdDGf1YrP+5N0d5lgT0pzlMX3oQPZwH0zYrLNlBcg9l GQ7w== X-Gm-Message-State: AOAM5306L9c6+hzPwr/edRHRgki+PcvSzN4G67nmviFEKrU54BHQvSOU 1L0+79EUnzzLYOUeYAvCvLF9vsnW7MVmz23xOdo4P3M1 X-Google-Smtp-Source: ABdhPJwh0JTOTv3epBIrdRdSHUu4kXvt2mnmNyGtY8TTHWOI78XQCvJam0WHizgf8CHrIiGAQBmE9/mrp3czv8t6a20= X-Received: by 2002:ab0:1609:: with SMTP id k9mr56845uae.137.1642158213276; Fri, 14 Jan 2022 03:03:33 -0800 (PST) In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::92e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::92e; envelope-from=dalanicolai@gmail.com; helo=mail-ua1-x92e.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:284740 Archived-At: --000000000000f7a5d905d588c072 Content-Type: text/plain; charset="UTF-8" About the mouse scrolling not working, I guess it is not filling the buffer with empty svg's yet. Although I still have to check that assumption. All seemed to work fine with keyboard scrolling (which I what I more or less use exclusively, e.g. jumping to page goes faster by keyboard. And there is a nice toc-mode package for quickly creating outlines. But anyway mouse scroliing should also be supported of course). On Fri, 14 Jan 2022 at 11:44, dalanicolai wrote: > Thanks, if you want you could attach whole files, because program files >> take almost no space on mailing list archives, so this is not a problem >> (the problem is when someone posts large screenshots, and even a video). >> > > I wanted to do that already... terrible how in the end I did forget to > attach the files... > > >> If it could be used for other images such as for image galleries, >> then it should be a separate package like image-mode. >> > > Well, I think I really wouldn't want continuous scroll for images. So I > think a separate > library for image galleries would be better. I think the logic for only > showing full images > is a slightly simpler and therefore could be made more flexible. Creating > the overlays is > really just a few lines. But I am not sure, how exactly the code for an > image gallery > should look like. Maybe in the end, some code could be shared. > > 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, but for some reason updating the images in that case > does not seem > to work yet (although from the code I would expect it should). > > Anyway, This time I'll send the message including the attachments... you > can have a look > (see first message for instructions, if necessary). > > > On Fri, 14 Jan 2022 at 09:19, Juri Linkov wrote: > >> > I'd really like to mention that I get no hits when searching for that >> > thread (actually searching >> > for 'the original thread') when searching on `multi image PDF` in the >> Emacs >> > devel archive. >> > (This time) it is not due to too many results. Would be great if you >> could >> > inform me why that does not work. >> >> Trying to search any recent subject shows that indexing on mailing lists >> was disabled for a few last months. >> >> > So I will attach two files here, the first is an 'adapted' bookroll.el >> > file, and the second is a >> > a modified doc-view file that implements the first 'rudimentary' >> continuous >> > scroll for PDF >> > documents(despite the subject title of this message, I am simply >> attaching >> > the file, >> > as you can then more simply load and try it, while I guess you must be >> > capable of diffing it with >> > the latest doc-view.el file yourself ;). >> >> Thanks, if you want you could attach whole files, because program files >> take almost no space on mailing list archives, so this is not a problem >> (the problem is when someone posts large screenshots, and even a video). >> >> Or you can just make a copy of doc-view.el in your repository, >> and send a message when you update it. >> >> > I am not sure if the bookroll-mode should be a separate package (like >> image-mode), >> > or that it could just get merged into doc-view. But it is as it is for >> the >> > development process. >> >> If it could be used for other images such as for image galleries, >> then it should be a separate package like image-mode. >> >> > To understand the approach of bookmark.el, it is probably most useful to >> > look at the Proof >> > of Concept file to which I have linked already above. It simply draws a >> > triplet of images (pages) >> > for each page (and a doublet for the first and last pages), and then it >> > uses a 'currently-displayed-images' list, and refreshes pages when >> > necessary by comparing with that list. The current page is the page that >> > takes more than half of the window height. >> >> 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? >> > --000000000000f7a5d905d588c072 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
About the mouse scrolling not working, I guess it is = not filling the buffer with empty svg's yet.
Although I still= have to check that assumption. All seemed to work fine with keyboard scrol= ling
(which I what I more or less use exclusively, e.g. jumping t= o page goes faster by keyboard.
And there is a nice toc-mode package for quickly creating outli= nes. But anyway mouse scroliing
should also be supported of cour= se).

On Fri, 14 Jan 2022 at 11:44, dalanicolai <dalanicolai@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Thanks, if you want you could= attach whole files, because program files
take almost no space on mailing list archives, so this is not a problem
(the problem is when someone posts large screenshots, and even a video).

I wanted to do that already... terrible= how in the end I did forget to attach the files...
=C2=A0
If it could be used f= or other images such as for image galleries,
then it should be a separate package like image-mode.

Well, I think I really wouldn't want contin= uous scroll for images. So I think a separate
library for image g= alleries would be better. I think the logic for only showing full images
is a slightly simpler and therefore could be made more flexible. Cr= eating the overlays is
really just a few lines. But I am not sure= , how exactly the code for an image gallery
should look like. May= be in the end, some code could be shared.

A triplet or a doublet means= that the scroll bar can't be used for
scrolling all pages?=C2=A0 Have you tried to prefill with overlays for all = pages?

Yes, like in the Proof o= f Concept, all overlays are inserted at once, but they are 'triplet'= ;
only showing a triplet of images at the time. So the full buffe= r can be scrolled with the
mouse/scroll-bar, but for some reason = updating the images in that case does not seem
to work yet (altho= ugh from the code I would expect it should).

Anywa= y, This time I'll send the message including the attachments... you can= have a look
(see first message for instructions, if necessary).<= br>


On Fri, 14 Jan 2022 at 09:19, Juri Linkov <juri@linkov.net> wro= te:
> I'd= really like to mention that I get no hits when searching for that
> thread (actually searching
> for 'the original thread') when searching on `multi image PDF`= in the Emacs
> devel archive.
> (This time) it is not due to too many results. Would be great if you c= ould
> inform me why that does not work.

Trying to search any recent subject shows that indexing on mailing lists was disabled for a few last months.

> So I will attach two files here, the first is an 'adapted' boo= kroll.el
> file, and the second is a
> a modified doc-view file that implements the first 'rudimentary= 9; continuous
> scroll for PDF
> documents(despite the subject title of this message, I am simply attac= hing
> the file,
> as you can then more simply load and try it, while I guess you must be=
> capable of diffing it with
> the latest doc-view.el file yourself ;).

Thanks, if you want you could attach whole files, because program files
take almost no space on mailing list archives, so this is not a problem
(the problem is when someone posts large screenshots, and even a video).
Or you can just make a copy of doc-view.el in your repository,
and send a message when you update it.

> I am not sure if the bookroll-mode should be a separate package (like = image-mode),
> or that it could just get merged into doc-view. But it is as it is for= the
> development process.

If it could be used for other images such as for image galleries,
then it should be a separate package like image-mode.

> To understand the approach of bookmark.el, it is probably most useful = to
> look at the Proof
> of Concept file to which I have linked already above. It simply draws = a
> triplet of images (pages)
> for each page (and a doublet for the first and last pages), and then i= t
> uses a 'currently-displayed-images' list, and refreshes pages = when
> necessary by comparing with that list. The current page is the page th= at
> takes more than half of the window height.

A triplet or a doublet means that the scroll bar can't be used for
scrolling all pages?=C2=A0 Have you tried to prefill with overlays for all = pages?
--000000000000f7a5d905d588c072--