From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: unsolicited patch to image-mode.el -- "fit to window" Date: Sat, 25 Jul 2015 10:27:35 +0200 Message-ID: <55B34877.2070406@gmx.at> References: <39315.1437728590@greg-minshalls-mbp.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437812888 24146 80.91.229.3 (25 Jul 2015 08:28:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jul 2015 08:28:08 +0000 (UTC) Cc: emacs-devel To: Greg Minshall Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 25 10:27:58 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZIuoH-00050A-6r for ged-emacs-devel@m.gmane.org; Sat, 25 Jul 2015 10:27:57 +0200 Original-Received: from localhost ([::1]:47491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIuoF-0006Zc-Te for ged-emacs-devel@m.gmane.org; Sat, 25 Jul 2015 04:27:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIuoC-0006X3-Gt for emacs-devel@gnu.org; Sat, 25 Jul 2015 04:27:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIuo8-0008ML-GU for emacs-devel@gnu.org; Sat, 25 Jul 2015 04:27:52 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:53181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIuo8-0008Lv-74 for emacs-devel@gnu.org; Sat, 25 Jul 2015 04:27:48 -0400 Original-Received: from [91.113.4.83] ([91.113.4.83]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0LxMgg-1YpsgC0pkA-016wMQ; Sat, 25 Jul 2015 10:27:46 +0200 In-Reply-To: <39315.1437728590@greg-minshalls-mbp.local> X-Provags-ID: V03:K0:VoMJwaY9TETjm9CEVi9TCaYHJw0sr+AGhRPZb/LisoIQfzHP6cG FUD+azqbv1Qtap1oO0PNE9hQCYvuYKOoPRjaz5CB4X2JmO4b02MdsQrncmGrRg0qJcM1c+p 5UEeJd77GsbWPe3/D0wBJt7etCSkGe3TTHDwaSshAoIx0qZG4ic6LPRvbae0A5DtGTxkY+Q EnDGfj5ZIxfuiC9aNdjrw== X-UI-Out-Filterresults: notjunk:1;V01:K0:6A2GKxmOlTc=:4H0WWbVjxB+3ebXk60vv3Z Bq8J0pJI10VgJibxuv9HPHHpyxd9d5Pk3F3IMA6GEFKQzoseSMEZd7mwPw12yEsw8E6RPm4Qt aPdTQnPxDAhfSwIlzsBoaEKKeLJGHAAJB1m2lpIhz1K6qMJT+Kc3BXzO28MQyf7jrD5XYMCmS nIt0YNSyq0YXGCN38OJIDg7Qzcr0tCMTVQwAQoZRKMyhIAquggN0wPvit20f6/0ti/SGfsGuw /l6hWua2ub0MH8jl/s63buLoRBX+9lqpCzyHBnzAqAEqjvzsDwwsfDaJ5q/dj/ul5BNYavVol tR23UJCP1F9fqe+wlfY5kvOyGLWglTQi0MMm07VipHO0zYP6YUkHuQhRHi99/Vf7wNuPkMShF JH/aTAd7FvFQ3bqS/lstkD2g7/NXSVbbvPHNIpBD1XQ7+ZLBs/ShRtAmlYm56UqcOkc4NeYRo kw9AKHbcH4TF8iikEqffCXNGUoaPxu2Ddjy6jEkF/0rNMCvkcnT+tgxnHXdGf4KTr9YznWUuW yziQVpvI8ABMYAN3NnlDprDaFTPzusxAzMJJJDXWzrpVno679PyKLusiPYp+p5ysz95oBolbX kUKAeQDKpeW67nWWFy+yzX2p7yPfaGb6XVjQZ5lSxu30JWNpL55kG3yXBcEYaUuj23hmkhGQ0 r0WW6NdWiYnKRHv3luYIH7jc9T5l7t5UW5ImvnEznpuG++8/TsVJeRx44rCEFh/NPRMs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188059 Archived-At: > right, that seems like a good rule to me. so, i'd tend to leave my code > with the same pattern used in the rest of the file (i.e., using > (window-size-pixel-edges)), just for consistency. I don't understand the "so" ;-) > (but, even a very > light breeze would be enough to cause me to change it to use the clearer > calls, so feel free to so breathe.) I can't test your patch because I build without image support. But I have two questions: (1) Why can't you use `fit-window-to-buffer'? (2) If the image appears on a frame alone, can you fit the frame to the image? Can `fit-frame-to-buffer' fit the frame to the image? Both of these should work, in principle. martin