Subject: Re: bug#8364: 24.0.9999; PATCH: Fit to width/height/page for doc-view.el

From: Tassilo Horn <[email-masked]>
Date: Wed, 30 Mar 2011 17:08:52 +0200

Stefan Monnier <[email-masked]> writes:

>> I'm trying to add `fit-slice-to-window' feature in doc-view.el.
>
> Nice, thanks.  BTW, maybe an even better functionality is
> "fit-rectangle-to-window", which would do the same except without
> slicing (i.e. move the top-left corner and zoom so only the specified
> rectangle is visible, but while keeping the outside visible via
> scrolling).

Where's the difference, except that you could scroll the margins if you
wanted to do so?  Implementation-wise, the difference is that Nakatani's
current approach simply uses the image slice for the geometry, your
rectangle approach requires another buffer-local variable.  And since
slices are there anyway, I prefer making fitting functions do the right
thing in that scenario.

You can already zoom and hscroll until you have the visible rectangle
you like to have, and all doc-view navigation commands preserve the
hscroll.

Bye,
Tassilo