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: Mon, 16 Nov 2020 14:08:08 +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> <39733.23957.97016.24497@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000074f6af05b4391283" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30585"; 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 Mon Nov 16 14:09: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 1keeFq-0007rt-0n for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 14:09:10 +0100 Original-Received: from localhost ([::1]:47526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keeFp-0003AB-34 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 08:09:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keeFi-000394-B8 for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 08:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1keeFi-0002CT-1e for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 08:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1keeFh-00030t-Se for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 08:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 13:09: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.160553210811543 (code B ref 42824); Mon, 16 Nov 2020 13:09:01 +0000 Original-Received: (at 42824) by debbugs.gnu.org; 16 Nov 2020 13:08:28 +0000 Original-Received: from localhost ([127.0.0.1]:55373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keeFA-000306-Dn for submit@debbugs.gnu.org; Mon, 16 Nov 2020 08:08:28 -0500 Original-Received: from mail-vs1-f54.google.com ([209.85.217.54]:38312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keeF6-0002zs-PU for 42824@debbugs.gnu.org; Mon, 16 Nov 2020 08:08:27 -0500 Original-Received: by mail-vs1-f54.google.com with SMTP id y73so9083355vsc.5 for <42824@debbugs.gnu.org>; Mon, 16 Nov 2020 05:08:24 -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=q3TQ//jZbNQtwDxG26E7os22/2YoGqDxkK78TFBS7Yk=; b=YEgV5JhnSjxYoquoHT40MtY7Wv+1gC52rQp6Xq4KBTRYMs4I+svqoq19L9dD/prU/p fnMU2QzWmL+lXXkw4+JRPU+dZynRtTuaII8FX55WC52Rav36PepDkxl8r5fZNOsZU0nJ Bmb4BhI5Ln8GMvpY35AgSuoNSVeBEuhqEw8OQozbnWVvVQ/lOSWpq7I39fUEOz/IziGQ qPFxf6yuLMqRLU2Dif7FyazPGmgwZF4uR3VkjYACKrrYy3gmq+YWr5fUiC8eZMjrmGb3 Jzk+sLPlKIqU6MQ84K1nZl1dxk2nvPVvNBV5bFJcEI8+8vFY+tHFQxRlq91MjyNJy3EX LWxA== 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=q3TQ//jZbNQtwDxG26E7os22/2YoGqDxkK78TFBS7Yk=; b=pPW1dXFHjMaBqPUb7/hDDrCRY/d1XWZh8kWiLjZnFy9ZFsiVOsvf8wus9IE/x52Y79 VExcYRqnBcshGXM0/xVcLda33zTAXW4lkxP0hrNHhvfNpxGa6tiAq1OZ4myNhICOJ2Ya kr1IlgNCM20gnxqSH1qmPzcbQHjzG0ZcD6Vn3n1/tI0aZ6tBcwn6/Tsmat2tFoVNQbPs jA+ohI/xE0jP8UhekljTTi3YPs/UM40fpCF50qnAJA5u57aUraF4ILqyo8Jyklf6NPSM e2LswsQgpj4ehmJbOl59RkBEIelP75M1hs3ajsftgI/4ONe32ZSoR/Jbwiho4Q8U0Lvu 09YQ== X-Gm-Message-State: AOAM533w5tUq5kQgji0oziyL9cj2EhGS9wtPmtJRLN8Y+uzBCaArL8nQ YRdXW19DDO6prvRenYKihbOopaNqeIv+sSMVmrw= X-Google-Smtp-Source: ABdhPJwSIGlo1GbDSy2cu4Dy9l5mjTeS1l45oU0P8p+q8HJB98Ddg5QcaMyl+0exH+7sQAu5LY2nWb10QKF0xRVHZ1o= X-Received: by 2002:a67:ce1a:: with SMTP id s26mr7614695vsl.0.1605532099342; Mon, 16 Nov 2020 05:08:19 -0800 (PST) In-Reply-To: <39733.23957.97016.24497@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:193425 Archived-At: --00000000000074f6af05b4391283 Content-Type: text/plain; charset="UTF-8" The scrolling functionality looks great now. Indeed setting the djvu-continuous to t provides the functionality that I requested/proposed. Regarding the annotation features, I have implemented more in djvu2.el than just highlighting rectangles. It also shows free text, line and arrow annotations. I think those things can not be implemented via `djvu-image-rect`. The djvu2.el page contains a demo screencast . Just to remind you, djvu2.el also implements djvu-occur and imenu functionality. Regarding tooltips based on pixel coordinates, this can be achieved (as it has been done in pdf-tools) via the `:map` and `:pointer` keywords in the image descriptor . However instead of implementing this separately, I think it would be great if as much as possible of the pdf-tools code could be reused (I mean that djvu and pdf share as much code as possible for similar functionality). Although it would be great if it got implemented, so that Emacs also becomes the best document reader, for me personally the invested time would not be worth the gain (Although I might have a look at it some time as some kind of exercise. djvu2.el for me was also just an exercise/study). On Sun, 15 Nov 2020 at 22:18, Roland Winkler wrote: > On Sat Nov 7 2020 dalanicolai wrote: > > 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. > > I have updated djvu.el on GNU Elpa, please take a look. > I implemented commands for scrolling for the `Read' buffer both in > regular (text) mode and image minor mode. Also, I adopted the > keybindings from doc-view and added a user option djvu-continuous > similar to doc-view-continuous. So likely you may want to customize > djvu-continuous. > > Please, let me know if this works for you, then I can close this bug > report. > > > 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. > > You do not need imagemagick convert for this. For the ppm images > used by djvu.el, emacs can do that, too, see `djvu-image-rect'. > Maybe I'll do that one day. > > However, adding just the color of the annotations I find less > important than also displaying tooltips. These tooltips are > displayed in the regular text mode of the Read buffers. I do not > know how to generate tooltips based on the pixel coordinates of the > mouse pointer over an image. > --00000000000074f6af05b4391283 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The scrolling functionality looks great now. Indeed s= etting the djvu-continuous to t provides the functionality that I requested= /proposed.

Regarding the annotation features, I ha= ve implemented more in djvu2.el than just highlighting rectangles. It also = shows free text, line and arrow annotations. I think those things can not b= e implemented via `djvu-image-rect`. The djvu2.el page contains a demo s= creencast. Just to remind you, djvu2.el also implements djvu-occur and = imenu functionality.

Regarding tooltips based on p= ixel coordinates, this can be achieved (as it has been done in pdf-tools) v= ia the `:map` and `:pointer` keywords in the image descri= ptor. However instead of implementing this separately, I think it would= be great if as much as possible of the pdf-tools code could be reused (I m= ean that djvu and pdf share as much code as possible for similar functional= ity). Although it would be great if it got implemented, so that Emacs also = becomes the best document reader, for me personally the invested time would= not be worth the gain (Although I might have a look at it some time as som= e kind of exercise. djvu2.el for me was also just an exercise/study).

On Sun, 15 Nov 2020 at 22:18, Roland Winkler <= ;winkler@gnu.org> wrote:
On Sat Nov 7 2020 dalani= colai wrote:
> I do not fully understand what you are referring to with 'more
> complete and consistent, but=C2=A0 the functions I've sent in the<= br> > 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.

I have updated djvu.el on GNU Elpa, please take a look.
I implemented commands for scrolling for the `Read' buffer both in
regular (text) mode and image minor mode.=C2=A0 Also, I adopted the
keybindings from doc-view and added a user option djvu-continuous
similar to doc-view-continuous.=C2=A0 So likely you may want to customize djvu-continuous.

Please, let me know if this works for you, then I can close this bug
report.

> 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.

You do not need imagemagick convert for this.=C2=A0 For the ppm images
used by djvu.el, emacs can do that, too, see `djvu-image-rect'.
Maybe I'll do that one day.

However, adding just the color of the annotations I find less
important than also displaying tooltips.=C2=A0 These tooltips are
displayed in the regular text mode of the Read buffers.=C2=A0 I do not
know how to generate tooltips based on the pixel coordinates of the
mouse pointer over an image.
--00000000000074f6af05b4391283--