[OS X TeX] Damaged KeyEquivalents.plist

Rick Zaccone zaccone at bucknell.edu
Sun Dec 31 16:26:44 CET 2006


I just received my copy of DiskWarrior 4.0, and I asked it to verify  
plist files.  (This is a new DiskWarrior feature.)  It found a few  
errors in a few plist files for programs that I'm not using, but it  
also found a problem with TeXShop's KeyEquivalents.plist.  If you  
don't have DiskWarrior 4.0, you can see the problem by executing

plutil ~/Library/TeXShop/Menus/KeyEquivalents.plist

The Property List Editor refuses to open the file also.  I don't know  
if this has any effect on TeXShop's behavior.  It must look at this  
file so I wanted to make sure it was a valid plist file.  Here is the  
error that DiskWarrior gave me:

File: "KeyEquivalents.plist"
Detected that Property List data is damaged and cannot be repaired.
XML parser error:
Old-style plist parser error:
Malformed data byte group at line 1; invalid hex
Location: "Macintosh HD/Users/zaccone/Library/TeXShop/Menus/"

There are a couple of problems with the file.  One is that there are  
nested comments which make plutil unhappy.  The other problem is that  
<dict>, </dict> and </plist> appear inside of comments and plutil  
wants to see them.

To fix the problem I made the first six lines of the file look like  
this.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// 
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

I kept all of the commented material that follows, but I removed all  
nested comments.  Now plutil is happy.

I did my editing in emacs.  The syntax coloring makes the nested  
comments easy to spot.

Does this seem like a reasonable fix?  Would it have been better to  
just remove the file?  Ignore the error?

Rick


------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list