unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kai Tetzlaff <kai.tetzlaff@web.de>
To: 10103@debbugs.gnu.org
Subject: bug#10103: 24.0.91; Emacs/nextstep ignores frame geometry from org.gnu.Emacs.plist
Date: Mon, 05 Dec 2011 01:41:59 +0100	[thread overview]
Message-ID: <7iobvndf3c.fsf@mack.tetzco.de> (raw)
In-Reply-To: <BE2CE45A-47BC-475A-80B4-C8F77C17F8E7@swipnet.se> ("Jan \=\?utf-8\?Q\?Dj\=C3\=A4rv\=22's\?\= message of "Sun, 4 Dec 2011 14:27:01 +0100")

Hi,

Jan Djärv <jan.h.d@swipnet.se> 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).
>> 
>
> That was a cleanup that removed too much.  Now restored.
Nice, thank you!

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:

=== 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;
 
-  res = [[[NSUserDefaults standardUserDefaults] objectForKey:
+  res = [[[NSUserDefaults standardUserDefaults] stringForKey:
             [NSString stringWithUTF8String: toCheck]] UTF8String];
   return !res ? NULL :
       (!strncasecmp (res, "YES", 3) ? "true" :


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?

BR,
Kai





  reply	other threads:[~2011-12-05  0:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  6:51 bug#10103: 24.0.91; Emacs/nextstep ignores frame geometry from org.gnu.Emacs.plist Kai Tetzlaff
2011-12-04 13:27 ` Jan Djärv
2011-12-05  0:41   ` Kai Tetzlaff [this message]
2011-12-10 14:01     ` Jan Djärv
2011-12-11 12:15       ` Kai Tetzlaff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7iobvndf3c.fsf@mack.tetzco.de \
    --to=kai.tetzlaff@web.de \
    --cc=10103@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).