typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

File renamed to *.md on save

Open Feuermurmel opened this issue 7 months ago • 6 comments

I'm editing some .mdx files, which are Markdown files with some extensions to allow embedded JSX components. I'm only intending to edit the text body of the Markdown files, so Typora should be fine for it.

The problem is that whenever I save the current file, it's .mdx extension get's changed to *.md. See the attached a screen recording for a demonstration. At 0:22, I save the document using command-S, resulting in the file being renamed (which can be seen in the Finder window next to it).

Is there a way to disable this behavior? It prevents me from using Typora for my current task because I would have to rename the files back after every save before I can preview the result in my Browser.

I'm using Typora 1.10.10 on macOS 14.7.5.

https://github.com/user-attachments/assets/1a0f7a1a-7637-4862-bd39-40e63b47c79e

Feuermurmel avatar Apr 30 '25 16:04 Feuermurmel

I have the exact same problem. Typora seems really great, and I would convert to paid user except for this confusing automatic rename behavior. There are many cases where a user wants to edit markdown, but does not want their file renamed. Especially without any type of warning to the user before renaming, or the ability to prevent the editor from renaming files constantly.

2 use cases I've already run into during demo:

  • Trying to edit an existing markdown file in version control, whose filename does not exactly match the required *.md pattern (or whatever else is in the user's Typora Default File Type / Extension setting). Every time I want to edit, it changes the names of tracked files without any warning, as seen above. I have to remember this problematic behavior, and rename it back to the correct filename before commiting the change back into version control.
  • I also tried setting Typora as my env $EDITOR for certain tasks, to edit a temporary markdown file that is passed to it by a unix tool. It did not work for this task either, because it renames the temporary file upon saving, and then the calling program cannot locate the file it explicitly passed in, breaking whatever the user was trying to accomplish.

Even if Typora is opened with an explicit new filename, e.g. "Typora testfile", it shows the user a misleading message - "File does not exist: File does not exist at path /path/to/testfile, do you want to create one at that path ?". Then if you click Create File, it does create an empty file there, however the first time the file is saved, the file gets renamed. So this message seems misleading as it never actually saves to where the user asked and then confirmed.

tl;dr Typora is great! To make it usable for more tasks, there should be a simple way to turn off file renaming completely, or this pushy rename behavior should be reconsidered. Thanks!

Typora 1.10.10 on macOS 15.5

drassi avatar May 22 '25 03:05 drassi

This is indeed annoying...

flashtheman avatar Jun 02 '25 17:06 flashtheman

Settings -> Files -> Default File Type / Extension -> Custom(choose this) -> Custom Extension: mdx

set [Custom Extension] to mdx then typora will not change you extension after save file, no matter whtat file format you are editing

echosprint avatar Aug 11 '25 03:08 echosprint

set [Custom Extension] to txt, typora will automatically rename to txt extention. it seems a bug when you set mdx make the rename operation failed, so it keep your extension, it is not a fix , just a workaround

echosprint avatar Aug 11 '25 03:08 echosprint

Paid user, professional product owner and project manager here:

None of these are real solutions!

I think that there needs to be the following sequence of realisations:

  1. Markdown has a lot of adjacent formats, which are either subsets, dialects or have significant overlap with markdown (looking at geminitext)
  2. Typora is the cutest "zen-mode" Markdown editor.
  3. Not everyone at their work or hobby workshop uses strictly Markdown
  4. People use mac os and use Finder on mac os to open files
  5. Typora SHOULD respec the way it handles extensions in the following way:
  • [ ] Allow to be associated with a range of file extensions
  • [ ] When the file extension falls into said range during save, it MUST NOT rename the file, but keep the extension the same

These two changes will make Typora users 20% happier, I kid you not.

cognivore avatar Nov 10 '25 10:11 cognivore

Seriously... the Typora owner should read and heed this sage advice.

Also Typora app should not change the extension to .markdown when .md is set as default in the Prefs/Settings.

neuromachina avatar Nov 21 '25 07:11 neuromachina