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.
Should we introduce a setting for this? I think defaulting it to .md might irritate some users which are unable to open it on their system because they have never seen this extension. But I could be overthinking this.
@jancborchardt your opinion on this?
I vote definitely for a setting for this. .md is too nerdy to be the default. :sunglasses:
Another idea:
Instead of adding a setting, I would suggest to do it similar to the Files app, which adds .txt by default to the end of a new file.
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 .md really manually edit their notes with a text editor or would they have another notes app for mobile/desktop?
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 ## (single hash could be used for other things) or [link](url) or **bolding** or more.
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 .md globally are still able to fill the files with text only.
Btw., do you would deactivate markdown parsing/preview if the file type is not .md?
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)
Btw., do you would deactivate markdown parsing/preview if the file type is not .md?
@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.
They use the notes api which returns the file content inside the content attribute.
(see https://github.com/nextcloud/notes/wiki/Notes-0.2)
Ok, in that case nevermind. :)
To be honest I don't see why the default should stay .txt. Inexperienced users will never see the filename extension (be it .txt or .md), right?
The extension is merely interesting for experienced users who fiddle around with the files directly. And in that case, .md is much better. That way, text editors recognize the content as markdown and enable syntax highlighting.
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 ;)
.md is far better than .txt. At least if you install the nextcloud markdown editor app, you have a nice online editor with side preview and syntax highlighting.
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
it is not txt
@Henni @LukasReschke @jancborchardt
We need a maintainer decision, here:
.txt or .md as default suffix for new notes (current is .txt, but files with .md are also recognized and processed in the same way (full list of supported extensions: txt, org, markdown, md, note))?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
I agree with patrikx3. If it's markdown, the default really ought to be markdown (md), not text.
Json is ascii, but you wouldn't propose the default json extension as txt. No different here.
Let's go with .md for our default extension, as it seems this is the preferred solution by the community.
But I'd really like to see a setting to switch this over to .txt, because I think otherwise soon issues will show up which want to work on txt-files (e.g. on mobile). (This is our first setting in this app so we might have to think about how to properly integrate this UI- and backend-wise)
Before we go for .md / Markdown extension by default, can we please make sure that:
@Henni @korelstar @benyanke @mejo- please help testing to make sure all of this works. We need to be sure of it _before_ the change is done to not hinder any existing workflows.
If this helps with confidence: I have made the change on my deployment (hardcoded md instead of txt in the code).
I can confirm that the Nextcloud Notes App for Android will not cause problems. bit "default text editor" on windows is notepad - this might be an issue, id not think that an .md file will open per default in notepad...
.md is recognized by TextEdit.app on Mac OSX and can be displayed and edited as plain text.
Alright, then it seems fine! :) Any more tests of course welcome, especially with macOS and Windows.
Also cc @SunboX @DecaTec @scherke85 @TheScientist of the Windows mobile app https://github.com/nextcloud/windows-universal
@stefan-niedermann yeah, and as Windows is still a widely used operating system, testing with that would be good. :)
The Windows app will not have any problems with *.md files, as we do not show the contents of files, we just offer them to download at the moment.
On the other hand, there is no program in Windows which will handle *.md files by default. The user will always be prompted to specify an app/application for handling this file type. Might be a little drawback for unexperienced users.
So exciting. Really looking forward to this.
I think the option to change standard to markdown would suffice.
Might be a little drawback for unexperienced users.
Honestly this is a _big_ drawback for any user. :\ And most people unfortunately still use Windows so it would be good if we find a solution here.
In this moment Nextcloud iOS do not view the .md files.
Might be a little drawback for unexperienced users.
Honestly this is a big drawback for any user. :\ And most people unfortunately still use Windows so it would be good if we find a solution here.
I second this. I like Markdown a lot, but I think the time isn't ready. We will confuse a lot of users and we will create some support issues / forum posts.
How about offering a setting for it and leaving .txt as the default?
How are folks determining the user personas using the various Notes apps? Is that information pooled somewhere? I don't know what the demographics are, but each time I read "a lot" or "most" of users, it seems like a feeling and not a fact.
If we have numbers on how the apps are distributed, I'd say we could make these informed decisions based on user base. Are those available?
For the larger conversation, if there isn't a way to set the file extension, I think it largely mitigates the usefulness of Markdown support; all the folks that use and know Markdown are not supported, so it isn't really a feature at that point.
My hope is that regardless of user base, we get a configuration setting for that. :smile:
At the very least, it needs to be an option, even if it's not default...we're not storing yaml, json, or xml in TXT files, so why MD?
How are folks determining the user personas using the various Notes apps?
That's a good question. For me, it's based on the people that surround me. But you are right, it should be measured somehow.
It could be a recommendation that people whose desktop operating system doesn't have an MD-capable editor by default install kate (or some other cross-platform open source editor)
And I submitted that comment, then realised it was a cross-platform, markdown capable, Nextcloud supporting notes app that got me here in the first place, QOwnNotes: http://www.qownnotes.org/
my 2cents:
.md should be default, if we "save" the user from new great formats like markdown it won't be spread. its like we have to support IE5 and can't go with html5 and/or css3. we have to move.
but as this is just software and not a house, please add a config for it. think about about:config of firefox, you don't have to implement and maintain gui for it. just leave the admin/the user the option which format it should be.
i would prefer markdown als default but i would also go with txt if there is an option for it and i can choose markdown for my installation.
Folks – fact is that txt works everywhere, while .md does not. Most notably on Windows and our iOS app, which is a big part of our userbase and general amount of users.
Most notably on Windows and our iOS app, which is a big part of our userbase and general amount of users.
Again, I have no problem accepting that, but if it is a fact, it is non-obvious. Without actual metrics, I will remain skeptical.
Regardless, what does that mean for this issue? If the developers can't be convinced of a default to .md, may we proceed with discussing how the setting will be implemented?
It should be done like a left-bottom settings menu, like the rest of the NC apps. Should be a simple dropdown menu. "default file-format": ["text", "markdown"]
@jospoortvliet @marinofaggiana feel free to post some download numbers of our Windows client and iOS app to show @maiki that both are a considerable amount of our userbase. Also note that Markdown is likely only known by a smaller percentage of our millions of users.
@andreasjacobsen93 yup.
As soon as Windows and iOS support Markdown better, we can of course switch to it as the default. But for now txt needs to be the standard. cc @Henni @korelstar
I think such a configurable setting will be the best way to incorporate the demands of all user groups. The design, of course, should orient on settings in other apps.
But I thought that it's just about the file extension and not about the rendering. Therefore, I won't use "file format" as settings text, but "file extension" with values "txt" and "md".
Or is it intended to deactivate markdown rendering for text files? I'm fine with that, too, but this changes the behavior for most users. Hence, it is more critical.
Another question is, if the setting applies to new notes only, or if all existing files are renamed. The first one is easier, but if the rendering will be changed based on the extension, then the second one would be more convenient. Therefoe, I would apply this for new files and don't touch the rendering.
@maiki >90% of our userbase is Windows or OSX user. Linux is, as everywhere, sadly irrelevant. Windows 10 alone has already over a third of our website visitors and Mac OS X is bigger than Linux.
And that's considering our website visitors are the admins of the system rather than the users. If you take our customers (eg tens of thousands of users at TU Berlin) 85% runs windows and 13% OS X or so... These users get clients directly from us. And our FIRST request for Linux clients was last week. One year after we launched.
I'm a big Linux fan and use MD files all the time, heck, I'd like to see this implemented, but looking beyond my own needs I realize that making that default or even an option is senseless.
What I would propose is that the MD editor app by @icewind1991 gets moved to our repo and makes the MD file format (optionally?) default. See https://apps.nextcloud.com/apps/files_markdown
How about that? It makes sense that if you install a Markdown editor you want to use it to edit.. markdown files.
@jospoortvliet so installing the md editor, would change the notes format to .md default?
Still think it would be better with a simple option.
@andreasjacobsen93 yeah, that's my idea. Just a thought... One could also let it add a separate "create new md file" in the files app, I guess.
For my use case, installing an additional app is not a preference. I don't use the web UI to edit my markdown files, I am just using the Notes app on my server so I can easily sync notes from the Android app and my computer, which uses a native text editor that adds value when a markdown file is designated with .md.
As an admin for our group's Nextcloud instance, I obviously prefer to keep dependencies down. Also, I just took an informal poll, but of the 30 or so folks in our group that answered, no one showed an interest in editing Markdown from the web UI.
Listen, I don't know what kind of development wall you are up against when adding a settings option, but it seems to me that the .md extension is going to be used by people that already incorporate markdown in their workflows, whereas the web markdown editor is for people that may not have any other apparent way to start using it (thinking of those Windows users).
Also, changing to .md because the app is installed creates a new issue for Windows users to bring up, because suddenly their notes syncing locally are not going to be read, while allowing the web editor to read and render markdown from .txt files makes sense in all scenarios.
But that is a different app, and I am not overly concerned by how it parses and writes files; I am concerned with the Notes app, and if I can get it to save new files as .md. And that seems like a setting to me.
Or is it intended to deactivate markdown rendering for text files?
@korelstar no, txt files should keep rendering Markdown correctly as they do already now. :)
The setting should only affect new notes and not mess with old ones as it would also change the modification date and sorting.
Calling the setting "File extension" and offering "txt (plain text)" and "md (Markdown)" would be good so we can get this over with. :)
@andreasjacobsen93 @maiki thinking about it, you're right, adding the md file editor shouldn't change the behavior of the Notes app.
@jancborchardt is ok with creating a setting in the Notes app so - solved. Well, now the work has to be done ;-)
I've been writing 'subject.md' in the first line of each note. This makes the filename be subject.md.txt, which is enough for my Vim and Emacs hooks to identify the file as Markdown, while Notes and Nextcloud happily only notice the .txt.
@leoboiko good point, so when the end of the first line is .md we could automatically detect that and save as Markdown.
cc @nextcloud/notes
I wouldn't recommend that. This would be a hidden feature, that nobody can guess. We would have to write a documentation for the app usage and advise the users to read the documentation before using the app. This is the opposite of an intuitive user experience.
I still think that an explicit setting is the best way. We only need somebody who implement this :wink:
Of course there should be an explicit setting, as said above. I meant the title auto-detection could be a nice additional enhancement for advanced users who name their files like that …
I'd like to add my vote here to have a configuration setting to choose which extension notes files should have - while having .txt as a default.
So I don't know if this is resolved yet or not, it looks like it is still open with last comment being Sept of last year. So I'll add this here:
If you'd like .md to be your default extension, just change it in the notes app code. Its literally one change, I just tested it :)
In .../nextcloud/apps/notes/service/notesservice.php find the line (110):
$path = $this->generateFileName($folder, $title, "txt", -1);
And just change "txt" to "md".
Done!
@ndom91 Right, but note that this may cause problem at the next upgrade because Nextcloud will notice that the code does not match the official version and will warn you of possible integrity issues.
This is from past experience :-)
@rthouvenin your absolutely right. I had a few problems like this recently upgrading from 12.X.X to 13.
nextcloud will make a fuss if the code is not "stock" so to speak.
Oh well, one must then just change 3 characters back and then back again after the upgrade process. Good thing that doesn't happen too often :smile:
Yep this is exactly what I'm doing while waiting for a decision to be taken ;)
Just working with Nextcloud Notes v0.13.1 on ownCloud 10.0.7 and Notes 2.0.2 having the same issue with *.md. But the trick of ndom91 works even with …/owncloud/apps/notes/service/notesservice.php, line 104. So it is solved for me, thank you!
How about provide both .md and .txt files in Files?
Markdown is good format if you have a proper editor/viewer.
Plain text is cross-platform. For example, on my Android phone here isn't a Markdown viewer by default.
The notes app as well as the web gui render Markdown on Android.
Providing both means duplicating every note for those who sync.
-----Original message-----
From: Guo Yunhe notifications@github.com
Sent: Wednesday, March 14, 2018 11:09 AM
To: nextcloud/notes notes@noreply.github.com
Cc: Guy Van Sanden guy@taurix.net; Manual manual@noreply.github.com
Subject: Re: [nextcloud/notes] Add setting to create new files with markdown file extension (.md) (#24)
How about provide both .md and .txt files in Files?
Markdown is good format if you have a proper editor/viewer.
Plain text is cross-platform. For example, on my Android phone here isn't a Markdown viewer by default.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
 {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/nextcloud/notes","title":"nextcloud/notes","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/nextcloud/notes"}},"updates":{"snippets":[{"icon":"PERSON","message":"@guoyunhe in #24: How about provide both .md and .txt files in Files?\r\n\r\nMarkdown is good format if you have a proper editor/viewer.\r\n\r\nPlain text is cross-platform. For example, on my Android phone here isn't a Markdown viewer by default.\r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/nextcloud/notes/issues/24#issuecomment-372968395"}}}
Markdown is plain text. <- Exhibit A
There should be no issues with editing a .md file in any plain text editor. The syntax of Markdown was designed for that very purpose. I often edit my .md files in Vim, and it provides no special formatting for me.
Thus, “Markdown” is [...] a plain text formatting syntax
The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.
From the source: https://daringfireball.net/projects/markdown/
It's strange that Notes provides a Markdown editor, however does not save the files with a Markdown extension. This means other Markdown editors may not know that it's Markdown. This same problem does not exist with non-Markdown editors. Any text editor will happily open and edit a .md file.
Essentially, defaulting to .md would provide equal access for users that wish to use a Markdown editor and those who do not. Keeping .txt only serves the latter, while confusing users who do write Markdown (which is happily rendered by Notes` and try to edit later.
Well, the common sense seems to be that an option is okay, but the default has to be .txt
The problem is that users who use markdown are usually advanced users so they know where to look and how to change the setting while basic users do not know this and expect that a file is simply editable with a double click.
If you are interested, you might provide a PR with a setting? :-)
we don't have to save the user from everything. new formats and their power won't be teached to user if we try to save them and hide it behind wrong extensions. all many of my customers happily switched to markdown after i show them its power.
the default should be .md because the files are markdown files. if some admin want to "save" their users from this "very advanced high tech" extension, there should be a setting for switching back to .txt.
and expect that a file is simply editable with a double click.
Just let me get this right. Are you sure that it is not editable with a double click (probably on Windows)? Because that is what @ViViDboarder just wrote one comment above you. I am not sure what is correct because I am on Ubuntu and you are probably referring to Windows. Can you provide an evidence of it?
Also: On Windows, known extensions are hidden by default, so that wouldn't confuse the user. I only don't know whether it is a known extension.
But apart from that: Doing wrong things just to make the user feel more convenient in his non-tech knowledge might also lead to problems, because that decreases his knowledge by hiding the reality from him. He thinks that the files would be txt files, which is wrong. It is like lying to a customer or always agreeing to what he says in order to make him feel more pleasant. To me that is just not right.
Imho (as an answer to your proposal of a PR with a setting) you can feel free to create some documentation for users that might face problems instead of requesting a manual setting for this.
But that is only my opinion, so can we get some kind of objective discussion on this to finally come to a decision on this? This is open way too long now. I am not experienced in this, but I am pretty sure there are ways to get to a more or less objective decision with some techniques like thinking about goals that should be achieved and rating the possible solutions with them.
Are you sure that it is not editable with a double click (probably on Windows)?
I just tested to open a *.md file on Windows 10, and it doesn't directly open the editor. It shows a dialog "How do you want to open the file?" with the option "1) Editor" or "2) Search for an app in the windows store". The checkbox "always open the file using this app" (referring to the Editor) was already ticked with a check mark.
Not the best behaviour, but in my opinion good enough to make *.md the default.
I agree. And worst-case scenario, If they're already using NextCloud, they're likely to be more technical, or at least have an admin who is technical enough to figure it out.
I say MD default as well.
Thanks @KopfKrieg
So it seems like most (at least the most recent comments) prefer to have .md if I am not wrong. Second option would be to introduce an option to change it (either with .md or .txt set as default, while I think that having .md default and adding a setting to change it to .txt is not really sensible).
Ping to @eppfel @Henni @korelstar how do you want to proceed on this? For now I think the plan was "wait for some voices"? Can this now be decided or discussed how to continue with this?
still voting for a setting for this. i personally say go for markdown as default setting but i think bc compat options are a good thing.
i really the way mozilla and google are going with their browsers. just increase the major version number and do not care about the users (which are losing addons and things like their development domain .dev).
we even don't need a gui option, some digged "about:config" setting (simple constant in a config.php) will do as long as it is documented and linked here.
@c33s If this is just about backward compatibility then I vote for an automatic migration (e.g. changing the extension) for old notes.
still voting for a setting for this. i personally say go for markdown as default setting but i think bc compat options are a good thing.
Setting would be nice. +1 for markdown as default.
If this is just about backward compatibility then I vote for an automatic migration (e.g. changing the extension) for old notes.
This would probably migrate all files, I vote against this. The file ending should be preserved in my opinion (because, if anyone wants to use *.txt, why not. As long as I can use *.md, everything's fine). As far as I know this is already the default behaviour.
@claell i am clearly against changing existing extensions. what first looks like help for the user, can break things.
to stay with semver x.y.z (https://semver.org/)
y where a setting default_extension exists to configure the extension for new files. first default for this setting is set to txt, so it is still the default extension. txt extensions is deprecated and that in the next major version md would be the default one. add a link to info about markdown and how to get a markdown editor on each platform (ideally a opensource one),x change the setting default_extension to md to create new files as markdownso everybody is happy and everybody can switch to the opposite extension if necessary. i really don't understand the unwillingness for settings like in mozillas about:config (we don't need a gui for everything).
not concerning only this specific project, i noticed many times, that settings are unwanted, the "right" way is discussed in very long threads, a decision is made and 50% of the users or developers are unhappy. we are not building physical things, we don't have the problem that we have to decide if we want to build a flat roof or a pitched roof, we can do both simultaneously.
i really don't understand the unwillingness for settings like in mozillas about:config (we don't need a gui for everything).
absolutely - specified keys in config files are underrated.
i really don't understand the unwillingness for settings like in mozillas about:config (we don't need a gui for everything).
Not for everything. If it's a global setting I'm totally fine with changing values in a config file. But if we want per user settings a gui would be absolutely necessary.
The thing is: A setting causes more effort and since it should be a GUI setting, unnecessary settings will mess up the GUI. From my perspective with .md as default there should be no usecase that someone wants .txt. If you can think of one feel free to post it here. But I really have the strong feeling that it will be unnecessary and will only cause more work.
This would probably migrate all files, I vote against this. The file ending should be preserved in my opinion (because, if anyone wants to use *.txt, why not. As long as I can use *.md, everything's fine). As far as I know this is already the default behaviour.
I don't think there is any case one wants to use .txt, that is why I proposed auto-migration.
i am clearly against changing existing extensions. what first looks like help for the user, can break things.
Give an example
add the info the readme that the behavior of creating txt extensions is deprecated and that in the next major version md would be the default one. add a link to info about markdown and how to get a markdown editor on each platform (ideally a opensource one),
Is there an OS that cannot open .md files by default/doesn't come with an .md editor so that .txt is needed? If not then this is not necessary.
so everybody is happy and everybody can switch to the opposite extension if necessary. i really don't understand the unwillingness for settings like in mozillas about:config (we don't need a gui for everything).
As said before, this will need a GUI.
not concerning only this specific project, i noticed many times, that settings are unwanted, the "right" way is discussed in very long threads, a decision is made and 50% of the users or developers are unhappy. we are not building physical things, we don't have the problem that we have to decide if we want to build a flat roof or a pitched roof, we can do both simultaneously.
I am completely open to this, but I don't think we have this situation here. I just want to make sure it is needed to not cause unnecessary effort and UI clutter (meaning keeping things simple for both the users and the developers). But since I am not the one creating a PR for this, I will leave it to the dev who does it.
Nothing against your post, but:
unnecessary settings will mess up the GUI.
You expect a simple switch between "Plaintext (.txt)" and "Markdown (.md)" will "mess up the GUI"?
Okay, back to the topic:
I don't think there is any case one wants to use .txt, that is why I proposed auto-migration.
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.
Is there an OS that cannot open .md files by default/doesn't come with an .md editor so that .txt is needed? If not then this is not necessary.
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".
to stay with semver x.y.z (https://semver.org/)
- create a new minor version y where a setting default_extension exists to configure the extension for new files. first default for this setting is set to txt, so it is still the default extension.
- add the info the readme that the behavior of creating txt extensions is deprecated and that in the next major version md would be the default one. add a link to info about markdown and how to get a markdown editor on each platform (ideally a opensource one),
- don't hurry for the next major release so that the users and admins have time to prepare for the change
- on the release of a new major version x change the setting default_extension to md to create new files as markdown
That's a well defined upgrade path. Why not do it exactly as @c33s suggested?
You expect a simple switch between "Plaintext (.txt)" and "Markdown (.md)" will "mess up the GUI"?
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.
Maybe some custom setups.
Ok, so nothing concrete, just a feeling you have? Still might be true that something is broken by that.
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.
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)"_
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".
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.
That's a well defined upgrade path. Why not do it exactly as @c33s suggested?
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).
Most important thing: This change is really not a big deal, while this "path" seems to be suitable for bigger upgrades. This does not mean it cannot be applied here, but also consider there is only a limited amount of time, so one should not waste it with unneeded effort.
Not for everything. If it's a global setting I'm totally fine with changing values in a config file. But if we want per user settings a gui would be absolutely necessary.
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.)
Ok, so nothing concrete, just a feeling you have? Still might be true that something is broken by that.
this are not feelings, when you use a software and is ships .txt all the time, suddenly it ships .md something will break at someones workflow (if the installation is big enough many many users are confronted). if a script looks for new .txt files in a folder on the server for example. is you don't use such a script it is easy to say we don't need a proper upgrade path but if you depend on this to work you are happy to keep things working.
for example, google changed the handling of .dev domains. they bought the domains. many dev teams use .dev als internal domain. so this little change of google adding a hardcoded redirect from http to https for all .dev domains looks small but breaks a whole dev environment. result people stay on old chrome versions simply because they have no time to restucture the complete network/dns.
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.
So if any OS can open .md files there is no need to...
as this discussion is half about beeing not able to open md file on all systems...
As said before, this will need a GUI.
everybody means every admin. so no gui.
Well I already mentioned one flaw in the steps
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 .markdown or .md or any other custom extension.
in general i don't really care if there is an option for configuring the extension, as soon as notes uses md as default ext i have what i want but i care for good and relyable software. so i think such a config is required. for all the poor admins out there, who require txt because they cannot teach all there users how to use a markdown editor, or cannot install a markdown editor for all users, or
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.)
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?
this are not feelings, when you use a software and is ships .txt all the time, suddenly it ships .md something will break at someones workflow (if the installation is big enough many many users are confronted). if a script looks for new .txt files in a folder on the server for example. is you don't use such a script it is easy to say we don't need a proper upgrade path but if you depend on this to work you are happy to keep things working.
[...]
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.
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.
as this discussion is half about beeing not able to open md file on all systems...
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).
everybody means every admin. so no gui.
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.
this steps can be adapted. it is a suggestion. it is really not complicated.
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.
in general i don't really care if there is an option for configuring the extension, as soon as notes uses md as default ext i have what i want but i care for good and relyable software. so i think such a config is required. for all the poor admins out there, who require txt because they cannot teach all there users how to use a markdown editor, or cannot install a markdown editor for all users, or
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!
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 .md. Could you give me a hint on where to search?
@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.
For the Android app the work is pretty much done and will be shipped in a future version as soon as it has been tested with the new API, so just be a little bit more patient 🙂
For the Android app the work is pretty much done and will be shipped in a future version
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 .txt and .md?
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).
Glad to hear that! I am curious why changing this setting is a much needed function in the Android app for you?
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 .txt or .md and save them in folders. (Combined with auto-syncing, a clean design and some other simple but important functions, this is actually a very rare combination among Android note-taking apps.)
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 .md. It's not a huge problem to have some files (those created on Android) as .txt and manually rename their resolution - but still an inconvenience. If the text is a .txt, Sublime may sometimes recognize it as plain text; perhaps there may be some rendering inconveniences when converting into office documents.
It's not a huge problem to have some files (those created on Android) as .txt and manually rename their resolution - but still an inconvenience
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 .md in the future. No need to wait for this setting in the Android app. Just set .md in the settings section of the Notes app in your browser and it will automatically also affect the Android app.
all further Notes, including the ones you create with the Android app will be stored as
.mdin the future
Ach so! Many thanks for letting me know!
Most helpful comment
Let's go with
.mdfor our default extension, as it seems this is the preferred solution by the community.But I'd really like to see a setting to switch this over to
.txt, because I think otherwise soon issues will show up which want to work on txt-files (e.g. on mobile). (This is our first setting in this app so we might have to think about how to properly integrate this UI- and backend-wise)