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: Request for review `image-roll.el` for Emacs core (or ELPA) Date: Mon, 18 Apr 2022 23:17:02 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b1abe305dcf448cd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6776"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 18 23:25:47 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 1ngYsV-0001bQ-FA for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Apr 2022 23:25:47 +0200 Original-Received: from localhost ([::1]:45576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngYsU-0000pZ-Ek for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Apr 2022 17:25:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngYkG-0003tI-Rw for emacs-devel@gnu.org; Mon, 18 Apr 2022 17:17:16 -0400 Original-Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]:36822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngYkE-0005GP-NL for emacs-devel@gnu.org; Mon, 18 Apr 2022 17:17:16 -0400 Original-Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-2f19fdba41fso27014107b3.3 for ; Mon, 18 Apr 2022 14:17:14 -0700 (PDT) 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; bh=q5+jovPW/CL85AN1ZpmdpusrRMXLWOEjupyV95RV5pY=; b=ELwLDvG9+BsRJrKFNQy6/F9oCbzGNLEuHAgOio3ae0xO0WggOfuGAJXbNBD06d34k1 ZQn0GNyE0vL61dyONTzD1uM36drTSBEH0etITEG7JTiHaxU21MomIjfWpe7NfQFZO3No Llot/bDPsUYuDHZ4zvTbzXqakDzAjfAIdzFqseta2Arnmoc8rlvmh/0eEIIj9ycq3DTU XSB8jsIvX+/urD2wOO7UuGYUKUg1e+Ua8YQ6nWD5nl5jcOtzeMYvOR0WlH5KxMEi0Qld N3qaApfO/EriTqRlPszQm4QhVhPRup1zoR4egW8mU5qpR+tgGcjbW3RUg9OkTje0+Gnc R07g== 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; bh=q5+jovPW/CL85AN1ZpmdpusrRMXLWOEjupyV95RV5pY=; b=1cneRGQ3iJeomdzIXwFsotvietzQ0lYcF13LBaUbCw3+GTVZfdORg2roaH7RMDYEk3 WXO94TG9yL/ua8WvCqzvBHxl8MrdvK/AOiOsT44ofU86gNuWb05FoPY7jB3DmwcJgxZb QuT3T0R6h7VKF8+X6Z3iaOLe/u7nR75SzipW0LbjL29CXAe+0cOYH7kJsGkQqNjGsW2p AOqXxIxX8A5KM44XmSEpNooGU7TxNp2yHj53Awpyakh7/6nVebtDGeY3QQUg/Ul+QfMN vxCPPOtiZ20xs8LRC6omkt8E0j6rnKQO8Bj1qRM1ZnG4yMMMAQl0QE49BcKB46oJlkd0 T3Gg== X-Gm-Message-State: AOAM530Wq0LlMp1pk7pCwpj/F1O5l6rbeNLVgciNueYv9zIWTtoUbnmo YeZVIxgLzhk/hzqHyK/bu4kq+km7PSyPYp/DaDfyGsLehJY= X-Google-Smtp-Source: ABdhPJwYURo4RlGC4kMGpJcoQF1lLVtSxLlqV1bsuS3eXMzSZ6HkOy1FgS3B6WwSYPAWuNgQ44NXGDKOmvwt0mM5Zd8= X-Received: by 2002:a81:790a:0:b0:2eb:5573:9338 with SMTP id u10-20020a81790a000000b002eb55739338mr12134403ywc.8.1650316633286; Mon, 18 Apr 2022 14:17:13 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1131; envelope-from=dalanicolai@gmail.com; helo=mail-yw1-x1131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:288631 Archived-At: --000000000000b1abe305dcf448cd Content-Type: text/plain; charset="UTF-8" (I should really switch to Emacs for mail, the above mail probably looks terrible on the archive, anyway...) As a short comment, on pdf-scroll.el. That file contains only a few lines of 'new' code. The major part of that file contains copies of 'original' pdf-tools function, but with some minor modifications. I will add comments behind the lines containing modifications. On Mon, 18 Apr 2022 at 23:11, dalanicolai wrote: > I have written a 'scroll/image roll' package that could be considered an > extension to image-mode. > The package provides a 'displaying' mechanism for displaying > images/documents as a single 'virtual scroll'. The main feature/advantage > of the package is that it allows for the 'much requested' continuous > scrolling. > > In the package I have extracted (and improved) the 'display engine' (or > whatever to call it), from some earlier experiments of implementing > continuous scroll into doc-view and pdf-tools. > > The current package can be used for displaying documents like books, but > also for displaying a selection of images. I first thought of calling it > papyrus.el (because scroll and bookroll, would clutter too much the Emacs > namespaces), but finally I thought, as it can be used to show images on a > toll, and can be considered an extension to image-mode, it would be better > to call it image-roll.el (or maybe just roll), opinions and suggestions > about the name are very welcome. > > For testing, he package contains a `papyrus-demo` function that can simply > be called after loading the package (best after starting from emacs -Q). > Additionally, as a final step, and as an example of how the package can > be used, I have included an `image-roll-directory` function in the last > section (of 38 lines only) in the file, to provide an example of how the > package can be used to display all images within some directory on a 'roll'. > This is only a minimal example; as this does not have my priority, I did > not bother to make it 'fit/scale' the images. > > However, I have written also an extension for `pdf-tools`, that provides a > toggle function so that users can toggle between the 'single' page > displaying, or the `image-roll` displaying. That file can be found here > . > That file can simply be downloaded and loaded (after first setting the path > to image-roll.el at the top of the file, of course this requires pdf-tools > to be installed). > > I would be happy with any feedback, and info about if and how (what is > required) this could be added to Emacs core. If you think this package is > not a good candidate for core (after the required modifications), then I > would also be happy if it could be added to ELPA (although the package on > itself is not very interesting, it should get used by 'extensions' e.g. for > pdf-tools, dired, doc-view, djvu.el etc.). > --000000000000b1abe305dcf448cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
(I should really switch to Emacs for mail, the above = mail probably looks terrible on the archive, anyway...)

