On 6/22/2024 11:14 PM, Jim Porter wrote: > I agree completely, and I'm working on a patch to that effect. :) > > I think the problem you mention is a combination of some bugs I'm > working on fixing now, and like you say, 'shr-zoom-image' not providing > enough feedback about what's happening. It just says it's fetching the > image (this is also probably a bug; why fetch the image from the web > when we're just resizing it?). > > Since I'm most of the way done with this additional patch, I'll leave > this bug open for now. This ended up fairly complex, so I've split the patch into sub-parts to (I hope) make the changes easier to follow. There are four distinct, but related, improvements here: 1. Previously, SHR sliced images whenever you requested "original" zoom. But it would really be useful to slice images based on the size they'll be displayed at: a tiny image at "original" zoom doesn't need sliced, but a tall image at default zoom would benefit from slicing. So now SHR checks the height of the image to determine when to slice (you can also turn off slicing entirely, since you don't need it if you use 'pixel-scroll-precision-mode'). 2. When zooming, SHR lost track of the width and height of the image specified in the HTML like . I fixed that, and also cleaned up a bit of the code where we had a list that was simultaneously an alist and a plist (I converted it to a plist since more code used that form). 3. After much archaeology through old Gnus commits, I think I understand what each zoom level does, so I've fixed them. I've also added a new zoom level that zooms to the image's default size, ignoring HTML attributes. That's how the default and "full" zoom levels worked before my fix, so if someone wants the old behavior (I'd probably use it), there it is. I also made 'shr-zoom-image' display a message telling users the new zoom level. 4. Finally, every time you called 'shr-zoom-image', it would reload the image from the web. That shouldn't be necessary since there's a local cache. Now we use the cache when possible; easy enough.