-
Notifications
You must be signed in to change notification settings - Fork 167
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
gfm-mode and line wrapping #31
Comments
I take your point about the distinction between the two levels of GitHub Flavored Markdown. Thanks for making the distinction so clear. Aside from the newline behavior, How does this for a middle ground? Keep the task list support and other things (maybe nothing else currently) that would typically be invisible to people expecting level 1, but ask users wanting level 2 to add a hook to turn on ;; Use visual-line-mode if available, fall back to longlines-mode:
(cond ((fboundp 'visual-line-mode)
(visual-line-mode 1))
((fboundp 'longlines-mode)
(longlines-mode 1))) I think the next best alternative would be to create a second derived mode, but that seems unnecessary if defaulting to |
I think that's reasonable for now. In the long run, it looks like a number of features from GFM are migrating to mainstream markdown (see also CommonMark). So the endgame might to have a bunch of feature toggles and then make several predefined "styles" or something like that, like "classic", "pandoc", "gfm", "commonmark", and so on. Clearly, none of those will want the line-breaking behavior, however. |
`visual-line-mode` is no longer enabled by default in `gfm-mode` since newlines are only significant on GitHub in issues and comments, but not for actual files in repositories such as README.md, etc. The documentation for GFM-specific features has been rewritten to explain in more detail which features are supported by `markdown-mode` and `gfm-mode`. Adds a `gfm-mode-hook` for those who want to keep `visual-line-mode` on by default in `gfm-mode`. See GH-31 for additional details.
Commit da8bc8a addresses
Please double-check what I wrote in the README.md file about the various features. There are some additional caveats, such as (read only) task lists being supported in all Markdown documents since April of 2014, despite not being supported in GFM as originally described. |
I'm closing this issue since the changes seem to be uncontroversial. If anyone has further thoughts, please feel free to re-open. |
I think there is some confusion around what GitHub Flavored Markdown actually is. There are actually two levels:
gfm-mode
apparently wants to combine both in one, but that seems wrong. If I write aREADME.md
for including in a GitHub repository, then I do want the URL autolinking and the fenced code blocks, but I don't want the newline-is-significant behavior.Since only the most die-hard users would use Emacs for writing issues and comments on GitHub, I would remove support for the second variant altogether. In practice, the difference is small, and arguably it is not the job of a major mode to fiddle with
visual-line-mode
anyway.The text was updated successfully, but these errors were encountered: