From: Dmitry Gutov <dgutov@yandex.ru>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: cyd@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: web-mode.el
Date: Sat, 16 Jun 2012 17:19:21 +0400 [thread overview]
Message-ID: <4FDC87D9.3080704@yandex.ru> (raw)
In-Reply-To: <CANbX366WzYu9CZV_m2mmKUsaH1UocNFskwfNgiBdOkdq3PGx2Q@mail.gmail.com>
On 16.06.2012 5:43, Lennart Borgman wrote:
> On Fri, Jun 15, 2012 at 5:24 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
>>
>> Fully isolating the chunks might not be the best course of action, even if
>> it were not too hard to do.
>> For example, if we want to adjust indentation inside <% if %> <% end%>
>> blocks, we need to be able to actually look inside them while we're in the
>> primary mode chunk (between those two).
>
> Can you give an example of what you mean here?
I was just arguing a general point. If your proposal was to be able to
call various functions manually while lying to them or their callees,
then go back to seeing the whole buffer "truly", this example doesn't apply.
>> As an aside, this bit from the docstring sounds not very useful, maybe even
>> harmful:
>>
>> "- However first non-empty line indentation in a chunk when going
>> in is special if prev-prev chunk is on same mumamo-depth and
>> have the same major mode. Then indent relative last non-empty
>> line in prev-prev chunk."
>
> Why do you think this is wrong?
If mumamo-depth doesn't take into account nesting level of plain html
tags, then this is going to be wrong when nesting levels are different.
If it does take into account those, this shouldn't be a problem, but I
still don't understand why you need this mechanic at all.
>> js2-mode's indentation function is very similar to js-mode, since they're
>> both derived from an javascript-mode. It doesn't work in multi-mode context,
>> though, and while fixing that shouldn't be too hard, I'm not sure it's worth
>> spending time on, because js2-mode's advantages over js-mode are most
>> evident with larger files, not small snippets.
>
> Is not this is a general problem, not something specific to js2-mode?
js2-mode is doing things differently from most major modes: 1) it reads
all buffer contents, scanning through every buffer character one by one
while parsing, 2) its fontification is all manual, performed by setting
'font-lock-face and 'syntax-table text properties during parsing.
And parsing is scheduled directly from after-change-functions, not
through jit-lock.
>> I have yet to look into using nxml as primary mode. Do you have any
>> suggestions how that could be made easier?
>
> There are such multi major modes in nXhtml. However they does not
> always behave as I expected.
I was asking specifically about nxml, because my initial attempt to make
it work with erb-style tags in mmm-mode had failed.
next prev parent reply other threads:[~2012-06-16 13:19 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 14:24 web-mode.el Dmitry Gutov
2012-06-14 16:54 ` web-mode.el Lennart Borgman
2012-06-15 3:24 ` web-mode.el Dmitry Gutov
2012-06-16 1:43 ` web-mode.el Lennart Borgman
2012-06-16 13:19 ` Dmitry Gutov [this message]
2012-06-16 13:30 ` web-mode.el Lennart Borgman
2012-06-19 1:18 ` web-mode.el Dmitry Gutov
2012-06-19 1:56 ` web-mode.el Lennart Borgman
2012-06-19 16:04 ` web-mode.el Dmitry Gutov
2012-06-14 17:28 ` web-mode.el Stefan Monnier
2012-06-15 1:40 ` web-mode.el Dmitry Gutov
2012-06-16 6:17 ` web-mode.el Stefan Monnier
2012-06-16 10:55 ` web-mode.el Lennart Borgman
2012-06-16 13:27 ` web-mode.el Dmitry Gutov
2012-06-16 13:32 ` web-mode.el Lennart Borgman
2012-06-18 1:49 ` web-mode.el Stefan Monnier
2012-06-19 1:00 ` web-mode.el Dmitry Gutov
2012-06-19 3:09 ` web-mode.el Stefan Monnier
2012-06-19 10:39 ` web-mode.el Lennart Borgman
2012-06-20 2:01 ` web-mode.el Dmitry Gutov
2012-07-31 8:46 ` web-mode.el Lennart Borgman
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 0:33 web-mode.el Dmitry Gutov
2012-06-14 1:49 ` web-mode.el Lennart Borgman
2012-06-14 2:13 ` web-mode.el Dmitry Gutov
2012-06-14 3:23 ` web-mode.el Stefan Monnier
2012-06-15 8:34 ` web-mode.el Vitalie Spinu
2012-06-15 9:23 ` web-mode.el Lennart Borgman
2012-06-15 9:41 ` web-mode.El Vitalie Spinu
2012-06-16 1:37 ` web-mode.El Lennart Borgman
2012-06-11 22:24 web-mode.el Bois Francois-Xavier
2012-06-12 11:37 ` web-mode.el Lennart Borgman
2012-06-12 13:23 ` web-mode.el Bois Francois-Xavier
[not found] ` <CAK1xyPN=7To8ZsznHdjhDO=pd_8MocAqWXzSSrFJNe=uHRwp9g@mail.gmail.com>
2012-06-12 13:24 ` web-mode.el Lennart Borgman
2012-06-12 13:45 ` web-mode.el Bois Francois-Xavier
2012-06-13 7:45 ` web-mode.el Chong Yidong
2012-06-13 8:39 ` web-mode.el Bois Francois-Xavier
2012-07-31 8:41 ` web-mode.el Steinar Bang
2012-06-13 10:36 ` web-mode.el Lennart Borgman
2012-06-13 10:49 ` web-mode.el Bois Francois-Xavier
2012-06-13 10:55 ` web-mode.el Lennart Borgman
2012-06-13 11:43 ` web-mode.el Bois Francois-Xavier
2012-06-13 11:52 ` web-mode.el Lennart Borgman
2012-06-13 12:30 ` web-mode.el Stefan Monnier
2012-06-13 12:37 ` web-mode.el Lennart Borgman
2012-06-13 10:37 ` web-mode.el Dmitry Gutov
2012-06-13 10:46 ` web-mode.el Lennart Borgman
2012-06-13 10:26 ` web-mode.el Dmitry Gutov
2012-06-13 14:18 ` web-mode.el Richard Riley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FDC87D9.3080704@yandex.ru \
--to=dgutov@yandex.ru \
--cc=cyd@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).