From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Perry E. Metzger" Newsgroups: gmane.emacs.devel Subject: Re: Weird problem with inital frame sizing Date: Sat, 15 Sep 2018 19:23:26 -0400 Message-ID: <20180915192326.566d6b6d@jabberwock.cb.piermont.com> References: <20180912103723.0999377c@jabberwock.cb.piermont.com> <20180913150851.3a330def@jabberwock.cb.piermont.com> <20180913151516.78aa0de4@jabberwock.cb.piermont.com> <20180913152355.7618b1a2@jabberwock.cb.piermont.com> <20180913153151.0a14f736@jabberwock.cb.piermont.com> <20180913173401.5e2f9c45@jabberwock.cb.piermont.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1537053728 9320 195.159.176.226 (15 Sep 2018 23:22:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Sep 2018 23:22:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 16 01:22:03 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1Jt5-0002II-H0 for ged-emacs-devel@m.gmane.org; Sun, 16 Sep 2018 01:22:03 +0200 Original-Received: from localhost ([::1]:57066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1JvB-0003R7-Hm for ged-emacs-devel@m.gmane.org; Sat, 15 Sep 2018 19:24:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1JuY-0003Qq-BE for emacs-devel@gnu.org; Sat, 15 Sep 2018 19:23:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1JuX-0008Dj-Jn for emacs-devel@gnu.org; Sat, 15 Sep 2018 19:23:34 -0400 Original-Received: from hacklheber.piermont.com ([2001:470:30:84:e276:63ff:fe62:3400]:54468) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1JuX-0007VJ-EO for emacs-devel@gnu.org; Sat, 15 Sep 2018 19:23:33 -0400 Original-Received: from snark.cb.piermont.com (localhost [127.0.0.1]) by hacklheber.piermont.com (Postfix) with ESMTP id 78ED274; Sat, 15 Sep 2018 19:23:26 -0400 (EDT) Original-Received: from jabberwock.cb.piermont.com (jabberwock.cb.piermont.com [10.160.2.107]) by snark.cb.piermont.com (Postfix) with ESMTP id 591932DF9CA; Sat, 15 Sep 2018 19:23:26 -0400 (EDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:30:84:e276:63ff:fe62:3400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:229831 Archived-At: On Thu, 13 Sep 2018 21:14:23 -0400 Stefan Monnier wrote: > > And what does it have to do with the overall problem I'm having? > > Nothing directly. You just pulled on one of the loose threads ;-) I changed my font setting to use "face-spec-set". Naturally it changed nothing but now no one can complain that I'm using the wrong function. :) So getting back to my problem: On one of my remote machines (which I view over xpra), if I set: (add-hook 'window-setup-hook (lambda () (when window-system (sleep-for 1) ; *** NOTE THIS PART HERE *** (set-frame-size (car (frame-list)) 80 50)))) the frame is set to 50 lines, and if I do (add-hook 'window-setup-hook (lambda () (when window-system ;;(sleep-for 1) (set-frame-size (car (frame-list)) 80 50)))) that is, without the sleep, it does not get set properly (and indeed sometimes is very messed up indeed, at random, as though the frame size was set to what it would have been in pixels if I hadn't changed the font.) Note that I have both default-frame-alist and initial-frame-alist set to indicate the frame should be 50 lines. This only seems to work for subsequent frames. (fyi, why "(car (frame-list))": I was using it instead of "selected-frame" just in case there was some weirdness with the frame not being selected at the start. This helped nothing.) Anyone with ideas on how to debug this apparent race condition? I'd be very grateful. Perry -- Perry E. Metzger perry@piermont.com