From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Newsgroups: gmane.emacs.devel Subject: Re: Auto-resizing of images in image-mode Date: Mon, 20 Apr 2020 12:31:44 +0200 Message-ID: <87ftcy4fe7.fsf@gmail.com> References: <83r1wqgcl1.fsf@gnu.org> <87eesnayhf.fsf@mail.linkov.net> <83sgh2d2zo.fsf@gnu.org> <874ktg5pgt.fsf@mail.linkov.net> <87h7xg55dy.fsf@gmail.com> <87blnnxe2x.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="91634"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 20 12:31:57 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQTiX-000Nl9-JT for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Apr 2020 12:31:57 +0200 Original-Received: from localhost ([::1]:32952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQTiW-0007eO-Kt for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Apr 2020 06:31:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55832 helo=eggs1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQThj-0006wP-S2 for emacs-devel@gnu.org; Mon, 20 Apr 2020 06:31:08 -0400 Original-Received: from Debian-exim by eggs1p.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQThi-0005cv-R5 for emacs-devel@gnu.org; Mon, 20 Apr 2020 06:31:07 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43517) by eggs1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQThf-0005V3-QU; Mon, 20 Apr 2020 06:31:03 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id i10so11426108wrv.10; Mon, 20 Apr 2020 03:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=o2qWdfgATrJgIjOXQsJNAph0WzU07ic/JDWN4Odnq4s=; b=dTFDKL6F4F+ikgd/XYpTCcYSRRi4PVlrYCA2ZpgB0kacJMAianJ1X6LS7QVVHG9GJx RhXjBfjMBs5O3fxQqAqBEaSGiFCDgWkGsNtfCiVLkMRo5okJ1a1kp28j4ayduB20FNyA IoRN9NdhuMH3bj2nZv6AQ/um0ld3dXR3dnQpCwu+K/hXQq/DCD53nLgnFdYVQtJ9nBBK KGQx3lyI88wBy/AMiKFYNCz+OfaK5IV2fgdb8vWDUH0u+Bh5+kK2anx6kkTGZWgfnGU9 FBDt9LM2LtE13jvWfCPM2oCCQuRKI1gf/0d8Xs7Ch5QuBrLRW09SvwBQVYNrkQinxrK3 yBBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=o2qWdfgATrJgIjOXQsJNAph0WzU07ic/JDWN4Odnq4s=; b=BF21iI0eR/Qj6UbVW19FYigr9bQg/JAIdZ3jiIQ4okNLb53Or99nySLzI4lr4unE6y 1TFYfbuDVjUrOdqOPsNB1YP5rvJ6Sv7hRu5CLUI2eXSwT95K4Syba7Y7uwvILTkHW++t RhXJPUmDKjyTkodko4kZhsitTvRKJ1qq9RD22mMQFt50kZQfs80z7yOdp7Cz8T42vWQS U6PIy5UtswCzmyDtZdHrxp3uTW/2g/moZvCunKRGR0c4vvKhcPXCLboKsZARSEC/tu8t jVZkSPQZyBKyGBmWaGbQPT0sRUYlZnNfu8gsyjnNJQlq08ZvgYAL6UuUJHsLekj+ws1u IZkw== X-Gm-Message-State: AGi0PuZs9bsZjOxL6AOT1cOfVDMy4BBrqA9IyCfHREZQglzX0n9no3VH Xw4Pl9X95eWQ/MvYqglLorSzFXtr X-Google-Smtp-Source: APiQypIuHM7CKEByjx7MrL7lRSifi3esIcpWpTgdj+jx+PVQqn3Xm+ce8x98nW/dnTi4vcYiNqWyig== X-Received: by 2002:adf:f08b:: with SMTP id n11mr17563108wro.36.1587378661879; Mon, 20 Apr 2020 03:31:01 -0700 (PDT) Original-Received: from localhost ([185.112.167.47]) by smtp.gmail.com with ESMTPSA id k6sm827138wma.19.2020.04.20.03.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 03:31:01 -0700 (PDT) In-Reply-To: <87blnnxe2x.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 20 Apr 2020 02:17:02 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=stepnem@gmail.com; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs1p.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::430 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247375 Archived-At: 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-fra= me > 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... --=20 =C5=A0t=C4=9Bp=C3=A1n