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: Fri, 6 Dec 2013 06:43:11 -0800 (PST) Message-ID: <746cd4cb-c69d-4cff-8dee-f7ccde3cb2f4@default> 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>> <<52A188D8.60608@gmx.at>> <<83txem1i7m.fsf@gnu.org>> 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 1386341096 12865 80.91.229.3 (6 Dec 2013 14:44:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2013 14:44:56 +0000 (UTC) Cc: 16028@debbugs.gnu.org To: Eli Zaretskii , martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 06 15:45:01 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 1VoweK-0002wc-OM for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Dec 2013 15:45:00 +0100 Original-Received: from localhost ([::1]:59431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoweK-0001Mz-Ct for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Dec 2013 09:45:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VowdX-00006B-Sx for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 09:44:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VowdP-0003Kd-9A for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 09:44:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VowdP-0003KR-5J for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 09:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VowdO-0003R6-IF for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 09:44: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: Fri, 06 Dec 2013 14:44: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.138634099713134 (code B ref 16028); Fri, 06 Dec 2013 14:44:02 +0000 Original-Received: (at 16028) by debbugs.gnu.org; 6 Dec 2013 14:43:17 +0000 Original-Received: from localhost ([127.0.0.1]:33512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vowcf-0003Pm-2E for submit@debbugs.gnu.org; Fri, 06 Dec 2013 09:43:17 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:20914) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vowcd-0003Pe-Aj for 16028@debbugs.gnu.org; Fri, 06 Dec 2013 09:43:16 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rB6EhD09018357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Dec 2013 14:43:13 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rB6EhCn1016175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Dec 2013 14:43:13 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rB6EhCFP016790; Fri, 6 Dec 2013 14:43:12 GMT In-Reply-To: <<83txem1i7m.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] 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:81528 Archived-At: > Perhaps the real-life thumbnail-mode does something to restore the > frame dimensions, thus countermanding the effect of making the font > smaller? This is the core code, for thumbifying & dethumbifying: (defcustom thumfr-frame-parameters '((menu-bar-lines . 0) (tool-bar-lines . 0) (scroll-bar-width . 6)) "*Frame parameters for thumbnail frames. Use this to show or hide things like the menu bar, tool bar, tab bar, and scroll bars for thumbnail frames." :type '(repeat (cons symbol sexp)) :group 'Thumbnail-Frames :set (lambda (sym defs) (custom-set-default sym defs) (dolist (frm (frame-list)) (when (and (frame-live-p frm) (frame-parameter frm 'thumfr-thumbnail-frame)) (modify-frame-parameters frm thumfr-frame-parameters))))) (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) (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) (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))))))) (defun thumfr-dethumbify-frame (&optional frame) "Restore thumbnail FRAME to original size (default: selected frame)." (interactive) (setq frame (or frame (selected-frame))) (let* ((non-tf-params (frame-parameter frame 'thumfr-thumbnail-frame)) (tf-params (thumfr-remove-if #'thumfr-thumfr-parameter-p (frame-parameters frame)))) (when non-tf-params ; No-op if not a thumbnail. (set-frame-parameter frame 'thumfr-non-thumbnail-frame tf-params) (set-frame-parameter frame 'thumfr-thumbnail-frame nil) (condition-case thumfr-dethumbify-frame (progn (enlarge-font thumfr-font-difference frame) (modify-frame-parameters frame non-tf-params)) (error (set-frame-parameter frame 'thumfr-thumbnail-frame non-tf-params) (set-frame-parameter frame 'thumfr-non-thumbnail-frame nil) (error (error-message-string thumfr-dethumbify-frame)))) (select-frame-set-input-focus frame) (thumfr-only-raise-frame frame)))) (defun thumfr-thumfr-parameter-p (parameter+value) "Return non-nil if PARAMETER+VALUE is a `thumb-frm.el' frame parameter. PARAMETER+VALUE is a frame-parameter cons: (PARAMETER . VALUE). This means that PARAMETER is either `thumbfr-thumbnail-frame' or `thumbfr-non-thumbnail-frame'." (memq (car parameter+value) '(thumfr-thumbnail-frame thumfr-non-thumbnail-frame))) To be clear (I was not, before; sorry), the problem is not with shrinking and enlarging the font and having the frame size follow. For instance, my commands `zoom-frm-out' and `zoom-frm-in' work fine in this respect. The problem is with thumbifying (`thumfr-thumbify-frame'). Running it through the debugger, I see that the frame _is_ shrunk correctly, along with the font, at this point in the code: (enlarge-font (- thumfr-font-difference) frame) ... (modify-frame-parameters frame thumfr-frame-parameters) But if I don't go through the debugger, it does not work. And if I just hit `c' in the debugger, instead of `d' throughout, it also does not work. This is 100% reproducible. Dunno why stepping through the debugger would work, and even hitting `c' for the `enlarge-font' call works, but hitting `c' for the `condition-case' does not. HTH.