emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Expose more file types to OS X that Emacs understands


From: Ivan Andrus
Subject: [PATCH] Expose more file types to OS X that Emacs understands
Date: Tue, 7 Jul 2015 22:23:28 -0600

I’m wondering of the following patch is okay to install (I have commit rights). 
 Since I haven’t committed much before I wanted to make sure before I go ahead.

All it does is inform OS X that Emacs understands a few more file types namely 
dtx, sty, org and json.  It also tells OS X that org and el files are text (so 
that "quicklook" can display their contents).

Thanks,
Ivan


* Cocoa/Emacs.base/Contents/Info.plist: Add editor role for sty, dtx,
json, and org files.  Export UTIs for el, elc, and org files.
---
 nextstep/templates/Info.plist.in | 88 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/nextstep/templates/Info.plist.in b/nextstep/templates/Info.plist.in
index 8c9dc21..09e953c 100644
--- a/nextstep/templates/Info.plist.in
+++ b/nextstep/templates/Info.plist.in
@@ -452,6 +452,8 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
                                <string>tex</string>
                                <string>ltx</string>
                                <string>ctx</string>
+                               <string>dtx</string>
+                               <string>sty</string>
                                <string>latex</string>
                                <string>texi</string>
                        </array>
@@ -465,6 +467,30 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
                <dict>
                        <key>CFBundleTypeExtensions</key>
                        <array>
+                               <string>org</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Org document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>json</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>JSON document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>*</string>
                        </array>
                        <key>CFBundleTypeName</key>
@@ -478,6 +504,68 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
                </dict>
        </array>
 
+       <!-- Export definitions so that OS X understands about the file types 
-->
+       <key>UTExportedTypeDeclarations</key>
+       <array>
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.source-code</string>
+                       </array>
+                       <key>UTTypeDescription</key>
+                       <string>Emacs Lisp Source File</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.gnu.emacs-lisp</string>
+                       <key>UTTypeReferenceURL</key>
+                       
<string>https://www.gnu.org/software/emacs/manual/html_node/elisp/</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>el</string>
+                               </array>
+                       </dict>
+               </dict>
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.content</string>
+                       </array>
+                       <key>UTTypeDescription</key>
+                       <string>Emacs Lisp Object File</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.gnu.emacs-lisp-object</string>
+                       <key>UTTypeReferenceURL</key>
+                       
<string>https://www.gnu.org/software/emacs/manual/html_node/elisp/</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>elc</string>
+                               </array>
+                       </dict>
+               </dict>
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.plain-text</string>
+                       </array>
+                       <key>UTTypeDescription</key>
+                       <string>Org document</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.orgmode.org</string>
+                       <key>UTTypeReferenceURL</key>
+                       <string>http://orgmode.org</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>org</string>
+                               </array>
+                       </dict>
+               </dict>
+       </array>
+
        <key>NSServices</key>
        <array>
                <dict>
-- 
2.4.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]