From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16028: 24.3.50; Latest build completely breaks my thumnail frames code Date: Mon, 2 Dec 2013 07:51:59 -0800 (PST) Message-ID: <8dee88e8-6b12-4822-9586-e013328f2ddc@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1385999603 3879 80.91.229.3 (2 Dec 2013 15:53:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Dec 2013 15:53:23 +0000 (UTC) To: 16028@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 02 16:53:27 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VnVoK-0001Ld-Qo for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Dec 2013 16:53:25 +0100 Original-Received: from localhost ([::1]:37492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnVoK-0000pN-76 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Dec 2013 10:53:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnVo8-0000oo-Gr for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2013 10:53:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnVny-0002lD-Lq for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2013 10:53:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnVny-0002l7-IQ for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2013 10:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VnVny-0002x8-7I for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2013 10:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Dec 2013 15:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16028 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138599955411310 (code B ref -1); Mon, 02 Dec 2013 15:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Dec 2013 15:52:34 +0000 Original-Received: from localhost ([127.0.0.1]:54809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VnVnW-0002wM-3X for submit@debbugs.gnu.org; Mon, 02 Dec 2013 10:52:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54885) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VnVnT-0002w9-Gl for submit@debbugs.gnu.org; Mon, 02 Dec 2013 10:52:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnVnF-0002VP-MY for submit@debbugs.gnu.org; Mon, 02 Dec 2013 10:52:26 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnVnF-0002VL-J8 for submit@debbugs.gnu.org; Mon, 02 Dec 2013 10:52:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnVn8-0000ma-2k for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2013 10:52:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnVn0-0002SD-I0 for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2013 10:52:10 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:50710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnVn0-0002S8-BC for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2013 10:52:02 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rB2Fq0VB001701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 Dec 2013 15:52:01 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rB2FpxSX021244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 2 Dec 2013 15:52:00 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rB2FpxcM021223 for ; Mon, 2 Dec 2013 15:51:59 GMT X-Priority: 2 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81253 Archived-At: I cannot use the latest Emacs build at all. I extensively use thumbnail frames, which are tiny frames, fully functional, made by shrinking the frame's font size. FWIW, this is very important to me. The code is here: http://www.emacswiki.org/emacs-en/download/thumb-frm.el http://www.emacswiki.org/emacs-en/download/frame-cmds.el http://www.emacswiki.org/emacs-en/download/frame-fns.el The code is simple. But presumably you need not examine it. Just please, ASAP, restore the link between font size and frame size. Now, when I hit C-z to thumbify a frame, the font is shrunk, but the frame is not shrunk accordingly. The core of the code is this: (defun enlarge-font (&optional increment frame) "Increase size of font in FRAME by INCREMENT. Interactively, INCREMENT is given by the prefix argument. Optional FRAME parameter defaults to current frame." (interactive "p") (setq frame (or frame (selected-frame))) (let ((fontname (cdr (assq 'font (frame-parameters frame)))) (count enlarge-font-tries)) (setq fontname (enlarged-font-name fontname frame increment)) (while (and (not (x-list-fonts fontname)) (wholenump (setq count (1- count)))) (setq fontname (enlarged-font-name fontname frame increment))) (unless (x-list-fonts fontname) (error "Cannot change font size")) (modify-frame-parameters frame (list (cons 'font fontname))) ;; Update faces that want a bold or italic version of the default font. (when (< emacs-major-version 21) (frame-update-faces frame)))) (defun enlarged-font-name (fontname frame increment) "FONTNAME, after enlarging font size of FRAME by INCREMENT. FONTNAME is the font of FRAME." (when (query-fontset fontname) (let ((ascii (assq 'ascii (aref (fontset-info fontname frame) 2)))) (when ascii (setq fontname (nth 2 ascii))))) (let ((xlfd-fields (x-decompose-font-name fontname))) (unless xlfd-fields (error "Cannot decompose font name")) (let ((new-size (+ (string-to-number (aref xlfd-fields xlfd-regexp-pixelsize-subnum)) increment))) (unless (> new-size 0) (signal 'font-too-small (list new-size))) (aset xlfd-fields xlfd-regexp-pixelsize-subnum (number-to-string new-size))) ;; Set point size & width to "*", so frame width adjusts to new font (aset xlfd-fields xlfd-regexp-pointsize-subnum "*") (aset xlfd-fields xlfd-regexp-avgwidth-subnum "*") (x-compose-font-name xlfd-fields))) Though not needed to see the problem, here is the thumbify code that makes use of `enlarge-font': (defun thumfr-thumbify-frame (&optional frame) "Create a thumbnail version of FRAME (default: selected frame). Variable `thumfr-frame-parameters' is used to determine which frame parameters (such as `menu-bar-lines') to remove." (interactive) (setq frame (or frame (selected-frame))) (let* ((tf-params (frame-parameter frame 'thumfr-non-thumbnail-frame= )) (non-tf-params (thumfr-remove-if #'thumfr-thumfr-parameter-p (frame-parameters frame)))) (when thumfr-rename-when-thumbify-flag (rename-non-minibuffer-frame)) (unless (frame-parameter frame 'thumfr-thumbnail-frame) ; No-op if alre= ady a thumbnail. (set-frame-parameter frame 'thumfr-thumbnail-frame non-tf-params) (set-frame-parameter frame 'thumfr-non-thumbnail-frame nil) (condition-case thumfr-thumbify-frame (progn (enlarge-font (- thumfr-font-difference) frame) ; In `frame-cmd= s.el'. (when tf-params (modify-frame-parameters frame tf-params)) (when thumfr-next-stack-xoffset (set-frame-position frame thumfr-next-stack-xoffset thumfr-next-stack-yoffset) (setq thumfr-next-stack-xoffset nil thumfr-next-stack-yoffset nil)) (modify-frame-parameters frame thumfr-frame-parameters)) (font-too-small ; Try again, with a larger font. (set-frame-parameter frame 'thumfr-non-thumbnail-frame tf-params) (set-frame-parameter frame 'thumfr-thumbnail-frame nil) (unless (> thumfr-font-difference 0) (error (error-message-string thumfr-thumbify-frame))) (let ((thumfr-font-difference (1- thumfr-font-difference))) (thumfr-thumbify-frame frame))) (error (set-frame-parameter frame 'thumfr-non-thumbnail-frame tf-params) (set-frame-parameter frame 'thumfr-thumbnail-frame nil) (error (error-message-string thumfr-thumbify-frame))))))) =20 In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-12-01 on ODIEONE Bzr revision: 115342 eggert@cs.ucla.edu-20131201223313-xvgrjlk0r9aiakes Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/binary --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-Ic:/Devel/emacs/include LDFLAGS=3D-Lc:/Devel/emacs/lib'