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