Spotlight: Search string in Finder and Search field in Preview

Posted by Pierre Igot in: Macintosh
March 3rd, 2011 • 10:53 am

Mac OS X’s Spotlight has a fairly handy feature when your list of search results includes PDF files. If you double-click on a PDF file in the list of search results in the Finder, Mac OS X opens it in Preview as it would open any PDF file, but in addition, Mac OS X automatically includes the search string from the Spotlight query in the “Search” field in the Preview toolbar, and the focus is on that “Search” field by default, so that you just have to press Return to cause Preview to locate the search string in the PDF in question.

(In previous versions of Mac OS X, Preview would do the search automatically as soon as the PDF was open, without waiting for the user to press the Return key. This could be annoying in certain situations, in particular because Preview would also zoom in on the first found occurrence, thereby changing your carefully chosen zoom settings. I prefer the new behaviour.)

This feature has a bug, however. Let’s say that, after opening a PDF from the list of search results, you go back to the Finder window with the search results and change the scope of the search using the buttons underneath the toolbar:

Change the scope

Then, if your refreshed list of search results still includes PDF files and if you double-click on one of the PDF files now to open it in Preview, Mac OS X opens it properly, but this time it fails to automatically include the search string from the Spotlight query in the “Search” field in the Preview toolbar.

This problem has been bugging me for a while, but until today I couldn’t figure out why sometimes Mac OS X failed to include the search string from the Spotlight query in the “Search” field in the Preview toolbar. Today, I was finally able to identify the source of the problem, which is the change of scope in the Finder window with the list of search results.

Needless to say, I’ve submitted a bug report to Apple about this.


Comments are closed.