News for hackers. Stuff that matters.
Re:We need to document macOS by someone7x on Sunday August 13, 2017 @12:31PM (#15003542)
I'm not GP, but I recently sank time into trying to change Finder searches to default to the current directory instead of my entire machine. It mildly infuriates me that I can't change this; I gave up after I saw com.apple.finder.plist is not plaintext.
Re:We need to document macOS by comex on Sunday August 13, 2017 @01:15PM (#15003790)
Plist files have two standard encodings, an XML-based textual one and a binary one. You can use plutil to convert between the two, e.g.

    plutil -convert xml1 com.apple.Finder.plist
However, for preferences you probably want to use the `defaults` command instead, because IIRC they’re managed by a daemon (cfprefsd) that might not notice if you modify the backing files while it’s running.
Re:We need to document macOS by concede_pluto on Sunday August 13, 2017 @01:44PM (#15003944)
When someone decides a config file needs two different serializations and a daemon, I'm reminded of https://www.jwz.org/doc/mailsum.html.
Re:We need to document macOS by comex on Sunday August 13, 2017 @02:19PM (#15004131)
The two different encodings aren't just for config files; property lists are used throughout the OS for all sorts of things. They're a serialization of standard data structures such as arrays and dictionaries: same idea as JSON, decades before JSON. In retrospect, the XML-based text format is excessively verbose, but back then XML was all the hotness… As for the binary format, well, even given JSON's relative succinctness, there are many different formats that attempt to fill the role of 'binary JSON' (BSON, BJSON, JSON-B, MessagePack, CBOR, UBJSON, Fleece, PSON). It's just that none of them have become ubiquitous, probably because of some combination of fragmentation and the lack of built-in browser support.

As for the daemon, among other benefits, it allows preference changes to be immediately visible across all processes on the system, rather than requiring manual action to reload from disk. See:

https://developer.apple.com/library/content/releasenotes/Dat...

Re:We need to document macOS by kitsunesoba on Sunday August 13, 2017 @01:15PM (#15003793)
Default search scope is an option in the Finder's preferences window and has been ever since 10.7...