From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: web-mode.el Date: Sat, 16 Jun 2012 17:19:21 +0400 Message-ID: <4FDC87D9.3080704@yandex.ru> References: <4FD9F40C.90406@yandex.ru> <4FDAAADA.1030609@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1339852792 19356 80.91.229.3 (16 Jun 2012 13:19:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2012 13:19:52 +0000 (UTC) Cc: cyd@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 16 15:19:51 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sfsuq-0003vj-67 for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2012 15:19:48 +0200 Original-Received: from localhost ([::1]:57276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sfsuq-0001BP-42 for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2012 09:19:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sfsun-0001BI-5d for emacs-devel@gnu.org; Sat, 16 Jun 2012 09:19:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sfsul-00056j-IX for emacs-devel@gnu.org; Sat, 16 Jun 2012 09:19:44 -0400 Original-Received: from forward13.mail.yandex.net ([95.108.130.120]:39144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sfsui-00056G-IP; Sat, 16 Jun 2012 09:19:41 -0400 Original-Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward13.mail.yandex.net (Yandex) with ESMTP id 46B201416B8; Sat, 16 Jun 2012 17:19:35 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1339852775; bh=PntOrnptzndtRLea01WLx9L9jL24PBnj5B/Q8/M/fvE=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=HRapz2F8Vj4YsL1+57w8olDMEzKSAywTj8HmVRfPDrH2XZfQBBneSCMMZtlG4+MPB YyFmDOfsVGcvIRVO0qAuKkI3ZpZzTnpvwLMUQZDTcRnLGIQ87MSMDg08BJE9gjSDxT M7jI4flRBfBcK+HImp+LNvSQ7XtHS60KUaFss5vo= Original-Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id 04C761B605F1; Sat, 16 Jun 2012 17:19:34 +0400 (MSK) Original-Received: from 98-87.nwlink.spb.ru (98-87.nwlink.spb.ru [178.252.98.87]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id JYwGMBHS-JYwS3roM; Sat, 16 Jun 2012 17:19:34 +0400 X-Yandex-Rcpt-Suid: lennart.borgman@gmail.com X-Yandex-Rcpt-Suid: monnier@iro.umontreal.ca X-Yandex-Rcpt-Suid: cyd@gnu.org X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1339852774; bh=PntOrnptzndtRLea01WLx9L9jL24PBnj5B/Q8/M/fvE=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=twvWzLXFPDawSB+otN3TXb+8bJkJuyFPVpAir5HRjn1dCiUOYbJ86+D6UetiyGR1S HRrlXNPI8VwFlT3VK/OK1se7tKTTRFoYoncMqozO+fk3rM1GiN8SqdOCGHa3uo5XN2 pZXNYK8fJAAC9mmw1o3d5iWAjDRPFo8dZDMf/WsI= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 95.108.130.120 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150970 Archived-At: On 16.06.2012 5:43, Lennart Borgman wrote: > On Fri, Jun 15, 2012 at 5:24 AM, Dmitry Gutov 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.