phillord / lentic

Create views of the same content in two Emacs buffers
183 stars 12 forks source link

Can we support define regions to inser lentic text? #30

Open CestDiego opened 9 years ago

CestDiego commented 9 years ago

Not just by having text surrounded by or src blocks like in org mode, but let's say I want to input an string when doing web templating (that means the main language might be php,python,javascript,etc) and I want the string containing html to have html mode enabled, I imagine lentic could be of use here.

I'm trying to say we could replicate something like in this video

phillord commented 9 years ago

It might be able to possible to achieve something like this. I am not convinced at the moment, that it would allow you to do the "language injection" where a specific part of the buffer moves into HTML mode, but using lentic to pop out a part of the buffer and just see that would be possible, by narrowing the region in the lentic buffer (assuming lentic works with narrowing -- it hasn't been heavily tested yet!).

I cannot see a way to replicate their cute functionality where

"" + ""

is converted to

for editing. I guess you could narrow, and make other parts invisible. But lots of mode features in Emacs still looks at invisible text, so I am not sure how well this would work.

In terms of implicit regions and non-delimited regions, I need to support that to add Markdown support which I would like.

Phil

Diego Berrocal notifications@github.com writes:

Not just by having text surrounded by or src blocks like in org mode, but let's say I want to input an string when doing web templating (that means the main language might be php,python,javascript,etc) and I want the string containing html to have html mode enabled, I imagine lentic could be of use here.

I'm trying to say we could replicate something like in this video


Reply to this email directly or view it on GitHub: https://github.com/phillord/lentic/issues/30

Phillip Lord, Phone: +44 (0) 191 208 7827 Lecturer in Bioinformatics, Email: phillip.lord@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU

CestDiego commented 9 years ago

Thanks, this is very promising! :) congrats for your work I'm looking forward to keep using lentic.