Closed maindoor closed 5 years ago
This package is meant to replicate org-edit-src-code
outside of org-mode
, for situations like for example modifying SQL statements (using sql-mode
) embedded directly in source code in another language. It's not, and wasn't meant to be, an alternative to narrowing.
font-lock isn't enabled
It "is", but the default edit-indirect-guess-mode-function
just calls normal-mode
, which most of the time results in fundamental-mode
. Knowing which major mode to enable for a given region requires domain-specific knowledge, which is why the edit-indirect-guess-mode-function
hook exists: so you can use that knowledge to better determine which major mode to use in the indirect buffer.
Not a troll, genuine question. See this piece of code and lets discuss how this package does a lot better job the code here:
I've been using this piece of code for a long time and I'd like for it to be integrated into a package like yours. This code does the right thing when I am inside a C function to narrow it down to just the function, preserving font-lock and also works on a region. Your package has hooks support, but font-lock isn't enabled by default and maybe more, I just looked at the description. Can you use portions of the code and make better defaults ?