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: Thu, 29 Oct 2020 15:54:30 +0100 Message-ID: References: <8916ad6c75c76829bc0b43d6abc88f70e79ee816.camel@gmail.com> <87d014u0im.fsf@gnus.org> <51776.49199.252983.24473@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ea2f7e05b2d0750d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17291"; 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 Thu Oct 29 15:55:11 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 1kY9KY-0004Ms-RS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 15:55:10 +0100 Original-Received: from localhost ([::1]:34228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kY9KX-0006xq-Sz for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 10:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kY9KQ-0006wH-6S for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 10:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kY9KP-0001PR-Sv for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 10:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kY9KP-0004jV-RC for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 10:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2020 14:55:01 +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.160398329318172 (code B ref 42824); Thu, 29 Oct 2020 14:55:01 +0000 Original-Received: (at 42824) by debbugs.gnu.org; 29 Oct 2020 14:54:53 +0000 Original-Received: from localhost ([127.0.0.1]:54608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY9KG-0004j1-HC for submit@debbugs.gnu.org; Thu, 29 Oct 2020 10:54:52 -0400 Original-Received: from mail-vs1-f52.google.com ([209.85.217.52]:35271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY9KE-0004ip-8F for 42824@debbugs.gnu.org; Thu, 29 Oct 2020 10:54:50 -0400 Original-Received: by mail-vs1-f52.google.com with SMTP id g10so919576vsi.2 for <42824@debbugs.gnu.org>; Thu, 29 Oct 2020 07:54:50 -0700 (PDT) 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=pElQoqbCUB/Bsk62TdFykgGpmmysaZGwqKsxV+0l4+4=; b=Vr5iELSb5SzyGnhqYIIrXz/A5ZfY6cYlN/bQAZv0fWgofvS1NlHg3BMGJsC9oLyoJZ qeDgphtTcDkEUffLVhiWZ50TAucs3YWLU038BSzwHCoaF/nC3anJAFqBfXgFNU5aAYW1 zzLdaxrwLhec7TWsAZJhm4XFOFYH3xgkavOE6lXBy7cVIj+Z4FyvC33SRBjI++Z2Wc5z Tacyh8qWXV17h32LlQDC2VecJxrqkEWczGqW+wYhbktp/fNbeldn24NsK+MplojoSxRg 25vd2ZJAPBlCuHpnTN3V5zYX8w5yBB7mSV/OkMSjoVLmy8Fc9gObsA+u6obi0K6kOL+3 cplw== 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=pElQoqbCUB/Bsk62TdFykgGpmmysaZGwqKsxV+0l4+4=; b=oQT2dl0Nb2iJ/JoJcZ+lWr5XBXwkUtdDlIsmTJ2rlITQQA0Y+C6IIgxop91Wpa1JAN OQoLb/yotwPc99XPlo925WmHIYwBIiNYWBnjIpyed3PGE+bZdFSbvgsibsdC5bvnHPpQ nBLTnM+aX4dduGvFUYIWPwqN50VRnZhMJbzgTxxHqPjuvR0autnSKFtubSE4YD6MTENn 9kyusDHV63wKTdShXFHwbDBgsEDcIyweXJIelJXzpDD+xEWWG53kpjOxiTvPoidSuoIW GKJBHKN0hrft5/J6blrFbuPSg3iAr5ixYl1AOqT8xftkJbAeGgmJMXZ7oQRfpeUqXWrf YMRw== X-Gm-Message-State: AOAM531TddC90vKGpGPfmlnouWLfsKFGnvBtDz6Fv9mGElyfbAzP3eTC La575RooSlsaCH4n1+Uer+oU8UAl1UDSyfrdCMo= X-Google-Smtp-Source: ABdhPJyWo1fQuox/3A2BxkXp93teu/w5TTLobU+jGc2zzKpnKh92hBvWZiWN2oOJY265LV87QWUxUSDZrp+g5Ptc+qA= X-Received: by 2002:a67:1442:: with SMTP id 63mr3411271vsu.0.1603983284775; Thu, 29 Oct 2020 07:54:44 -0700 (PDT) In-Reply-To: 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:191963 Archived-At: --000000000000ea2f7e05b2d0750d Content-Type: text/plain; charset="UTF-8" In my previous mail I meant 'it seems to handle things fine also in the text-based mode' On Thu, 29 Oct 2020 at 15:53, 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). > > 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. Also I have added some annotation drawing features. > I have created a new github repo for it here > . So if you are interested you > could have a look at it or even test it. > However, I am not a very experienced elisp programmer, and although the > `djvu-occur` code could probably could get merged without too much > improvements, the code for annotation drawing can get cleaned up quite a > bit. > > Anyway, I am just informing you about it. I don't expect anyone to spend > much time on it, as there is a good working pdf-tools already. > I am just playing with it a little, becauseI I think it would be great if > djvu.el and pdf-tools.el functionality could all get merged into doc-view > at some point. > But I fully understand that time and resources of volunteers generally are > very limited and that it does not have too much priority anyway (as > mentioned in djvu.el, djview already exists). > > Okay, getting very much off topic here. In short, to me it seems that > these scrolling functions handle cases consistently enough. Maybe they can > be added as an option (and get documented as a not well-tested hack). If > the code was on github/gitlab/etc, I would just have created an issue and > there could be made a reference to the issue for people interested. > > On Wed, 28 Oct 2020 at 20:45, Roland Winkler wrote: > >> On Tue Oct 27 2020 dalanicolai wrote: >> > FYI it is inspired by `pdf-view-next-line-or-next-page` (and >> > complement) of the pdf-tools package. >> > >> > On Mon, 26 Oct 2020 at 22:43, Lars Ingebrigtsen wrote: >> > >> > Roland, could you take a look at this suggestion -- I've not used >> > djvu.el myself, so I'm not sure whether this would make sense or >> not: >> >> Thanks, I want to see how this can be used with Djvu mode. >> >> Is there a generic keybinding for similar commands in other modes? >> >> Are the suggested commands to be used with djvu-image-mode only or >> also with the text-based Djvu mode? Certainly, these use cases >> should be handled consistently. >> > --000000000000ea2f7e05b2d0750d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In my previous mail I meant 'it seems to handle things= fine also in the text-based mode'

