Gnus development mailing list
 help / color / mirror / Atom feed
From: David Engster <deng@randomsample.de>
To: ding@gnus.org
Subject: Re: About inline pictures
Date: Sat, 30 Jan 2010 11:50:53 +0100	[thread overview]
Message-ID: <877hqzrhma.fsf@randomsample.de> (raw)
In-Reply-To: <877hr0oirx.fsf@lifelogs.com> (Ted Zlatanov's message of "Fri, 29 Jan 2010 12:41:54 -0600")

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



  reply	other threads:[~2010-01-30 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 22:56 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 [this message]
2010-08-29 17:17     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hqzrhma.fsf@randomsample.de \
    --to=deng@randomsample.de \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).