emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-resizing of images in image-mode


From: Štěpán Němec
Subject: Re: Auto-resizing of images in image-mode
Date: Mon, 20 Apr 2020 12:31:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Mon, 20 Apr 2020 02:17:02 +0300
Juri Linkov wrote:

>>> Also there are no keys for image-transform-fit-to-width,
>>> image-transform-fit-to-height and image-transform-reset.
>>> I thought about using a prefix key 'f', so using 'f w' to fit width,
>>> but 'f' is already taken too.
>>
>> 's' ("scale") is free, used e.g. by the imv image viewer to cycle
>> between different scaling modes (original size, shrink/fit to window).
>
> Thanks for the suggestion.  So I added these keys:
>
> s f           image-mode-fit-frame
> s h           image-transform-fit-to-height
> s w           image-transform-fit-to-width
> s r           image-transform-set-rotation
> s 0           image-transform-reset
> s s           image-transform-set-scale
>
> But then I discovered that doc-view uses other keys:
>
> s b             doc-view-set-slice-from-bounding-box
> s m             doc-view-set-slice-using-mouse
> s r             doc-view-reset-slice
> s s             doc-view-set-slice
>
> and
>
> F               doc-view-fit-window-to-page
> H               doc-view-fit-height-to-window
> P               doc-view-fit-page-to-window
> W               doc-view-fit-width-to-window
>
> Is it important to maintain compatibility between doc-view and image-mode?
>
> There was only one conflicting key is 'F' that is bound to image-goto-frame
> in image-mode-map, and now the prefix 's' is different too.

I see, that's unfortunate.

I don't use doc-view mode, but consistency seems important, esp. given
that its keymap iherits from image-mode-map.

OTOH I really like grouping similar functionality to a common prefix, as
it helps both mnemonics and discoverability/documentation, so I think
I'd prefer changing doc-view mode to follow image-mode's example here;
possibly changing the s prefix to something else (in the parent, i.e.
image-mode) so it doesn't conflict with the slice prefix. But changing
UI defaults is always a delicate matter...

-- 
Štěpán



reply via email to

[Prev in Thread] Current Thread [Next in Thread]