On Thu, 29 Oct 2020 at 15:53, dal= anicolai <dalanicolai@gmail.com= > 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-imag= e-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 sli= ghtly improves the scrolling experience (i.e. it becomes like that in doc-v= iew).

While I am here anyway, I have also created = some code to implement `djvu-occur`
similar to `pdf-occur` (but s= ynchronous instead of async) which works fine for most djvu documents. Also= I have added some annotation drawing features.
I have created a = new github repo for it here. So if you are interested you could have a look = at it or even test it.
However, I am not a very experienced elisp= programmer, and although the `djvu-occur` code could probably could get me= rged without too much improvements, the code for annotation drawing can get= cleaned up quite a bit.

Anyway, I am just informi= ng you about it. I don't expect anyone to spend much time on it, as the= re is a good working pdf-tools already.
I am just playing with it= a little, becauseI I think it would be great if djvu.el and pdf-tools.el f= unctionality could all get merged into doc-view at some point.
Bu= t I fully understand that time and resources of volunteers generally are ve= ry limited and that it does not have too much priority anyway (as mentioned= in djvu.el, djview already exists).

Okay, getting= very much off topic here. In short, to me it seems that these scrolling fu= nctions handle cases consistently enough. Maybe they can be added as an opt= ion (and get documented as a not well-tested hack). If the code was on gith= ub/gitlab/etc, I would just have created an issue and there could be made a= reference to the issue for people interested.

On Wed, 28 Oct 2020= at 20:45, Roland Winkler <winkler@gnu.org> wrote:
On Tue Oct 27 2020 dalanicolai wrote:
> FYI it is inspired by `pdf-view-next-line-or-next-page` (and
> complement) of the pdf-tools package.
>
> On Mon, 26 Oct 2020 at 22:43, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
>=C2=A0 =C2=A0 =C2=A0Roland, could you take a look at this suggestion --= I've not used
>=C2=A0 =C2=A0 =C2=A0djvu.el myself, so I'm not sure whether this wo= uld make sense or not:

Thanks, I want to see how this can be used with Djvu mode.

Is there a generic keybinding for similar commands in other modes?

Are the suggested commands to be used with djvu-image-mode only or
also with the text-based Djvu mode?=C2=A0 Certainly, these use cases
should be handled consistently.
--000000000000ea2f7e05b2d0750d--