From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Continuous image scrolling Date: Tue, 03 Apr 2018 03:59:23 +0200 Message-ID: <87muyl59tw.fsf@telefonica.net> References: <87inaiss6l.fsf@web.de> <6FCF6ACA-4F29-4B6B-BE9D-D7130C6E9495@gnu.org> <87fu5moe4c.fsf@web.de> <877eqyocro.fsf@web.de> <83zi3uz4nb.fsf@gnu.org> <0b1dd3fa-e0b0-ed20-a256-dd92d1c1826f@dancol.org> <8bc3c4c7-dfc7-987a-95e7-bd309e2326c6@cs.ucla.edu> <03118DC0-39DA-4AB5-980E-A33809B9A5EE@raeburn.org> <86578165-1b41-e75c-7180-84d8edefc44b@grinta.net> <87d10i9qbx.fsf@mail.linkov.net> <87tvtucch8.fsf@telefonica.net> <87efjxibor.fsf_-_@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522720707 17131 195.159.176.226 (3 Apr 2018 01:58:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2018 01:58:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 03 03:58:22 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f3BDJ-0004G1-4g for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2018 03:58:21 +0200 Original-Received: from localhost ([::1]:51234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3BFH-00054M-Ja for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2018 22:00:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3BEW-00053s-Jg for emacs-devel@gnu.org; Mon, 02 Apr 2018 21:59:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3BEU-0006ov-0W for emacs-devel@gnu.org; Mon, 02 Apr 2018 21:59:36 -0400 Original-Received: from [195.159.176.226] (port=36264 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f3BET-0006o0-PI for emacs-devel@gnu.org; Mon, 02 Apr 2018 21:59:33 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f3BCL-0003Jd-My for emacs-devel@gnu.org; Tue, 03 Apr 2018 03:57:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:WqgOer+AmjZBllCvx8kNCClXrfI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224265 Archived-At: Juri Linkov writes: >>>> What would improve my user experience would be improvements to the >>>> display engine that will allow a better document viewing capabilities >>>> in something like pdf-tools (like continuous scrolling). >>> >>> Continuous scrolling can be easily implemented with a simple hack >>> to insert adjacent images for the previous/next pdf pages in >>> the same DocView buffer. >> >> I've looked into implementing this feature and it is not as simple as it >> seems. The hack you mention is precisely that: a hack, and a very cranky >> one. AFAIK there is no way of implementing continous scrolling with >> adjacent images if you care at all about robustness and user experience. >> And the fact that people is asking for this feature for years and, to >> this day, nobody implemented it, seems to confirm my impressions. > > I just realized we already have continuous image scrolling mode: > > 1. visiting a PDF file generates PNG images in the temporary directory > 2. C-x d /tmp/docview1000/... RET > 3. M-x iimage-mode RET > 4. enjoy continuous image scrolling mode directly in dired > (the same logic could be later incorporated into doc-view.el) > > I tried this with a directory containing ca 1000 pages/images > and there is no performance degradation while continuously scrolling > all these 1000 images. PDF-Tools (which is vastly superior to the built-in PDF viewer) does not work this way. It generates pages on demand. It is an absurd waste of resources to visit a book and generate one png file for each page. PDF-Tools solves this and does much more. So, if the solution depends on having pre-generated images, it is worse than not having continuous scroll, IMAO. OTOH, I tried what you suggest on a directory with lots of images. The result is quite crude. For example, it seems that the curso height corresponds to the image height, i.e. it is not possible to finely scroll the sequence of images up and down, you go one image at the time. The problems I faced while trying to implement continous document scroll for PDF-Tools revolved around making the scroll actually continous: if you scroll down from page P-1 to page P, remove page P-2 and append page P+1 without producing visible jumps.