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.bugs Subject: bug#42824: 26.3; Feature request: implement 'smooth scroll' in djvu.el package Date: Sat, 7 Nov 2020 20:16:35 +0100 Message-ID: References: <8916ad6c75c76829bc0b43d6abc88f70e79ee816.camel@gmail.com> <87d014u0im.fsf@gnus.org> <51776.49199.252983.24473@gargle.gargle.HOWL> <39754.26909.124027.24485@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000097f28005b3892b0a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10122"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 42824@debbugs.gnu.org To: Roland Winkler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 20:17:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kbTi1-0002Uq-KO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 20:17:09 +0100 Original-Received: from localhost ([::1]:41438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbTi0-0004K0-CP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 14:17:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbThu-0004Ju-UJ for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 14:17:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbThu-0006Zi-LD for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 14:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbThu-00063M-GS for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 14:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2020 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42824 X-GNU-PR-Package: emacs Original-Received: via spool by 42824-submit@debbugs.gnu.org id=B42824.160477661423252 (code B ref 42824); Sat, 07 Nov 2020 19:17:02 +0000 Original-Received: (at 42824) by debbugs.gnu.org; 7 Nov 2020 19:16:54 +0000 Original-Received: from localhost ([127.0.0.1]:59282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbThl-00062x-TX for submit@debbugs.gnu.org; Sat, 07 Nov 2020 14:16:54 -0500 Original-Received: from mail-ua1-f46.google.com ([209.85.222.46]:45921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbThk-00062k-CU for 42824@debbugs.gnu.org; Sat, 07 Nov 2020 14:16:52 -0500 Original-Received: by mail-ua1-f46.google.com with SMTP id a10so1487481uan.12 for <42824@debbugs.gnu.org>; Sat, 07 Nov 2020 11:16:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ivegdEBLzrkKXgAuxMfNmlzSWwEFSk4K1HHelxvQ4Qs=; b=AYsY/pItfoOQRfKqQMAnK3tMOBBqWdpkboy7m9oeJo4bsduXetKPSVtMX6n6fe5pSi JJ0e5IkoVy5zWTNSP56BrLsloS8VjYq9VSY1/ilJDRK0LgUpVwenu5WfUwwgpTNT4138 Z/2R5bAtuvzcyqWR22EnJAZM8UDkbiPHK9LVpoDAiOkbao7eqSA6Vb7uyGhylOjJO2mH sfl4x7LoE4ZeUjKTquFUrkyx4DY6OZ/jly6Cle/GWHi0frlFwPoghMTqBwfUUs3sUeOK L0GyBgVGiQiIg5vk8LobYFJq0bL90+J+LxCvWXimlYDz/mGK50S00z1SjUTFhpgwyQr6 8CVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ivegdEBLzrkKXgAuxMfNmlzSWwEFSk4K1HHelxvQ4Qs=; b=EIKGMdg51hjozYyoY3eAYdUBDUxX0aZb3w3zKFOZz8GHASA76X76PdVfBugHP5dUOV FNIxY/12DnitJ1fRBL3q6r36wwZUFJU05dNvtrnhlge8ScIhelFJChWOxJI+i9jnT1qH zfaXsC5T7UffseZjaT/XdHvSm36EJdMPtCunEWkwphaO3457gVWHicY66Lku3y4qkVe5 Vwl87rIoNnUYtR/B9jTtEppAMNiw0hmeU0J/V0o4Pwp6O4/pnWQGsLI31L/OX+FVqB3a /qi5eHiGLLmfVkrQZMKvS8dAMg98sggSE83JuWId0yijDM5u1sVYfaIw61fUv7/XaGyl JnNg== X-Gm-Message-State: AOAM533fHVJQdQFHTbfDsuya5/aKuHgYdLvNKPz9Rx5U98ScobSIxPHi qv8antUD4AzsSNaxgSriLZo6uEgsrhP0ER/7xb4= X-Google-Smtp-Source: ABdhPJzbjZmDnhLx2eXJLlbrVnyYfWp7SOHfFmnWIIvS4oPEYrUdd/xhER8pLxEnkK1nVpGiE5Aw139Ql/bzTMBwoVw= X-Received: by 2002:ab0:7846:: with SMTP id y6mr3819168uaq.16.1604776606821; Sat, 07 Nov 2020 11:16:46 -0800 (PST) In-Reply-To: <39754.26909.124027.24485@gargle.gargle.HOWL> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192850 Archived-At: --00000000000097f28005b3892b0a Content-Type: text/plain; charset="UTF-8" > I have been looking into doc-view. It offers more complete and more > consistent support for scrolling and I am trying to find out how > this can possibly be ported to djvu.el I do not fully understand what you are referring to with 'more complete and consistent, but the functions I've sent in the request are really small, only 5 lines, and I think they implement the essence of doc-view its scrolling feature. It was really meant as just a small extra convenient addition to solve the small, but inconvenient problem, as explained in the original request. > On the other hand, I am also wondering whether it could make sense > to add a backend for djvu files to doc-view. Probably this depends > on what users want to do. I started djvu.el for editing djvu > documents which is often very different from viewing such files. Well, in the djvu2.el package, I use the info in the annotation buffer to draw the annotations (using imagemagick its convert command). Of course as just a plain reader (without annotation features), doc-view is already a fine reader for djvu documents. > > While I am here anyway, I have also created some code to implement > > `djvu-occur` similar to `pdf-occur` (but synchronous instead of > > async) which works fine for most djvu documents. > > Did I see correctly that this code relies on `convert' from > imagemagic for updating the images? I am not sure if you are referring to the pdf-occur functionality because that does not rely on convert. Convert is used for drawing the annotations, the code for djvu-occur is in the djvu-occur section (idicated with ;;; Djvu occur). The djvu-occur function uses the tablist mode from pdf-tools to provide occur functionality similar to that of pdf-tools. Anyway, the message about djvu2.el was just as a comment that maybe you are interested to hear of it, nothing more. The request was just to add the two scroll functions (because I was not aware that doc-view was already perfectly able to show djvu document with "acceptable" scrolling functionality). I understand that djvu.el was meant especially for editing. Also, I think doc-view does a fine job when reading djvu documents. I was just experimenting to see if I could, with not too much effort, view my edits from djvu.el within some Emacs reader. So this is what djvu2.el solves, but in a hacky way. Also implementing occur, is not essential but I really like it in pdf-tools, and it was quite easy and straightforward to port to djvu.el (so I did that in djvu2.el). But djvu2.el is just experimental, a short study to find out if the required work is worth the effort... On Fri, 6 Nov 2020 at 19:51, Roland Winkler wrote: > On Thu Oct 29 2020 dalanicolai wrote: > > Well, it is just more or less the function > > `doc-view-next-line-or-next-page` (i.e. `C-n`) slightly adapted to > > djvu-mode, because djvu-mode works slightly differently. It is > > meant for `djvu-image-mode-only` but I have simply bound it in the > > `djvu-read-mode-map` and it seems to handle things fine. It is > > just a small addition that slightly improves the scrolling > > experience (i.e. it becomes like that in doc-view). > > Update: > > I have been looking into doc-view. It offers more complete and more > consistent support for scrolling and I am trying to find out how > this can possibly be ported to djvu.el. > > On the other hand, I am also wondering whether it could make sense > to add a backend for djvu files to doc-view. Probably this depends > on what users want to do. I started djvu.el for editing djvu > documents which is often very different from viewing such files. > > > While I am here anyway, I have also created some code to implement > > `djvu-occur` similar to `pdf-occur` (but synchronous instead of > > async) which works fine for most djvu documents. > > Did I see correctly that this code relies on `convert' from > imagemagic for updating the images? > > I need some more time to understand better what the code is doing. > --00000000000097f28005b3892b0a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> I have been looking into doc-view.= =C2=A0 It offers more complete and more
> consistent support for scrolling and I am trying to find out how
> this can possibly be ported to djvu.el

