Jump to content
rogierl

Add specific file type (in this case: markdown)

Recommended Posts

I have tried a lot, but for some reason I cannot use Alfred to search for markdown files on ONE OF MY computers. So on my Macbook, everything works find, but on my iMac Alfred does not find .md files (I also tried .markdown extension).

 

Can someone please point me in the right directory?

  • Settings are the same on both Macs
  • Spotlight settings are the same on both macs
  • Have trie rebuilding index, also deleting .spotlight.v100 directory
  • Still no results found on my iMac while searching for a file with markdown extension
  • However, when I try to find the files with the Alfred "find" feature, everything works fine.

Help!

Share this post


Link to post

Help!

 

 

Try dragging an markdown file into Alfred's Features > Default Results > Advanced section for custom file types.

 

It's also worth noting that Alfred works best if you have the default search only finding the types you absolutely want, then put Alfred into the file search mode specifically by prefixing your search with [spacebar]. This keeps everything fast and efficient.

 

Cheers,

Andrew

Share this post


Link to post

Thanks; I already did that. Please see attached screenshot. I also ran the Alfred Metadata tool, and the outcome of a file with extension .md is:

 

Internal File Metadata
======================


 Display Name: Clean install OSX.md
    Alt Names: 
    File Type: dyn.ah62d4rv4ge8043a
     Comments: 
     Keywords: 
    Last Used: 


Raw mdls File Metadata
======================


_kMDItemOwnerUserID            = 501
kMDItemContentCreationDate     = 2016-06-30 19:49:29 +0000
kMDItemContentModificationDate = 2016-06-30 19:49:29 +0000
kMDItemContentType             = "dyn.ah62d4rv4ge8043a"
kMDItemContentTypeTree         = (
    "dyn.ah62d4rv4ge8043a",
    "public.data",
    "public.item"
)
kMDItemDateAdded               = 2016-06-30 19:49:34 +0000
kMDItemDisplayName             = "Clean install OSX.md"
kMDItemFSContentChangeDate     = 2016-06-30 19:49:29 +0000
kMDItemFSCreationDate          = 2016-06-30 19:49:29 +0000
kMDItemFSCreatorCode           = ""
kMDItemFSFinderFlags           = 0
kMDItemFSHasCustomIcon         = (null)
kMDItemFSInvisible             = 0
kMDItemFSIsExtensionHidden     = 0
kMDItemFSIsStationery          = (null)
kMDItemFSLabel                 = 0
kMDItemFSName                  = "Clean install OSX.md"
kMDItemFSNodeCount             = (null)
kMDItemFSOwnerGroupID          = 20
kMDItemFSOwnerUserID           = 501
kMDItemFSSize                  = 906
kMDItemFSTypeCode              = ""
kMDItemKind                    = "Visual Studio Code document"
kMDItemLogicalSize             = 906
kMDItemPhysicalSize            = 4096

 

 

So what could be wrong? Indexes have already been re-build.

 

Alfred-markdown-problems-01.png

Share this post


Link to post

There i an odd mismatch going on there, the file has type "dyn.ah62d4rv4ge8043a" which is essentially an arbitrarily created type by OS X when the file type is unknown... I'm not entirely sure why the file has this file type when it should have net.daringfileball.markdown, it could be corruption in OS X's metadata index.

 

if you manually add this type to the file types, then they should be found though :)

 

Cheers,

Andrew

Share this post


Link to post

There i an odd mismatch going on there, the file has type "dyn.ah62d4rv4ge8043a" which is essentially an arbitrarily created type by OS X when the file type is unknown... I'm not entirely sure why the file has this file type when it should have net.daringfileball.markdown, it could be corruption in OS X's metadata index.

 

if you manually add this type to the file types, then they should be found though :)

 

Cheers,

Andrew

Thanks for the info; what's the best way to create a new (empty) file on OSX?

Share this post


Link to post

I just had this problem with Spotlight not finding (& Quicklook not displaying) my old WordPerfect files -- when I ran the terminal command to manually import a file

 

/usr/bin/mdimport -d1 filename

 

it was showing dyn.ah62d4rv4ge81s6de as the file type

 

I rebuilt Launch Services (I used MainMenu.app to do this but there's a terminal command to do the same) & after that the type shows as 'com.corel.wordperfect.doc' and Spotlight & Quicklook are back to working.

 

So maybe rebuilding Launch Services will restore the correct net.daringfireball.markdown file type.

Share this post


Link to post

I just had this problem with Spotlight not finding (& Quicklook not displaying) my old WordPerfect files -- when I ran the terminal command to manually import a file

 

/usr/bin/mdimport -d1 filename

 

it was showing dyn.ah62d4rv4ge81s6de as the file type

 

I rebuilt Launch Services (I used MainMenu.app to do this but there's a terminal command to do the same) & after that the type shows as 'com.corel.wordperfect.doc' and Spotlight & Quicklook are back to working.

 

So maybe rebuilding Launch Services will restore the correct net.daringfireball.markdown file type.

This fixed it! So I did:

 

  1. Removed entry from user defined file types in Alfred
  2. Rebuild launch services with command below
  3. Add a markdown file (with extension .md)

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user

 

Thanks!!!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...