== Editing OSX Plist Files ==

To edit OSX binary and xml plist files, use the compressed file framework and the plutil provided with OSX. Emacs provides jka-compr which decompresses a file to stdout for reading, and compresses the data from stdin to write the file back out again.

<pre>
;; Allow editing of binary .plist files.
(add-to-list 'jka-compr-compression-info-list
             ["\\.plist$"
              "converting text XML to binary plist"
              "plutil"
              ("-convert" "binary1" "-o" "-" "-")
              "converting binary plist to text XML"
              "plutil"
              ("-convert" "xml1" "-o" "-" "-")
              nil nil "bplist"])

;;It is necessary to perform an update!
(jka-compr-update)
</pre>

--KevinLynch

== Plist Parser ==

[https://github.com/ferdy/osx-plist osx-plist] is an Emacs lisp parser for MacOSX's plist files.

 (require 'osx-plist)
This file (tagged version 1.0.0 in its source) only parses plist files whose root node is a dict.

If you want to use it to parse plist files whose root node is an array, a quick fix is to replace the defun on line 84:
<pre>
(defun osx-plist-parse-file (file)
  "Parse the plist file FILE into an elisp hash table."
  (let ((xml (car (xml-parse-file file))))
    (when (osx-plist-p xml)
      (osx-plist-node-value (car (xml-get-children xml 'dict))))))
</pre>
with the following
<pre>
(defun osx-plist-parse-file (file)
  "Parse the plist file FILE into an elisp hash table."
  (let ((xml (car (xml-parse-file file))))
    (when (osx-plist-p xml)
      (osx-plist-node-value (car (or (xml-get-children xml 'dict)
				     (xml-get-children xml 'array)))))))
</pre>

== osx-plist 2.0.0 and newer ==

An updated version of the package now lives on Github [https://github.com/gonewest818/osx-plist osx-plist], and can be installed from MELPA or MELPA stable. This version incorporates the fix for "root node is an array" mentioned just above, and also adds support for plists containing types such as integers, reals, dates, and base64 data.  See the Github page for details.
