From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69378 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: About inline pictures Date: Thu, 28 Jan 2010 12:16:49 +0100 Message-ID: <87pr4u32e6.fsf@randomsample.de> References: <874om8h3w2.fsf@newsguy.com> <87aavzng95.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264677474 18189 80.91.229.12 (28 Jan 2010 11:17:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jan 2010 11:17:54 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17782@lists.math.uh.edu Thu Jan 28 12:17:51 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NaSNf-0002pc-Dr for ding-account@gmane.org; Thu, 28 Jan 2010 12:17:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1NaSN0-0001hV-E6; Thu, 28 Jan 2010 05:17:06 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1NaSMw-0001go-Vz for ding@lists.math.uh.edu; Thu, 28 Jan 2010 05:17:02 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1NaSMu-0001dR-LW for ding@lists.math.uh.edu; Thu, 28 Jan 2010 05:17:02 -0600 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1NaSMl-0003CC-00 for ; Thu, 28 Jan 2010 12:16:51 +0100 Original-Received: from dslc-082-083-059-179.pools.arcor-ip.net ([82.83.59.179] helo=void) by m61s02.vlinux.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1NaSMl-0005F9-4O for ding@gnus.org; Thu, 28 Jan 2010 12:16:51 +0100 In-Reply-To: <87aavzng95.fsf@catnip.gol.com> (Miles Bader's message of "Thu, 28 Jan 2010 10:57:10 +0900") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) Mail-Copies-To: never Mail-Followup-To: ding@gnus.org X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69378 Archived-At: Miles Bader writes: > Harry Putnam writes: >> When I open a message that has an image that displays inline, I find >> that when I scroll down to bring the picture fully into the message >> buffer, unless I'm very careful I inevitably scroll one too many lines >> which drops the image instantly before I've actually had a chance to >> fully view it. > ... >> Seems like there should be a few extra lines of cushion ... maybe >> something like 3 lines beyond the last line of image so that its >> easier not to scroll too far. > > Perhaps even better would be for Gnus to do what image-mode does; > I think it basically it slices the image into little strips so vertical > scrolling works much more naturally (image-mode also offers special > bindings to make horizontal scrolling work well, but I dunno how easy it > would be to offer such in Gnus). Last time I looked, image-mode used fractional scrolling to scroll an image smoothly. There's also the possibility so slice images, but this is rarely used, since it has other disadvantages (it depends on line-spacing being 0, for instance). > Perhaps image-mode already offers a function to do this for embedded > images, or could be refactored to do so... I've fiddled with this stuff some time ago, and it's a harder problem than I initially thought. You can scroll a buffer through fractional scrolling, but at the same the Emacs display engine will make sure that the point always stays visible. Therefore, to get a smooth scrolling buffer, you have to make sure that the point is always visible while doing the fractional scrolling. In image-mode, this is easy since there's only one possible point position (namely, point-min). I've posted my results here: http://www.randomsample.de/dru5/node/25 I use it to scroll article buffers with images in them. I've also made videos showing the normal and fractional scrolling: http://www.randomsample.de/dru5/node/26 It's not perfect, but it works for me. Of course, this type of scrolling is only useful for read-only buffers, since it manipulates the point position. -David