From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#10103: 24.0.91; Emacs/nextstep ignores frame geometry from org.gnu.Emacs.plist Date: Sat, 10 Dec 2011 15:01:59 +0100 Message-ID: <1DF79C6D-9B32-4A7F-BDFC-DA26B77C9F37@swipnet.se> References: <7izkfosl9l.fsf@mack.tetzco.de> <7iobvndf3c.fsf@mack.tetzco.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1323525793 30731 80.91.229.12 (10 Dec 2011 14:03:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 10 Dec 2011 14:03:13 +0000 (UTC) Cc: 10103@debbugs.gnu.org To: Kai Tetzlaff Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 10 15:03:06 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RZNW6-0005SA-Dg for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Dec 2011 15:03:06 +0100 Original-Received: from localhost ([::1]:54968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZNW5-0001Kg-SB for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Dec 2011 09:03:05 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZNW2-0001KQ-Pr for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2011 09:03:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RZNW1-0006aV-94 for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2011 09:03:02 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZNW1-0006aQ-4w for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2011 09:03:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RZNWz-0000gB-KE for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2011 09:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2011 14:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10103 X-GNU-PR-Package: emacs,ns X-GNU-PR-Keywords: Original-Received: via spool by 10103-submit@debbugs.gnu.org id=B10103.13235257872476 (code B ref 10103); Sat, 10 Dec 2011 14:04:01 +0000 Original-Received: (at 10103) by debbugs.gnu.org; 10 Dec 2011 14:03:07 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RZNW7-0000dt-5z for submit@debbugs.gnu.org; Sat, 10 Dec 2011 09:03:07 -0500 Original-Received: from mailout.melmac.se ([62.20.26.67]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RZNW4-0000de-Hk for 10103@debbugs.gnu.org; Sat, 10 Dec 2011 09:03:05 -0500 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id EB15D9727 for <10103@debbugs.gnu.org>; Sat, 10 Dec 2011 15:02:00 +0100 (CET) Original-Received: (qmail 359 invoked by uid 89); 10 Dec 2011 14:01:34 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 10 Dec 2011 14:01:34 -0000 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 791217FA058; Sat, 10 Dec 2011 15:02:00 +0100 (CET) In-Reply-To: <7iobvndf3c.fsf@mack.tetzco.de> X-Mailer: Apple Mail (2.1251.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 10 Dec 2011 09:04:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:54867 Archived-At: Hello. 5 dec 2011 kl. 01:41 skrev Kai Tetzlaff: > Hi, >=20 > Jan Dj=E4rv writes: >> 22 nov 2011 kl. 07:51 skrev Kai Tetzlaff: >>> Since about 3 weeks, the nextstep port started to ignore frame = geometry >>> parameters (i.e. Top, Left, Height, Width) from >>> ~/Library/Preferences/org.gnu.Emacs.plist (while some other = parameters >>> like ToolBar and Background still seem to be working). >>>=20 >>=20 >> That was a cleanup that removed too much. Now restored. > Nice, thank you! >=20 > When i first started Emacs after the fix, i got an immediate crash. > After some debugging, i found that i had accidentally changed the type > of the Height property from String to Integer. While trying to > understand what is happening i found that the following patch allows = to > use either Integer or String type values in the plist file: >=20 > =3D=3D=3D modified file 'src/nsfns.m' > --- src/nsfns.m 2011-12-04 13:25:16 +0000 > +++ src/nsfns.m 2011-12-05 00:07:20 +0000 > @@ -2217,7 +2217,7 @@ > /* --quick was passed, so this is a no-op. */ > return NULL; >=20 > - res =3D [[[NSUserDefaults standardUserDefaults] objectForKey: > + res =3D [[[NSUserDefaults standardUserDefaults] stringForKey: > [NSString stringWithUTF8String: toCheck]] UTF8String]; > return !res ? NULL : > (!strncasecmp (res, "YES", 3) ? "true" : >=20 >=20 > Would it make sense to change objectForKey to stringForKey (in this = and > some other places) when trying to retrieve a string type property from = a > plist file? It does not work that way for me. The documentation says that = stringForKey returns: "The string associated with the specified key, or nil if the default = does not exist or does not contain a string." and indeed, I get nil if I put in an integer for height, which makes = UTF8String throw an exception. This is the same behaviour as with = objectForKey. I tested on OSX 10.7, it may be different on other = versions. It does make sense to avoid crashing on bad user input, so I fixed it in = another way. Jan D. =20