CotEditor icon indicating copy to clipboard operation
CotEditor copied to clipboard

Imported UTI public.markdown should be declared as net.daringfireball.markdown

Open nickasd opened this issue 7 months ago • 5 comments

Description

A user of my app reported to me that it recently stopped displaying Markdown documents correctly. After investigating, I noticed that CotEditor assigns the .md extension to the public.markdown UTI. My app and other apps, including Apple's Xcode, assign .md to net.daringfireball.markdown.

When opening a .md file in Xcode while having CotEditor installed, Xcode doesn't show the default Markdown formatting but shows the Markdown document as plain text.

Image

After uninstalling CotEditor, the Markdown document is displayed correctly again.

Image

To Reproduce

  1. Install Xcode and CotEditor.
  2. Open the sample Markdown file in Xcode: markdown.md

Expected behavior

It should display Markdown formatting.

CotEditor version

7.0.0

macOS version

26.4.1

Additional context

No response

nickasd avatar Apr 23 '26 16:04 nickasd

@nickasd Thanks for filing the issue. It finally helped me understand what was going on.

I’d recently received similar reports from other users as well, and after trying a few things on my end, switching the Markdown UTI from net.daringfireball.markdown to public.markdown seemed to make the problem go away. That led me to suspect that macOS itself might have changed the Markdown UTI.

But it turns out another application was interfering instead. In my environment, for example, Panic’s Nova assigns public.markdown to Markdown in its Info.plist.

As you pointed out, I agree that net.daringfireball.markdown is the correct identifier for Markdown, so I’ll switch back to net.daringfireball.markdown in 7.0.1, which I’m planning to release this weekend.

Sorry for the trouble this caused.

1024jp avatar Apr 24 '26 02:04 1024jp

Just FYI, I am the user and I did not use Nova. But a lot of other Editors, so maybe one of them did that.

boston-black avatar Apr 24 '26 09:04 boston-black

Thanks for your prompt response. I was only aware of this issue because I was contacted myself some years ago by someone whose app stopped working correctly when one of mine was installed. I think an app shouldn't be able to interfere in how other apps work, and when I contacted Apple about this, they replied that they're aware of it and that it used to be even worse in the past, but still there doesn't seem to be a fix in macOS today.

What makes the issue even more frustrating is that there doesn't seem to be an easy way to find out what app declares a specific UTI or "claims" a file extension. I was able to find CotEditor by letting the user run this Terminal command:

grep -r --include Info.plist 'public.markdown' /Applications

nickasd avatar Apr 24 '26 10:04 nickasd

Thank you guys for the follow-up.

I wasn’t trying to pin the blame on Nova here. As @nickasd said, the tricky part on macOS is that one app’s configuration can affect other apps as well. Document type resolution on macOS has a lot of historical baggage, and together with AppKit’s NSDocument it has ended up as a very complex system. If Apple is aware of the issue, all we can really do is hope it improves over time (though I don’t expect that to happen quickly…).

1024jp avatar Apr 24 '26 13:04 1024jp

Thank you for your efforts! <3

boston-black avatar Apr 24 '26 15:04 boston-black