I do not fully understand what you are referring to with 'more co= mplete and consistent,
but=C2=A0 the functions I've sent in t= he request are really small, only 5 lines, and I think
they imple= ment the essence of doc-view its scrolling feature. It was really meant as = just
a small extra convenient addition to solve the small, but in= convenient problem, as explained
in the original request.
<= div>
> On the other hand, I am also wondering whether it c= ould make sense
> to add a backend for djvu files to doc-view.=C2=A0 = Probably this depends
> on what users want to do.=C2=A0 I started djvu.el for editing djvu
> documents which is often very different from viewing such files.

Well, in the djvu2.el package, I use t= he info in the annotation buffer to draw the annotations
(using i= magemagick its convert command). Of course as just a plain reader (without = annotation
features), doc-view is already a fine reader for djvu = documents.

> > While I a= m here anyway, I have also created some code to implement
> > `djvu-occur` similar to `pdf-occur` (but synchronous instead of > > async) which works fine for most djvu documents.
>
> Did I see correctly that this code relies on `convert' from
> imagemagic for updating the images?

I am not = sure if you are referring to the pdf-occur functionality because that does = not rely
on convert. Convert is used for drawing the annotations,= the code for djvu-occur is in the
djvu-occur section (idica= ted with ;;; Djvu occur). The djvu-occur function uses the tablist
mode from pdf-tools to provide occur functionality similar to that of pdf= -tools.

Anyway, the message about djvu2.el was jus= t as a comment that maybe you are interested to
hear of it, nothi= ng more. The request was just to add the two scroll functions (because I wa= s not aware
that doc-view was already perfectly able to show djvu= document with "acceptable" scrolling functionality).
<= br>
I understand that djvu.el was meant especially for editing. A= lso, I think doc-view does a fine job when reading
djvu documents= . I was just experimenting to see if I could, with not too much effort, vie= w my edits from djvu.el
within some Emacs reader. So this is what= djvu2.el solves, but in a hacky way. Also implementing occur, is not essen= tial
but I really like it in pdf-tools, and it was quite easy and= straightforward to port to djvu.el (so I did that in djvu2.el).
= But djvu2.el is just experimental, a short study to find out if the require= d work is worth the effort...


On Fri, 6 Nov 2= 020 at 19:51, Roland Winkler <winkler= @gnu.org> wrote:
On Thu Oct 29 2020 dalanicolai wrote:
> Well, it is just more or less the function
> `doc-view-next-line-or-next-page` (i.e. `C-n`) slightly adapted to
> djvu-mode, because djvu-mode works slightly differently.=C2=A0 It is > meant for `djvu-image-mode-only` but I have simply bound it in the
> `djvu-read-mode-map` and it seems to handle things fine.=C2=A0 It is > just a small addition that slightly improves the scrolling
> experience (i.e. it becomes like that in doc-view).

Update:

I have been looking into doc-view.=C2=A0 It offers more complete and more consistent support for scrolling and I am trying to find out how
this can possibly be ported to djvu.el.

On the other hand, I am also wondering whether it could make sense
to add a backend for djvu files to doc-view.=C2=A0 Probably this depends on what users want to do.=C2=A0 I started djvu.el for editing djvu
documents which is often very different from viewing such files.

> While I am here anyway, I have also created some code to implement
> `djvu-occur` similar to `pdf-occur` (but synchronous instead of
> async) which works fine for most djvu documents.

Did I see correctly that this code relies on `convert' from
imagemagic for updating the images?

I need some more time to understand better what the code is doing.
--00000000000097f28005b3892b0a--