Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Setting modes and working with plists in emacs UNIX
Like many Unix refugee, I prefer emacs as my default editor for text files, programming, and system administration, but also enjoy using the Mac GUI. This code snippet, when added to your ~/.emacs file, does the following:
  • Saves shell scripts and text-mode files, including TeX and troff files or files with no suffix (but excluding html/sgml/xml), with the file-type set to TEXT, so they are automatically indexed by spotlight. If you configure Emacs in the finder as the default application to open one of these files, double-clicking will open them in a GUI version of emacs such as Aqua Emacs or xemacs.
  • Edits plists, including binary plists, in emacs, saving the binary plists as binaries. Saving in binary format is not necessary, but some readers of the forums seemed to think it important.
  • You can add other file types to the save-as-mac-text function with a cond clause, for example, if you write a lot of perl scripts without a .pl or .cgi suffix and want them to automatically open in emacs in perl-mode when double clicked.
The simple-plist-hack function is based on the code in this hint.

[robg adds: I haven't tested this one, and the binary plist handling is also covered in this hint, but this one adds the mode info to the saved files as well.]
  • Currently 2.50 / 5
  You rated: 4 / 5 (2 votes cast)

Setting modes and working with plists in emacs | 1 comments | Create New Account
Click here to return to the 'Setting modes and working with plists in emacs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Setting modes and working with plists in emacs
Authored by: Safar on Jan 15, '06 07:26:57AM

thanks a lot !

[ Reply to This | # ]