* About inline pictures @ 2010-01-26 22:56 Harry Putnam 2010-01-28 1:57 ` Miles Bader 0 siblings, 1 reply; 6+ messages in thread From: Harry Putnam @ 2010-01-26 22:56 UTC (permalink / raw) To: ding I wonder if there are already settings that will prevent this problem: 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. To reproduce this problem set your emacs Xterminal to something like a geom. of 96x32, then open the message containing an inline image and scroll using the enter key to bring the image fully into the frame or to the last line of the image. Do it by holding down the `enter' key. I find it really hard to see when you've reached the last line of the image and instead go to far and loose it altogether. Requiring one to reopen the message and re-scroll the image. (slowly) (Of course this assumes the image is has enough size to require scrolling to see it all) 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About inline pictures 2010-01-26 22:56 About inline pictures Harry Putnam @ 2010-01-28 1:57 ` Miles Bader 2010-01-28 11:16 ` David Engster 0 siblings, 1 reply; 6+ messages in thread From: Miles Bader @ 2010-01-28 1:57 UTC (permalink / raw) To: ding Harry Putnam <reader@newsguy.com> 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). Perhaps image-mode already offers a function to do this for embedded images, or could be refactored to do so... -Miles -- It wasn't the Exxon Valdez captain's driving that caused the Alaskan oil spill. It was yours. [Greenpeace advertisement, New York Times, 25 February 1990] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About inline pictures 2010-01-28 1:57 ` Miles Bader @ 2010-01-28 11:16 ` David Engster 2010-01-29 18:41 ` Ted Zlatanov 2010-08-29 17:17 ` Lars Magne Ingebrigtsen 0 siblings, 2 replies; 6+ messages in thread From: David Engster @ 2010-01-28 11:16 UTC (permalink / raw) To: ding Miles Bader <miles@gnu.org> writes: > Harry Putnam <reader@newsguy.com> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About inline pictures 2010-01-28 11:16 ` David Engster @ 2010-01-29 18:41 ` Ted Zlatanov 2010-01-30 10:50 ` David Engster 2010-08-29 17:17 ` Lars Magne Ingebrigtsen 1 sibling, 1 reply; 6+ messages in thread From: Ted Zlatanov @ 2010-01-29 18:41 UTC (permalink / raw) To: ding On Thu, 28 Jan 2010 12:16:49 +0100 David Engster <deng@randomsample.de> 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? Ted ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About inline pictures 2010-01-29 18:41 ` Ted Zlatanov @ 2010-01-30 10:50 ` David Engster 0 siblings, 0 replies; 6+ messages in thread From: David Engster @ 2010-01-30 10:50 UTC (permalink / raw) To: ding Ted Zlatanov <tzz@lifelogs.com> writes: > On Thu, 28 Jan 2010 12:16:49 +0100 David Engster <deng@randomsample.de> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About inline pictures 2010-01-28 11:16 ` David Engster 2010-01-29 18:41 ` Ted Zlatanov @ 2010-08-29 17:17 ` Lars Magne Ingebrigtsen 1 sibling, 0 replies; 6+ messages in thread From: Lars Magne Ingebrigtsen @ 2010-08-29 17:17 UTC (permalink / raw) To: ding David Engster <deng@randomsample.de> writes: > I've fiddled with this stuff some time ago, and it's a harder problem > than I initially thought. Yeah. It's really annoying. You can scroll through an image by tapping RET, but when you get to the end, the entire picture disappears. Somebody should fix that. :-) -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-29 17:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-01-26 22:56 About inline pictures Harry Putnam 2010-01-28 1:57 ` Miles Bader 2010-01-28 11:16 ` David Engster 2010-01-29 18:41 ` Ted Zlatanov 2010-01-30 10:50 ` David Engster 2010-08-29 17:17 ` Lars Magne Ingebrigtsen
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 NNTP newsgroup(s).