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:53:02 +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="000000000000ce465a05b2d0707f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12836"; 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:54:13 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 1kY9Jc-0003EQ-Mh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 15:54:12 +0100 Original-Received: from localhost ([::1]:60174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kY9Jb-0005z8-OW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 10:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kY9JT-0005xJ-3A for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 10:54:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kY9JS-0001Hl-IN for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 10:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kY9JS-0004hk-IB for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 10:54:02 -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:54: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.160398320618041 (code B ref 42824); Thu, 29 Oct 2020 14:54:02 +0000 Original-Received: (at 42824) by debbugs.gnu.org; 29 Oct 2020 14:53:26 +0000 Original-Received: from localhost ([127.0.0.1]:54604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY9Is-0004gv-0k for submit@debbugs.gnu.org; Thu, 29 Oct 2020 10:53:26 -0400 Original-Received: from mail-vs1-f53.google.com ([209.85.217.53]:38201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY9Iq-0004gi-Kt for 42824@debbugs.gnu.org; Thu, 29 Oct 2020 10:53:25 -0400 Original-Received: by mail-vs1-f53.google.com with SMTP id b3so1663624vsc.5 for <42824@debbugs.gnu.org>; Thu, 29 Oct 2020 07:53:24 -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=eA82OGg8bMR0g1gRJBx6sVfvWNcbXGpI1b8co+CqDkU=; b=tTOeICynkfigbp2jAmWTSGfxy7wodx8udQlYtLo6WjDk6t1v2b3ykkV401LbN3JIl7 AWH4ajjeV+4+gcByZNZ7ULqbALUTtXdpsw5jx1yjCANKwW+tBnVxOvVsDpabNfyUVO50 Q1pRn0/6zrhFT5FRYkXilj7xmWq9tt4C8NJaTdab18+1HDZACReMUZTR4fCzecwjcU11 DIa79mP/G/UU/aljE0WCUZSLPcU8GpIpuZWgUj/yXsPxOmA7FAUBxPxsyB3VqTqW263J ZfXwkFCHxBErTRYXO5GGjS+kcT5UIHuDa4EU6wvR9qzNr8eqx0MYNfiIMXw7PjjA5Kw3 jO5Q== 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=eA82OGg8bMR0g1gRJBx6sVfvWNcbXGpI1b8co+CqDkU=; b=Lgzo/Y7Qyq58aDlrGWbJvBDYHes0LADhsGF5XRwyKGd6I5wsGhrKlF1D64OYV8bH4U IaHw/i5WrSmnJUIG7YexBOtqafDad7+MPqLnXjjTEKWsLqOEPqE306MG4eRs3CjenK6+ b2lL4xoHrfpFE5s4FrcHFez/Aj7rv1qujRfvI3pgMxz/nx416lonF6XDEQur83d60yMA j0RySxZCkJK3L7zr9H3zpl8hPaaW5I9X+wfXo5gzVV7K3U/5QyL8tbZLMQQlVHYoHfZW 9y5f2Ygppeqnr7jx2wqzs1R1MEtnF6RDoQxa4n5+9dolEUxwG1NhQOzuAVZArXZlpLdW I+GA== X-Gm-Message-State: AOAM530IEHaugkaDouR5Mn7XlKG1ou7NHfOeXTsEfG/z+itGPCiA4kiI KUcK1gAsnY2rjfDOe6gIKAWHBnrGr0CyoJtfGZkWNGPJxFS/0w== X-Google-Smtp-Source: ABdhPJxLQSK0Ww7c9JZPegt2MXDyoUsuE/TVtVbIMi7ueHsyVkgKlN9zWEIIyMWglTcvROF20F3LeLZ4mULBDFuToYw= X-Received: by 2002:a67:1442:: with SMTP id 63mr3405549vsu.0.1603983199060; Thu, 29 Oct 2020 07:53:19 -0700 (PDT) In-Reply-To: <51776.49199.252983.24473@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:191962 Archived-At: --000000000000ce465a05b2d0707f Content-Type: text/plain; charset="UTF-8" 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. > --000000000000ce465a05b2d0707f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 a= lthough the `djvu-occur` code could probably could get merged without too m= uch 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 worki= ng pdf-tools already.
I am just playing with it a little, because= I 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 understa= nd that time and resources of volunteers generally are very limited and tha= t it does not have too much priority anyway (as mentioned in djvu.el, djvie= w already exists).

Okay, getting very much off top= ic here. In short, to me it seems that these scrolling functions handle cas= es consistently enough. Maybe they can be added as an option (and get docum= ented as a not well-tested hack). If the code was on github/gitlab/etc, I w= ould 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> wrot= e:
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.
--000000000000ce465a05b2d0707f--