macOS prevents opening text files with URLs if they lack a .txt extension

Macos won't let me open a text file with urls


I'm running Sequoia 15.7.9 on a 2019 mac pro.


A while back I started work on some fiction, during lockdown I ran a ttrpg set in that world and did a lot of worldbuilding. In the process, I wrote text files that included urls to things like the google docs shared by the folks in the game. Note, I wrote these files on an older mac, which was upgraded a couple of times to the one I have now.


Life got in the way, I dropped the project for a while, I'm going back to work. I went into my notes directory, selected all of the files, tried to open them in emacs. There were two files in particular, one named links, one named links-1. Macos not only refused to edit them, it refused to open emacs with any of the other files either.


Note, I can open them from terminal, but Macos being broken, opening a file in emacs from the terminal does not work well, and I haven't figured out how to open it.


How do I tell Macos that I'm a grown up, and I really do want to open this text file that I wrote myself, even if I put some urls into it?


Does it matter that it is in a Dropbox file?


I was able to open another file foo, and add a url. Once I did that it wouldn't let me exit with ^x^c but did let me hit the red button. Once I saved that I was able to open it in emacs, so I don't know if apple just doesn't like links to it's competitor google docs.


I eventually changed links to links.txt

No other change to the contents of the file, and macos let me open it.

This is pretty braindead, judging the behavior of a file on the suffix, rather than the content.


How do I fix my system so that I can open my own files, no matter what I name them?

Posted on Oct 4, 2026 8:48 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 5, 2026 1:42 AM

Your links experiment gives us the biggest clue. 


You renamed links to links.txt, changed nothing inside the file, and Finder immediately allowed it to open in Emacs. 


That points to the way Finder identifies the file, rather than anything contained in the URLs. There is also no evidence that Google Docs links have anything to do with it.


The fact that you can open the files from Terminal is useful too. It suggests that the files themselves are fine; the problem is more likely to be how Finder decides which application should handle them.


For an individual file, Control-click it in Finder and choose Open With >> Emacs. If Emacs isn't listed, choose Open With >> Other… and select it. Apple describes this here: Choose an app to open a file on Mac


You can also bypass Finder with Terminal: open -a Emacs "/path/to/links"


For files that are plain text, adding .txt is a perfectly reasonable workaround because it explicitly tells Finder what kind of file it is. 


Apple explains filename extensions here: Show or hide filename extensions on Mac


If Finder recognizes a file type, you can make Emacs the default for that type through Get Info >> Open with >> Emacs >> Change All. 


Unfortunately, that is not a general “open every extensionless file as text” setting. macOS does not have a preference that says, in effect, “I created this file, so let me open it regardless of what I called it.”


So, for your existing extensionless text files, Open With >> Emacs, open -a Emacs, or adding .txt are the straightforward choices. 


If you want Finder to automatically recognize your extensionless files as text, we would need to look at how Finder is identifying one of those files before changing anything at the system level.


I would not change any macOS security settings based on this evidence. 


Nothing you have described suggests that the URLs, Google Docs, or the fact that you created the files are being treated as a security problem.

4 replies
Question marked as Top-ranking reply

Oct 5, 2026 1:42 AM in response to Ellarsee

Your links experiment gives us the biggest clue. 


You renamed links to links.txt, changed nothing inside the file, and Finder immediately allowed it to open in Emacs. 


That points to the way Finder identifies the file, rather than anything contained in the URLs. There is also no evidence that Google Docs links have anything to do with it.


The fact that you can open the files from Terminal is useful too. It suggests that the files themselves are fine; the problem is more likely to be how Finder decides which application should handle them.


For an individual file, Control-click it in Finder and choose Open With >> Emacs. If Emacs isn't listed, choose Open With >> Other… and select it. Apple describes this here: Choose an app to open a file on Mac


You can also bypass Finder with Terminal: open -a Emacs "/path/to/links"


For files that are plain text, adding .txt is a perfectly reasonable workaround because it explicitly tells Finder what kind of file it is. 


Apple explains filename extensions here: Show or hide filename extensions on Mac


If Finder recognizes a file type, you can make Emacs the default for that type through Get Info >> Open with >> Emacs >> Change All. 


Unfortunately, that is not a general “open every extensionless file as text” setting. macOS does not have a preference that says, in effect, “I created this file, so let me open it regardless of what I called it.”


So, for your existing extensionless text files, Open With >> Emacs, open -a Emacs, or adding .txt are the straightforward choices. 


If you want Finder to automatically recognize your extensionless files as text, we would need to look at how Finder is identifying one of those files before changing anything at the system level.


I would not change any macOS security settings based on this evidence. 


Nothing you have described suggests that the URLs, Google Docs, or the fact that you created the files are being treated as a security problem.

Oct 5, 2026 5:33 AM in response to Ellarsee

Ellarsee wrote:
I eventually changed links to links.txt
No other change to the contents of the file, and macos let me open it.
This is pretty braindead, judging the behavior of a file on the suffix, rather than the content.

The problem is neither the extension nor the content. It's the software. A data file on disk can't hurt anyone. It's only when it gets loaded into some app that it could perform some kind of malicious act. Different apps have different capabilities. Modern apps are expected to advertise those capabilities. If they don't do that, then the operating system won't automatically allow them to open documents.


That's what you're seeing here. It isn't so much that macOS isn't treating you like an adult. It's that macOS is treating emacs like the a a very old person that doesn't understand the risks of the modern world. Emacs can't draw a clock, so it can't drive or open files. If you are an adult, then you can be a caregiver for Emacs. You can hold Emacs's hand and manually open your documents from within Emacs. But it wouldn't be safe to let any of these kids running macOS today take over Emacs' care. These kids today just don't understand.

Oct 5, 2026 11:07 AM in response to Owl-53

Some amusing irony here. In order to reply to my post about excessive level of security from my web browser at work, I couldn't just log in. I had to log in, do a captcha, get a text to my phone, enter that, log in again, get another text, and I might have even missed a couple of steps.


First of all, in order to tell if something is a text file, there is a simple command called file. For example looking at a couple of lines of output from a terminal on my ubuntu machine at work:

userData:                               directory

user_profile:                           ASCII text


This is a much more robust test than looking at the filename. I could rename the executable exploitme.bin to exploitme.txt and it would not be an ascii text file.


The problem I had after that was trying to open the spreadsheet I made in libre office on my old mac, geog_equiv.xls


Finder won't let me open that either. I obviously cannot change the suffix to another filetype, because libre office relies on the extension to know what sort of spreadsheet it is, and not a word document, or open office document etc.


I obviously can't even look at the file to see what's in it. How do I tell finder to let me open this file, in this app?





macOS prevents opening text files with URLs if they lack a .txt extension

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.