As a short comment, on pdf-scroll.el. That file contains only a few l= ines of 'new' code. The major part of that
file contains = copies of 'original' pdf-tools function, but with some minor modifi= cations. I will add comments
behind the lines containing modifica= tions.

On Mon, 18 Apr 2022 at 23:11, 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">
I ha= ve written a 'scroll/image roll' package that could be considered a= n extension to image-mode.
The package provides a 'displaying= ' mechanism for displaying images/documents as a single 'virtual sc= roll'. The main feature/advantage of the package is that it allows for = the 'much requested' continuous scrolling.

In the package I have extracted (and improved) the 'display engine'= ; (or whatever to call it), from some earlier experiments of implementing c= ontinuous scroll into doc-view and pdf-tools.

The = current package can be used for displaying documents like books, but also f= or displaying a selection of images. I first thought of calling it papyrus.= el (because scroll and bookroll, would clutter too much the Emacs namespace= s), but finally I thought, as it can be used to show images on a toll, and = can be considered an extension to image-mode, it would be better to call it= image-roll.el (or maybe just roll), opinions and suggestions about the nam= e are very welcome.

For testing, he package contai= ns a `papyrus-demo` function that can simply be called after loading the pa= ckage (best after starting from emacs -Q).
=C2=A0Additionally, as= a final step, and as an example of how the package can be used, I have inc= luded an `image-roll-directory` function in the last section (of 38 lines o= nly) in the file, to provide an example of how the package can be used to d= isplay all images within some directory on a 'roll'.
This= is only a minimal example; as this does not have my priority, I did not bo= ther to make it 'fit/scale' the images.

However, I have written also an extension for `pdf-tools`, that provides = a toggle function so that users can toggle between the 'single' pag= e displaying, or the `image-roll` displaying. That file can be found here. That file can simply be downloaded = and loaded (after first setting the path to image-roll.el at the top of the= file, of course this requires pdf-tools to be installed).

I would be happy with any feedback, and info about if and how (wha= t is required) this could be added to Emacs core. If you think this package= is not a good candidate for core (after the required modifications), then = I would also be happy if it could be added to ELPA (although the package on= itself is not very interesting, it should get used by 'extensions'= e.g. for pdf-tools, dired, doc-view, djvu.el etc.).
--000000000000b1abe305dcf448cd--