File extensions overwritten by default
-
I just updated to v7.9.5 and am getting this new issue:
- Open new document
- Type whatever in the doc
- Save
- Dialogue window populates with default file name = “new 1.txt” and save as type = “Normal text file (*.txt)”
- Full file name is automatically highlighted
- I type a new file name (e.g. “hello_world”) and hit save
- File is saved as hello_world without a file extension
Prior to this update, the file would have automatically saved as hello_world.txt. I think maybe when it automatically highlighted the default file name it only highlighted the name before the extension (i.e. “new 1”) so typing something new wouldn’t overwrite the extension unless I specified. But I could be wrong - it may have instead added the .txt afterwards, I’m not sure. Definitely it didn’t behave as I describe above.
I know this is a minor issue, but it’s very annoying. I’ve found some discussions from a couple years ago describing similar issues, but the proposed solutions involved options within Preferences that I don’t have, and I’m not even sure the issues they described were the same as what I’m saying.
-
When I follow your bulleted list of steps with a fresh copy of Notepad++ 7.9.5, I obtain
hello_world.txt
, nothello_world
. I know that isn’t much help, but it can serve to show you that at least one person is obtaining your desired result. :-) -
@Sam-Waters said in File extensions overwritten by default:
I’ve found some discussions from a couple years ago describing similar issues, but the proposed solutions involved options within Preferences that I don’t have, and I’m not even sure the issues they described were the same as what I’m saying.
… and since you don’t link us to that discussion, or even describe which preferences they suggested that you cannot find, we can’t help you figure out what has changed in the meantime.
For now (*), all the v7.9.5 preferences are described in the online user manual at https://npp-user-manual.org/docs/preferences/ , and most of the ones that have been renamed or moved can still be found by searching that page for some or all of the old text (it often refers back to the old name and/or old location, or the name has changed slightly, but still has the most important words like “extension” “save dialog”).
(*: “For now”, because soon after v8.0 is released, the online version of the npp-user-manual.org will be updated with v8.0-specific information; though once again, most things that have been changed will be indicated as such and you can still find it using the old name.)
-
@PeterJones thanks for that link, sounds like the relevant option is “Set Save dialog file extension filter… for Normal Text” in MISC. However I have tested with this option both checked and unchecked, and get the same results either way.
Here is the past discussion I found:
https://community.notepad-plus-plus.org/topic/18029/notepad-7-7-1-won-t-default-to-txt-when-savingThe most relevant sounding suggestions involved Settings -> Preferences -> Default Directory -> Use new style dialog, I do not see that option in the Default Directory window.
-
Can you provide your Debug Info, found on the
?
menu in Notepad++ ?Here is the past discussion I found
That is going to be too old to be relevant.
-
So, in 8.0 (RC2 as of this writing) here’s what happens for me on Windows 10 (if that matters):
- Press Ctrl+n to create new file;
new1
tab appears - Press Ctrl+Alt+s to SaveAs; the following appears at the bottom of the Save As dialog:
I press
z
to give it some sort of name:I click on the Save button and I get this in my tab bar:
I was REALLY expecting
z.txt
because the Append extension checkbox was ticked… Am I “out of line” in expecting this? - Press Ctrl+n to create new file;
-
I agree with your interpretation. Bring it up in the RC2 announcement thread, because that one needs Don’s attention.
-
@Sam-Waters said in File extensions overwritten by default:
sounds like the relevant option is “Set Save dialog file extension filter… for Normal Text” in MISC. However I have tested with this option both checked and unchecked, and get the same results either way.
Can you explain your exact procedure (and as @Alan-Kilborn requested, provide your ?-menu’s Debug Info?
Because with
Notepad++ v7.9.5 (64-bit) Build time : Mar 21 2021 - 02:13:17 Path : C:\usr\local\apps\notepad++\notepad++.exe Admin mode : OFF Local Conf mode : ON OS Name : Windows 10 Enterprise (64-bit) OS Version : 1903 OS Build : 18362.1256 Current ANSI codepage : 1252 Plugins : ComparePlugin.dll ExtSettings.dll HexEditor.dll LuaScript.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConsole.dll NppConverter.dll NppEditorConfig.dll NppExec.dll NppExport.dll NppFTP.dll NppUISpy.dll PreviewHTML.dll PythonScript.dll QuickText.dll TagLEET.dll XMLTools.dll
- Toggle Preferences > MISC > ☐ Set Save dialog file extension filter to *.* off (unchecked ☐)
- File > New, then File > Save As: the Save As Type defaults to “Normal text file (*.txt)” and if I type the filename of
a
, it saves the file asa.txt
- Toggle Preferences > MISC > ☑ Set Save dialog file extension filter to *.* on (checked ☑)
- File > New, then File > Save As: the Save As Type defaults to “All types (*.*)” and if I type the filename of
a
, it saves the file asa
Here is the past discussion I found:
https://community.notepad-plus-plus.org/topic/18029/notepad-7-7-1-won-t-default-to-txt-when-savingThe most relevant sounding suggestions involved Settings -> Preferences -> Default Directory -> Use new style dialog, I do not see that option in the Default Directory window.
You’ll notice that was in a discussion of v7.7.1, whereas you said you were using v7.9.5 (or, as Alan said, “too old to be relevant”). Following my advice from my last post, by opening https://npp-user-manual.org/docs/preferences/ and searching for “new style”, you will see that the behavior changed in v7.8.7 and v7.9.1 (though re-reading, I see that there could be more clarity there to make it more obvious that the “new style” setting is completely gone; I’ll have to see if it still needs further clarification next documentation release, to remove the ambiguity, or if it’s already fixed).
-
Here is the fix: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/9945
I hope it will be in N++8 RC4