From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Auto-resizing of images in image-mode Date: Mon, 20 Apr 2020 02:17:02 +0300 Organization: LINKOV.NET Message-ID: <87blnnxe2x.fsf@mail.linkov.net> References: <83r1wqgcl1.fsf@gnu.org> <87eesnayhf.fsf@mail.linkov.net> <83sgh2d2zo.fsf@gnu.org> <874ktg5pgt.fsf@mail.linkov.net> <87h7xg55dy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121179"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , emacs-devel@gnu.org To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 20 01:28:39 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 1jQJMc-000VQ3-TX for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Apr 2020 01:28:38 +0200 Original-Received: from localhost ([::1]:54070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQJMb-0004vN-Uw for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Apr 2020 19:28:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38474 helo=eggs1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQJLt-0003fs-Ml for emacs-devel@gnu.org; Sun, 19 Apr 2020 19:27:53 -0400 Original-Received: from Debian-exim by eggs1p.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQJLt-0002Tv-6f for emacs-devel@gnu.org; Sun, 19 Apr 2020 19:27:53 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:33349) by eggs1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQJLr-0002A8-1Y; Sun, 19 Apr 2020 19:27:51 -0400 X-Originating-IP: 91.129.99.85 Original-Received: from mail.gandi.net (m91-129-99-85.cust.tele2.ee [91.129.99.85]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id C50B820002; Sun, 19 Apr 2020 23:27:45 +0000 (UTC) In-Reply-To: <87h7xg55dy.fsf@gmail.com> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?= =?utf-8?B?ZWMiJ3M=?= message of "Sun, 19 Apr 2020 08:58:01 +0200") Received-SPF: pass client-ip=217.70.183.200; envelope-from=juri@linkov.net; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs1p.gnu.org: Linux 3.11 and newer [fuzzy] X-Received-From: 217.70.183.200 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:247337 Archived-At: >> 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.