From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69382 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: About inline pictures Date: Sat, 30 Jan 2010 11:50:53 +0100 Message-ID: <877hqzrhma.fsf@randomsample.de> References: <874om8h3w2.fsf@newsguy.com> <87aavzng95.fsf@catnip.gol.com> <87pr4u32e6.fsf@randomsample.de> <877hr0oirx.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264848739 30228 80.91.229.12 (30 Jan 2010 10:52:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Jan 2010 10:52:19 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17786@lists.math.uh.edu Sat Jan 30 11:52:16 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 1NbAw1-0005x8-Al for ding-account@gmane.org; Sat, 30 Jan 2010 11:52:13 +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 1NbAvE-0004kk-De; Sat, 30 Jan 2010 04:51:24 -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 1NbAvA-0004k7-Bs for ding@lists.math.uh.edu; Sat, 30 Jan 2010 04:51:20 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1NbAuw-0004Wu-0Z for ding@lists.math.uh.edu; Sat, 30 Jan 2010 04:51:20 -0600 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1NbAun-0005zt-00 for ; Sat, 30 Jan 2010 11:50:57 +0100 Original-Received: from dslc-082-083-038-192.pools.arcor-ip.net ([82.83.38.192] helo=void) by m61s02.vlinux.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1NbAuk-0006c6-CO for ding@gnus.org; Sat, 30 Jan 2010 11:50:54 +0100 In-Reply-To: <877hr0oirx.fsf@lifelogs.com> (Ted Zlatanov's message of "Fri, 29 Jan 2010 12:41:54 -0600") 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:69382 Archived-At: Ted Zlatanov writes: > On Thu, 28 Jan 2010 12:16:49 +0100 David Engster wrote: > > DE> You can scroll a buffer through fractional scrolling, but at the same > DE> the Emacs display engine will make sure that the point always stays > DE> visible. Therefore, to get a smooth scrolling buffer, you have to make > DE> sure that the point is always visible while doing the fractional > DE> scrolling. In image-mode, this is easy since there's only one possible > DE> point position (namely, point-min). > > DE> I've posted my results here: > > DE> http://www.randomsample.de/dru5/node/25 > > DE> I use it to scroll article buffers with images in them. I've also made > DE> videos showing the normal and fractional scrolling: > > DE> http://www.randomsample.de/dru5/node/26 > > DE> It's not perfect, but it works for me. Of course, this type of scrolling > DE> is only useful for read-only buffers, since it manipulates the point > DE> position. > > Does fixing this properly require work at the core C level? Or is your > approach going to work for everyone? My approach is more or less a hack. It's really just meant for cases where you just want to scroll a buffer and don't care about point position. It's OK for read-only buffers like Gnus articles or emacs-w3m buffers. I've thought about making this better, for example by also doing textual scrolling when possible (i.e. so that images do not suddenly vanish or pop up). This would set the fractional scrolling back to zero and hopefully make it possible to use this for editing buffers with images in them (e.g. AucTeX buffers with enabled preview). But if I remember correctly, for doing this I would have to know the height of lines which are currently not displayed, and I think this is not possible in Emacs. I've also thought about using sliced images in Gnus, but this had other problems. I'm using a line-spacing >0, so by default, sliced images will have gaps in them. However, you *can* have different line spacings in a buffer (see http://www.randomsample.de/dru5/node/24). But in the end, I didn't try this further, since it became even more hack-ish than the 'fractional scrolling' approach, and I didn't want to mess with the Gnus and emacs-w3m code for inserting images. -David