* bug#8239: 24.0.50; (Mac OS X) User defaults are not always synchronized when exiting.
@ 2011-03-13 9:03 William Xu
2011-05-28 16:57 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: William Xu @ 2011-03-13 9:03 UTC (permalink / raw)
To: 8239
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
I tried to save frame positions (should/does emacs itself support
this?), using ns-set-resource, and find that the updated data is not
always written to disk. See this:
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html
Here is a one line patch.
--
William
http://xwl.appspot.com
[-- Attachment #2: 0001-ns_term_shutdown-Synchronize-user-defaults.patch --]
[-- Type: application/octet-stream, Size: 746 bytes --]
From df0852602b97da3f0f2fc0f2c0f5129571bc53d4 Mon Sep 17 00:00:00 2001
From: William Xu <william.xwl@gmail.com>
Date: Sat, 12 Mar 2011 22:03:49 +0800
Subject: [PATCH] (ns_term_shutdown): Synchronize user defaults.
---
src/nsterm.m | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 5b5b968..b1e88ad 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3972,6 +3972,8 @@ ns_term_init (Lisp_Object display_name)
void
ns_term_shutdown (int sig)
{
+ [[NSUserDefaults standardUserDefaults] synchronize];
+
/* code not reached in emacs.c after this is called by shut_down_emacs: */
if (STRINGP (Vauto_save_list_file_name))
unlink (SDATA (Vauto_save_list_file_name));
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-28 16:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 9:03 bug#8239: 24.0.50; (Mac OS X) User defaults are not always synchronized when exiting William Xu
2011-05-28 16:57 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.