I have some saved searches that were created by a utility. I'm now in the directory ~/Library/Saved Searches.

If I get info on the saved search file, I can see its query.

(kMDItemSupportFileType != 'MDSystemFile') && (kMDItemContentTypeTree = 'public.content') && (kMDItemContentModificationDate > '$time.today(-1w)') && (kMDItemContentModificationDate < '$time.today(+1d)')

The search works fine if I open it to view the results. That is, until I use the Finder toolbar option for performing tasks and select "Show Search Criteria." Then the results disappear and there are no search criteria presented. If I now select "Hide Search Criteria," the results don't come back.

This search wasn't built interactively using the search widgets. If I build a search by hand, then toggling the search criteria display for that hand-built search works as I expect.

On the other hand, a search with a more complicated query developed in code, like the one I quoted above, appears not to be supported for display in the Finder toolbar. That doesn't bug me, but what is frustrating is not knowing why the search results disappear if I did try looking at the search criteria.

Here is something I tried. I did this on a copy of the saved search. Now I have two versions, one untouched that displays the results, and another that does not display the results after trying to view the search criteria. I compared the two files for the searches in a plain text editor (Emacs), and there is no difference between the files! Nothing has been done to the file that won't show the results. The query is still in there.

It made me suspect there is a plist file somewhere that saves the window state. I got kind of lost in the weeds with that. Various plist files seem like candidates, but when I look at them in Xcode, there is no node that seems obvious to me to be the one that could be toggling the results display.

I'm on a MacBook Pro running High Sierra. Any ideas?

You must log in to answer this question.

Browse other questions tagged .