unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Auto-resizing of images in image-mode
Date: Mon, 20 Apr 2020 12:31:44 +0200	[thread overview]
Message-ID: <87ftcy4fe7.fsf@gmail.com> (raw)
In-Reply-To: <87blnnxe2x.fsf@mail.linkov.net> (Juri Linkov's message of "Mon,  20 Apr 2020 02:17:02 +0300")

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	other threads:[~2020-04-20 10:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 18:13 Auto-resizing of images in image-mode Eli Zaretskii
2020-04-16 21:53 ` Juri Linkov
2020-04-17  6:45   ` Eli Zaretskii
2020-04-18 23:45     ` Juri Linkov
2020-04-19  6:58       ` Štěpán Němec
2020-04-19 23:17         ` Juri Linkov
2020-04-20 10:31           ` Štěpán Němec [this message]
2020-04-20 15:29             ` Eli Zaretskii
2020-04-20 23:44             ` Juri Linkov
2020-04-20 13:09           ` Stefan Monnier
2020-04-21 21:28             ` Juri Linkov
2020-04-22  5:34               ` Tassilo Horn
2020-04-19 12:34       ` Alan Third
2020-04-19 23:18         ` Juri Linkov
2020-04-19 14:06       ` Eli Zaretskii
2020-04-19 23:19         ` Juri Linkov
2020-04-19 23:58           ` Juri Linkov
2020-04-20 14:39             ` Eli Zaretskii
2020-04-20 23:43               ` Juri Linkov
2020-04-21 13:51                 ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87ftcy4fe7.fsf@gmail.com \
    --to=stepnem@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).