How to remove 'Developers' category from Spotlight?

Discussion in 'Mac Programming' started by RedTomato, Feb 18, 2015.

  1. RedTomato, Feb 18, 2015
    Last edited: Feb 20, 2015

    RedTomato macrumors 68040

    RedTomato

    Joined:
    Mar 4, 2005
    Location:
    .. London ..
    #1
    Somehow my Spotlight results are cluttered up with Developer stuff.

    There's no option in preferences to remove this category.

    Image is from someone else with the same unsolved problem. This is a fresh install of Yosemite (lightly used by now) so I have no idea how this Developer category got added. How do I get rid of it?

    [​IMG]

    EDIT: Solved. See 5 posts down.

    tl:dr - Insert the SOURCE switch at the top of the Spotlight plist array not at the bottom as every other webpage would have it.
     
  2. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
  3. RedTomato thread starter macrumors 68040

    RedTomato

    Joined:
    Mar 4, 2005
    Location:
    .. London ..
    #3
    Thanks for your suggestion. I tried it, didn't work. Here's the bottom end of my ~/Library/Preferences/com.apple.Spotlight.plist. Am I getting anything wrong?

    Code:
                <dict>
    			<key>enabled</key>
    			<false/>
    			<key>name</key>
    			<string>MENU_WEBSEARCH</string>
    		</dict>
    		<dict>
    			<key>enabled</key>
    			<false/>
    			<key>name</key>
    			<string>SOURCE</string>
    		</dict>
    	</array>
    	<key>showedFTE</key>
    	<true/>
    	<key>showedLearnMore</key>
    	<true/>
    	<key>useCount</key>
    	<integer>3</integer>
    	<key>version</key>
    	<integer>7</integer>
    </dict>
    </plist>
     
  4. swordfish5736 macrumors 68000

    swordfish5736

    Joined:
    Jun 29, 2007
    Location:
    Cesspool
    #4
    It looks correct, Have you tried rebooting?


    Also, you could try going to system preferences -> spotlight and try to add /Developer as an option to not search.

    If that doesn't work, remove the developer option you tried to create and install Xcode from apple. Then see if a developer option has appeared.
     
  5. RedTomato thread starter macrumors 68040

    RedTomato

    Joined:
    Mar 4, 2005
    Location:
    .. London ..
    #5
    Rebooting didn't help.

    I don't have /Developer - I'm not a dev or programmer though I'm comfortable with command line utilities.

    I'd really rather not install Xcode just for this issue.

    EDIT: SOLVED

    I moved the SOURCE section from the bottom to the top of the plist, so it now reads:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    
    <plist version="1.0">
    <dict>
    	<key>GEOUsageSessionID</key>
    	<data>
    	CP/f9o6cysOgOhCl/82Ay7bGmDE=
    	</data>
    	<key>GEOUsageSessionIDGenerationTime</key>
    	<real>441073561.52177799</real>
    	<key>__NSEnableTSMDocumentWindowLevel</key>
    	<true/>
    	<key>orderedItems</key>
    	<array>
    		<dict>
    			<key>enabled</key>
    			<false/>
    			<key>name</key>
    			<string>SOURCE</string>
    		</dict>
    		<dict>
    			<key>enabled</key>
    			<true/>
    			<key>name</key>
    			<string>APPLICATIONS</string>
    		</dict>
                    <dict> .... 
    		
    After a reboot, all the dev Spotlight results vanished. Result!

    It isn't sticky though. Looking at the Spotlight pref pane will reset the plist, so the SOURCE option will have to be manually added again. Good enough for now.

    Here's how I figured it out:

    It struck me that Sysprefs -> Spotlight seemed rather a long list of options. Not Apple's usual style. I wondered if there was perhaps a limit to the number of array options that would be read in from the plist. Means that adding SOURCE at the end would result in it not being read. So I tried adding SOURCE to the top of the array. And it worked.

    Don't know if that's the right reason. Perhaps a programmer could tell us what's going on.
     
  6. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #6
    Honestly, that sounds like a bug. I encourage you to report it via Apple's bug reporter.
    https://bugreport.apple.com/

    You've made a simple test case that easily demonstrates the problem, so you've got everything you need to file a good bug report.

    Confirmation of the bug and fix would be to move SOURCE back to the end and see what happens. Then move it up one slot at a time in the list, and again see what happens. The results could be an addition to the basic bug report and solution.
     

Share This Page