lijunsong / pollen-mode

An Emacs major mode for editing in pollen markup language
GNU Lesser General Public License v3.0
43 stars 9 forks source link

Changing major mode in block editing window resets the window #11

Open lijunsong opened 8 years ago

lijunsong commented 8 years ago

Currently C-c ' closes the special block editing window.

Changing major mode in the window cleans keybindings and the header, and C-c ' doesn't work after mode changes.

odanoburu commented 4 years ago

do you have a solution in mind? I thought of prompting the user for a major mode, which would then be invoked, and after that the window would be set up (which might be what org-mode does?). I didn't see your code yet, though.

we could also implement some kind of cache to offer better default modes to the user, or have the user specify the major mode with something like:

◊code{◊; mode: elisp
(+ 1 1)
    } 
lijunsong commented 4 years ago

@odanoburu yea, I think I kinda know what to do, just need to take some time to implement it.

Instrument like ◊; mode: won't work well in general. It might work for code snippet, but the text feels like containing a lot of accidental complexity in it.