-
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
turning off italics via underscores doesn't work #70
Comments
I'll check later |
The documentation is unclear; sorry about that. The custom variable you mentioned only affects the insertion commands, not font lock. |
Sorry for my brevity earlier. I was typing from my phone. In case it wasn't clear, what
I am with you here. What I do is either use backticks, like If you haven't lately, you might also want to give |
Thanks, that makes sense about markdown-italic-underscore. I'm not sure about many other processors, I'll note that in Marked 2 neither of the two sample lines show any italics. I'll give gfm-mode another try. |
Marked 2 uses MultiMarkdown by default and indeed, on my system it does not generate italics with your examples. On the other hand, Markdown.pl does... |
Just seems way more natural to me that _ imbedded in a word shouldn't trigger italics. How often does anyone want part of a word emphasized? If they did, they could always use html. And I'd suspect that a high percentage of Emacs users might be programmers who write about variable or function names. Just my $0.02. I tried with Common Mark and they don't italicize either of the examples either. |
Yes, it is an unfortunate incompatibility across implementations. I can see both sides, though. Like most programmers, I usually want the GFM-like underscore behavior, but I think writers, etc. would tend to prefer the Markdown.pl behavior. In any case, for now we have one mode for each behavior (markdown-mode and gfm-mode). In the future I could see a unified markdown-mode with settings for each variation and extension, as well as predefined groups of settings for specific processors (Pandoc, MultiMarkdown, CommonMark, etc.). For now, the target for markdown-mode is Markdown.pl plus some common, unobtrusive extensions that are unlikely to have adverse interactions. |
I've been meaning to work on this myself. I'm glad to see I'm not the only one thinking about it! |
The issue here seems very similar to the reason #81 is still open (and #13, even); markdown-mode currently has a single unified syntax / command set for all markdown dialects at once, and they do end up conflicting very rarely (but they do, which is why these issues are still up). In #91 I added support for pandoc metadata sections with a I think a better approach would just be to define derived modes for each dialect, similar to the way |
I'd favor a dual approach of first adding individual feature flags to markdown-mode as new features are supported. This is what I had in mind when I implemented the basic LaTeX/itex math support (see When enough features of some processor are supported we could add a derived mode to enable/disable groups of features at once. My worry is that adding a named derived mode (e.g., pandoc-mode) will be seen as an implicit guarantee or goal of fully supporting all features and extensions of that processor. (Besides, in this example there is already a very nice pandoc-mode by Joost Kremers. Maybe there are others as well.) ¹ Currently itex2MML + MultiMarkdown + GNU Source Highlight and some Perl scripts to glue them together. |
That makes a lot of sense. Cool. I'll take a look at this next. |
I'm closing this since I think the initial issue was resolved and I'm not sure there's anything else that's actionable per se. I think feature sets, derived modes, or some similar framework will be the longer term solution. Any steps in that direction can be added as new PRs. |
Test lines:
In markdown-mode both lines are in italics face between the _
In gfm-mode only the first line has italics face
In both cases markdown-italic-underscore is nil. I would think that with a nil value I'd need to use * to get italics for emphasis and that text would be ignored. I'd like to use plain markdown-mode (not gfm-mode) and still be able to write notes with variable names (with underscores) in them.
The text was updated successfully, but these errors were encountered: