From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16028: 24.3.50; Latest build completely breaks my thumnail frames code Date: Fri, 06 Dec 2013 09:20:40 +0100 Message-ID: <52A188D8.60608@gmx.at> References: <8dee88e8-6b12-4822-9586-e013328f2ddc@default> <529CCE7F.3070400@gmx.at> <52A08780.9020405@gmx.at> <3df21358-48ca-4150-9f0e-aa2dbf78cbcb@default> <360e0ca4-7e4a-4f11-8157-c8f69e4ce913@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1386318124 3403 80.91.229.3 (6 Dec 2013 08:22:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2013 08:22:04 +0000 (UTC) Cc: 16028@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 06 09:22:08 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 1Voqfn-0005ry-Mk for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Dec 2013 09:22:07 +0100 Original-Received: from localhost ([::1]:57792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voqfn-0002Vi-6f for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Dec 2013 03:22:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voqes-0000sA-7n for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 03:21:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Voqek-0001Kn-Qr for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 03:21:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voqek-0001Kj-NP for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 03:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Voqek-00015r-6Y for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 03:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Dec 2013 08:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16028 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16028-submit@debbugs.gnu.org id=B16028.13863180494179 (code B ref 16028); Fri, 06 Dec 2013 08:21:02 +0000 Original-Received: (at 16028) by debbugs.gnu.org; 6 Dec 2013 08:20:49 +0000 Original-Received: from localhost ([127.0.0.1]:32939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoqeW-00015K-5G for submit@debbugs.gnu.org; Fri, 06 Dec 2013 03:20:48 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:55982) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoqeS-000159-LE for 16028@debbugs.gnu.org; Fri, 06 Dec 2013 03:20:45 -0500 Original-Received: from [62.47.61.24] ([62.47.61.24]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MTjqS-1VxkbL1q2S-00QWoT for <16028@debbugs.gnu.org>; Fri, 06 Dec 2013 09:20:43 +0100 In-Reply-To: <360e0ca4-7e4a-4f11-8157-c8f69e4ce913@default> X-Provags-ID: V03:K0:uzES8phqQeewXEFrQEgMLwjrbxyw64WC8bQCNHX/FuC5z+MRNxl RBq7LZuGpUGyRNVuiGDQggT68IQk+E219560Ktfpp85wF4UkRPpzyOlYDuRMuuRVjs66mcp 1Yv0iInLBMHmesIMUMmmVVhONPcg6cUXiKZ1eFcKbN5tasRUArmtl1iV6yZhIC43yS5B7m8 DWwj4sx4DsHbVG/aIurJw== 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:81499 Archived-At: > Unfortunately, it doesn't help. Exactly the same broken > behavior, I'm afraid. > > I tested using this build from Juanma: > > In GNU Emacs 24.3.50.1 (i686-pc-mingw32) > of 2013-12-05 on ODIEONE > Bzr revision: 115389 monnier@iro.umontreal.ca-20131205202554-1az0dm7bdk303bgw Then we have to dig into this further. Let's stick to this simple example (where `enlarged-font-name' is just yours): (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))) (defun enlarge-font-by (increment) (let* ((old-size (cons (frame-width) (frame-height))) (old-pixel-size (cons (frame-pixel-width) (frame-pixel-height))) (old-font (cdr (assq 'font (frame-parameters (selected-frame))))) (new-font (enlarged-font-name old-font (selected-frame) increment))) (modify-frame-parameters (selected-frame) (list (cons 'font new-font))) (sit-for 0) (with-current-buffer (get-buffer-create "*temp*") (goto-char (point-max)) (insert (format "%s %s %s ->\n%s %s %s\n\n" old-font old-size old-pixel-size new-font (cons (frame-width) (frame-height)) (cons (frame-pixel-width) (frame-pixel-height))))))) ;; (eval-buffer) ;; (enlarge-font-by 4) ;; (enlarge-font-by -4) ;; (enlarge-font-by -4) ;; (enlarge-font-by 0) ;; (enlarge-font-by 4) With emacs -Q evaluating the commented out rows in sequence gets me in *temp*: -outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (80 . 38) (672 . 608) -> -outline-Courier New-normal-normal-normal-mono-17-*-*-*-c-*-iso8859-1 (80 . 38) (836 . 760) -outline-Courier New-normal-normal-normal-mono-17-*-*-*-c-*-iso8859-1 (80 . 38) (836 . 760) -> -outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (80 . 38) (672 . 608) -outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (80 . 38) (672 . 608) -> -outline-Courier New-normal-normal-normal-mono-9-*-*-*-c-*-iso8859-1 (80 . 38) (436 . 456) -outline-Courier New-normal-normal-normal-mono-9-*-*-*-c-*-iso8859-1 (80 . 38) (436 . 456) -> -outline-Courier New-normal-normal-normal-mono-9-*-*-*-c-*-iso8859-1 (80 . 38) (436 . 456) -outline-Courier New-normal-normal-normal-mono-9-*-*-*-c-*-iso8859-1 (80 . 38) (436 . 456) -> -outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (80 . 38) (672 . 608) The sit-for is needed for getting the right new pixel values, the resizing effect is the same when I comment it out. What do you get here? martin