-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setting to create new files with markdown file extension (.md) #24
Comments
Should we introduce a setting for this? I think defaulting it to |
I vote definitely for a setting for this. |
Another idea:
|
Sooo first off, @icewind1991’s Markdown editor should simply also recognize txt files. ;) About the rest I need to think more, but .md should not be a default for sure. It’s only used and known by a tiny percentage of people. |
So, I really would like to have the setting. Otherwise I will have to write a service that checks the Notes folder and replaces the extension. And I am curios: Would users that don't know about |
The problem with a setting is (as I also told @Henni) that it can’t be a global setting really. Because sometimes you might write markdown, sometimes just text. Isn’t there a way we can detect as soon as markdown is used and rename? I mean, the title can also change at any point. And Markdown can be detected by |
Auto detection will not work always correctly, so there would be still the need for a manual setting. I still think that a global setting would be fine (it would be definitely better than auto detection without manual correction per note), since people who are familiar with markdown and activate Btw., do you would deactivate markdown parsing/preview if the file type is not |
I guess I’m fine with a setting if you really really think there’s no automatic way to handle this @nextcloud/notes. Of course the default should be .txt (like now)
@korelstar when you use Markdown syntax then it should be properly rendered regardless of the file extension. That’s the whole point of the seamlessness of it. ;) Especially if we introduce that setting with txt by default. |
@jancborchardt Why do you think this cannot be a global setting? If someone just writes text in a Markdown document this would work as well, or am I wrong? |
@claell yes, it works when writing text in a Markdown document, but not the other way around. If you for some reason decide to set the default to txt then typing markdown would not render it. And that behavior makes little sense, especially as txt is the better default. |
@jancborchardt As far as I understand answers to this, .txt is default to not irritate inexperienced users. And in this app rendering also works when writing Markdown in a txt, this is how it is currently done. If there are experienced users who understand what markdown is, they can set the extension to .md, This only changes the extension, not the behaviour of the app. |
@claell ok, but this requires that all third-party apps interacting with the Nextcloud Notes app (like the Android one by @stefan-niedermann and the iOS one by @phedlund) can also handle .md files. :) |
@jancborchardt the apps never see the extension. |
Ok, in that case nevermind. :) |
To be honest I don't see why the default should stay The extension is merely interesting for experienced users who fiddle around with the files directly. And in that case, |
Hmm. I think I would be fine with any solution. Let the maintainer decide ... |
I too would love the .md extension, both for my OCD and ease of use ;) |
|
I think the supporters of this issue made their point. I can fully support @mejo-'s comment here. Can someone from @nextcloud/notes respond to that, so we can either start on developing a setting or just change the extension... |
please for .md , use .md extension |
@Henni @LukasReschke @jancborchardt
Please commit to a common opinion, "the community" wants to implement something! |
I vote for: use txt as default, recognising other text files - but does that need to be by suffix? My computer will try to open files as text, e.g. with less, and warns before proceeding if it recognises them as binary files; maybe there is a simple test to use to check if a file is text or not. Let people choose (free text entry) a default suffix. |
if it is md, use md extension. you will soon have md editor |
Nothing against your post, but:
You expect a simple switch between "Plaintext (.txt)" and "Markdown (.md)" will "mess up the GUI"? Okay, back to the topic:
Maybe some custom setups. As I already wrote, the current implementation will preserve the file ending. Why not just let it be that way? I'm all for giving users the choice and not breaking the current behaviour. Auto-migration would break the current behaviour and might confuse people.
Technically, *.md and *.txt files are both just plaintext. There shouldn't be any issue on any operating system to open both file types. But: *.txt files often gets opened with the default editor, while *.md files sometimes require the user to choose an application. That's a little bit unconvenient, but I'm sure most people are able to select "Open with $default_editor". |
That's a well defined upgrade path. Why not do it exactly as @c33s suggested? |
I consider everything not needed in GUI as mess, so yes that is what I think, although the impact is very low. But consider a new user installing the notes app and checking the settings to make sure everything is as he wants it to be. Now he has an additional setting to consider that might not be needed to consider. Of course it is not much impact, but a bit, especially, if it is not needed by anyone.
Ok, so nothing concrete, just a feeling you have? Still might be true that something is broken by that.
Well, having both, .md and old .txt files sounds even more confusing to me. Adding some message however might help with both types of possible confusion. Also please remember that also the change to .md as default will break the current behaviour. Edit: Just saw that I replied to @c33s there. So if any OS can open .md files there is no need to "add a link to info about markdown and how to get a markdown editor on each platform (ideally a opensource one)"
Ok, so if there is not a problem with some OS, then I don't really understand why having an option to change the extension to .txt will make things more convenient than selecting open with default editor. (However there is a case where it is a bit easier when having multiple devices where one has to select the editor). But to me that cannot count as an argument.
Well I already mentioned one flaw in the steps (last part of step 2 is not really needed). Also step 4 needs some discussion (having both old .txt and new .md files parallel or migrating everything to .md). |
currently there is only a hardcoded value, no per user option no global option. the config value is a quick win. some stupid php constant which everybody can change as long as the constant is defined in a specific config file. my input for a quick win is a config value. not a over 1 year discussion with no result, my suggestion can be implemented in no time as config value (no gui to design, no functional testing) only add config value, document it and add a unit test for it. done. in another iteration, when the devs have time, or somebody want to create a bigger PR for the feature of setting the config per user, this small change of a global constant can easily be refactored (10min to remove the global constant, the small section in the docs, remove of the unit test. done.)
this are not feelings, when you use a software and is ships for example, google changed the handling of now you can say, well txt -> md is no big deal, its quickly fixed or changed in the script but things sum up. many of this small tasks can eat up your worktime. you want to use a product/software to help you build up your product or software. you want to invest the time in new features of your app, not in repairing things which work one patch version before. you want to have lts support so you can choose software and rely on it.
as this discussion is half about beeing not able to open md file on all systems...
everybody means every admin. so no gui.
this steps can be adapted. it is a suggestion. it is really not complicated. the config has also the option to allow the admin decide if it should be in general i don't really care if there is an option for configuring the extension, as soon as notes uses |
I guess nobody will stop you from creating such PR, but I don't know whether you are willing to do one. I also support having some quick fix. The question is, who will do it?
Ok, first: The notes are currently stored in a folder called "Notes". So there is probably no such script, but I get your point. You don't want to break things for users relying on the software. I understand it, and if someone has the time to do it then I agree with going the slow way. But I rather think there will be some trade-off.
Yes and until now there has not been an example of a system which cannot handle them, only some wild statements without any proof/example (although Android or iOS might be problematic).
This might also break behaviour for some users who have set up scripts without the admin knowing about it. So it is not only about the admin. And don't forget about self-hosted installations. These "admins" will probably not want to change some config values somewhere just to get their wanted behaviour, nor will many of them keep track of release notes thought for admins. But just to let you know: Afaik currently the Notes app does not offer GUI settings at all. So introducing one (I still question whether it is needed) will need additional thinking.
They only take some time. If someone (the devs for example) has the time to do it, I say do it. But I don't know their current behaviour/workflow with changes like this, so I want to leave it to them/the one implementing it.
As said before: They don't have to teach their users how to use a Markdown editor, because no Markdown editor will be needed to edit .md files. This also means they won't need to install such an editor for all users and I also wrote that before. I really would like to do this discussion fact based, I don't know why you come up with that same argument again. |
I've implemented the requested setting in #223. Please test and give feedback! |
Hi, Korelstar. I've just installed the Notes app on my Android phone and do not see the setting to create new files as |
@thumos333 this repository is only about the server app. The repository for the Android app is here: https://github.com/stefan-niedermann/nextcloud-notes/issues Currently the settings can only be changed in the Web UI (at the bottom left), but the next release of th Notes server app will ship an extended API which will allow client apps to change the settings. |
That's awesome. Many thanks for the reply. This would be a much needed function. I am glad I've started using NC Notes now when it is about to arrive. |
Glad to hear that! I am curious why changing this setting is a much needed function in the Android app for you? How often and why do you switch between Keep in mind that you already can change this setting today in the Web UI (which also will be applied to new notes which you create via the Android app). |
I work with dozens of notes and make many edits to them every day. Some are 300 kb long, or so. I was very glad to discover that NC Notes can edit notes as I never edit on the web but only on my PC and Android. On the PC, I use the Markdown format and Sublime Text as the editor, hence all files are saved as |
Again: If you toggle the setting the Web UI of the Notes app (this is already possible since a long time in the bottom left section of the Notes browser app), all further Notes, including the ones you create with the Android app will be stored as |
Ach so! Many thanks for letting me know! |
I don't know, if this was discussed before, but new files are created with the .txt extension. If you want to edit the files directly in the
Notes
folder with another editor (e.g. icewind1991/files_markdown or on Desktop), the file format is not recognized.The text was updated successfully, but these errors were encountered: