1

While recent .txt and .rtf documents show up in Finder's Favorites "recents", my .py plain text documents (Python scripts) never do, and that's by far the most common file type I need to search for.

I checked Searchlight and all 20 file types are selected (including Documents).

Question: Is there some way I can get recently edited, or perhaps even recently opened or accessed .py text documents to show up in recents?

notes:

  1. All the files are in subfolders of Documents in my laptop's hard drive.
  2. If I create a document with TextEdit and save it with the .py extension it shows up in Recents. However if I create it with the IDLE or Sublime Text IDEs (fancy text editors) it does not. When I click to open them, IDLE is the application that starts.
  3. I want to use Finder rather than the recents of the IDE I use to edit the files because I am often looking for something else that's old, like an input file the script uses. So the recently edited .py document is often (but not always) my way of locating the specific folder.
  4. I have lots and lots of small projects = lots of folders.
  5. I have created a Smart Folder and set it for Text files, but it fills mostly with .xml documents that the system generates.

macOS 10.15.7

No solutions here:

8
  • 1
    Where are these files located?
    – Tetsujin
    Jul 21, 2021 at 15:26
  • @Tetsujin Good point; they are in many subfolders of Documents in my laptop's hard drive. I'll add that to my post
    – uhoh
    Jul 21, 2021 at 15:27
  • 1
    OK, thanks. I was just wondering if they were somewhere in "the system folders" as Spotlight will not search 'system' or 'invisible' files.
    – Tetsujin
    Jul 21, 2021 at 15:30
  • 1
    I'm running macOS Catalina 10.15.7 and my .py files show in Recents In Finder. That said, what application is registered to open them? Is the executable bit set on them? FWIW Xcode is the application registered to open .py files on my system. Jul 21, 2021 at 15:34
  • @user3439894 I think you have found something important, see #2 in my notes; it definitely depends on the application that creates it, not the extension. I don't know how to do or even check the things you've mentioned, but I'll start looking into it. Thanks!
    – uhoh
    Jul 21, 2021 at 15:37

1 Answer 1

1

I think this may go back to this issue, about what Spotlight considers to be a 'Document'.

What does Spotlight consider to be a 'Document'?

In short: Spotlight may not consider .py files to be 'text documents' for its purposes, (and the default application for those files may be a factor), and you may need to build your own Smart Search Folder that includes the file types you want.

(You could exclude xml files, or limit the filepath, as well as the 'recent' time limit.)

1
  • Interesting! So perhaps I can try playing around with the default application, and if there is no quick fix that is palatable then go with the Smart Search Folder, where "Text" files do include my .py files (and unfortunately .xml as well).
    – uhoh
    Jul 21, 2021 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .