From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: Re: (window-system) returns nil on after-make-frame-functions when creating an X frame Date: Mon, 9 Mar 2009 11:38:53 -0700 Message-ID: <20090309183851.GA6923@reforged> References: <20090309170208.GA6650@reforged> <87ocwabmzt.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" X-Trace: ger.gmane.org 1236623954 7565 80.91.229.12 (9 Mar 2009 18:39:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Mar 2009 18:39:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 09 19:40:31 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from terminus-est.gnu.org ([66.92.78.210] helo=lists.gnu.org) by lo.gmane.org with esmtp (Exim 4.50) id 1LgkOr-0006Ec-Hh for ged-emacs-devel@m.gmane.org; Mon, 09 Mar 2009 19:40:30 +0100 Original-Received: from localhost ([127.0.0.1]:36547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgkNV-0003ei-L2 for ged-emacs-devel@m.gmane.org; Mon, 09 Mar 2009 14:39:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgkNP-0003bt-OU for emacs-devel@gnu.org; Mon, 09 Mar 2009 14:38:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgkNO-0003aN-P8 for emacs-devel@gnu.org; Mon, 09 Mar 2009 14:38:59 -0400 Original-Received: from [199.232.76.173] (port=44178 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgkNO-0003a6-F7 for emacs-devel@gnu.org; Mon, 09 Mar 2009 14:38:58 -0400 Original-Received: from wa-out-1112.google.com ([209.85.146.180]:45376) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LgkNN-0006xO-QB for emacs-devel@gnu.org; Mon, 09 Mar 2009 14:38:58 -0400 Original-Received: by wa-out-1112.google.com with SMTP id k17so922903waf.26 for ; Mon, 09 Mar 2009 11:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=ir567X47p6xj+uGKS+dOBWS+OJvWqgIiYGqW3Z/jZmw=; b=dQpJSCAyzp3jddvZNlO0IHS5iCcIad1/9VDVJZAFYbLeePqDvWUap5itacf66tkisx UOsMyqbJEP3br3G3EXU6zl9rih8l+CskE8nQoclsausO6iIy7+eI52zA2KENWjia3ry6 3MmUhPlYE+1Ec19AdnYswsqRPVkGWX5ilr0F8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=K38NNo0S8YsUcPpAe6O6mG0R+Szww+tfllPHSIiFhCcSO2M9vsuzUuCdLAgEFgfDnO vDyFEh+xwFy8UiBatRl8DIJDIUJEUSOtHCsHvk+lOtl68LH4ObjWNJE9erBiceR1kLwr 6nrhDjxVwjMmalWw55ra/YeDhIFOo2vJVpbMc= Original-Received: by 10.114.113.16 with SMTP id l16mr3676182wac.164.1236623935790; Mon, 09 Mar 2009 11:38:55 -0700 (PDT) Original-Received: from @ (c66-235-1-45.sea2.cablespeed.com [66.235.1.45]) by mx.google.com with ESMTPS id k21sm4271526waf.57.2009.03.09.11.38.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Mar 2009 11:38:55 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87ocwabmzt.fsf@cyd.mit.edu> User-Agent: Mutt/1.5.16 (2007-06-09) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109526 Archived-At: --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 09, 2009 at 01:54:30PM -0400, Chong Yidong wrote: > Mike Mattie writes: >=20 > > To do this I called (window-system) which normally returns "x". It is > > not the best idea, but intuitively after the X frame is created it > > would sensibly return "x". > > > > Currently it returns nil. When (window-system) is evaluated in the > > scratch buffer sometime after the frame is made, well after > > after-make-frame-functions it does indeed return "x". >=20 > Did you give `window-system' the frame as an argument? I did. My function is as follows: (defun is-current-frame-x () (message "window system is %s" (princ (window-system (selected-frame)))) (equal 'x (window-system (selected-frame))) ) when called on the before-make-frame-hook, and the after-make-frame-functio= ns hook the result is always nil. In essence I want to hook when a frame is created and determine if it is an X or tty frame. This might not be the right path, but the results are strange ? --=20 GnuPG Key: B9012279 is available from HKP server pgp.mit.edu --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkm1YjsACgkQdfRchrkBInkHswCg5BsW1CJfdiS0KN5tqHRVC9bO 67EAn2UaY9asE36augR7Pz+l/rR/k7Is =kJ+v -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--