unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: dalanicolai <dalanicolai@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Roland Winkler <winkler@gnu.org>, 42824@debbugs.gnu.org
Subject: bug#42824: 26.3; Feature request: implement 'smooth scroll' in djvu.el package
Date: Tue, 27 Oct 2020 02:32:32 +0100	[thread overview]
Message-ID: <CACJP=3kRiRQHUCBLuMffAFqyOLnFr0yVUYd89rpiw1AS=q8JcQ@mail.gmail.com> (raw)
In-Reply-To: <87d014u0im.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1746 bytes --]

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:

> 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:
>
> dalanicolai@gmail.com writes:
>
> > The djvu.el pacakge is a beautiful package but unfortunately it is not
> > designed for reading djvu documents (The comments in the file say it is
> > meant to be used with DjView). Probably for that reason there is no
> > smooth scroll over pages implemented (at least I am not aware of that
> > functionality), i.e. you can scroll smoothly over a
> > single page but you can only do a full page jump to a next or previous
> > page.
> > This means that when you are at the bottom/top of a page and jump to
> > the
> > next/previous page then you end up at the bottom/top of that page,
> > which is annoying. Anyway, smooth scrolling can be implemented with
> > only
> > a view simple lines. So I would like to propose to add the following
> > lines to djvu.el:
> >
> >     (defun djvu-scroll-up-or-next-page ()
> >       (interactive)
> >       (scroll-up-line 5)
> >       (when (= (window-vscroll) 0)
> >         (djvu-next-page 1)))
> >
> >     (defun djvu-scroll-down-or-previous-page ()
> >       (interactive)
> >       (if (not (= (window-vscroll) 0))
> >           (scroll-down-line 5)
> >         (djvu-prev-page 1)
> >         (scroll-up-command))))
> >
> > By adding these lines emacs can be perfectly used as a djvu reader
> > (although it does not show annotations).
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>

[-- Attachment #2: Type: text/html, Size: 2435 bytes --]

  reply	other threads:[~2020-10-27  1:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12  8:38 bug#42824: 26.3; Feature request: implement 'smooth scroll' in djvu.el package dalanicolai
2020-10-26 21:42 ` Lars Ingebrigtsen
2020-10-27  1:32   ` dalanicolai [this message]
2020-10-28 19:45     ` Roland Winkler
2020-10-29 14:53       ` dalanicolai
2020-10-29 14:54         ` dalanicolai
2020-11-06 18:51         ` Roland Winkler
2020-11-07 19:16           ` dalanicolai
2020-11-15 21:18             ` Roland Winkler
2020-11-16 13:08               ` dalanicolai
2020-11-16 16:50                 ` Roland Winkler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACJP=3kRiRQHUCBLuMffAFqyOLnFr0yVUYd89rpiw1AS=q8JcQ@mail.gmail.com' \
    --to=dalanicolai@gmail.com \
    --cc=42824@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=winkler@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).