-
Notifications
You must be signed in to change notification settings - Fork 66
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
multiple inner modes #11
Comments
Markdown works with arbitrary number of difernt inner modes. It should work /Sent from tablet/
|
Sounds great, thanks! Please see my firsts baby steps (sorry, I do not speak (e)lisp) here: daroczig@c3a36c3 An example document for testing purposes: https://github.com/Rapporter/rapport/blob/master/inst/templates/Minimal.tpl This document is basically a My problem with my really naive try was to let that document have 2 inner modes, but it seems that only the first one is triggered. I have no idea what kind of syntax is needed to be able to use two inner modes in a document. Any help/hint would be really welcomed. |
Ok I started getting it. I have one question. Are markdown code blocks |
Nope, markdown code blocks are not really important here. So "just" the two inner modes (head and brew) are the top priority. |
But do you have plans to provide markdown code blocks in the future? If so, then it would be wise to inherit from existing markdown mode and to add two additional modes, brew and YAML. |
One more thing. Isn't .tpl associated with something else? It sounds generic to me. Shall we associate it to a more specific extension, like .rapport? |
I have merged your code and modified to use proper classes. It works now but very sadly it often blocks emacs. The reason is markdown mode that decided to reinvent font-lock and bluntly re-fontifies the whole buffer on every change you make. Please pull and check the basics. Note that I activated rapport on ".rapport" extension. |
Seems to work fine, thank you very much! This rocks :) Thanks, PS: you are right about the |
What emacs do you use? What version of markdown-mode? I have serious problems with it and I even reported it to the author. Do you notice a freeze if you edit Minimal.rapport just before the <!--head? |
I'm on Arch Linux with You are right about the freeze issue, but I have not noticed it before trying to edit the file before the |
Please try a new version. The freeze was polymode bug. It took me a while to figure that out, debugging post-command hooks and font lock is a huge pain :( Now everything is fixed.on polymode side. I also remove markdown ugly fontification hooks for time being, otherwise everything is painfully slow. Wait and see what the maintaner has to say. Rapport is now the most complex polymode. It includes pretty much every feature of polymode: auto-chunks (like markdown chunks) and two known in advance modes (multi chunk mode). I will add org-mode these days and plan to release polymode to MELPA by the end of the week. Thanks for all the input and please report any issues. |
Awesome, thank you very much! Works really fine here. |
Sorry for such lame question, but I would be interested in defining a base mode with two inner modes (e.g. markdown is the main mode but we also find YAML and R code chunks with separate tags). Is it possible? If so, could you please point my attention to a working demo? Thanks, Gergely
The text was updated successfully, but these errors were encountered: