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: Thu, 14 Jun 2012 04:33:01 +0400 Message-ID: <4FD9313D.70303@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1339633996 13179 80.91.229.3 (14 Jun 2012 00:33:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2012 00:33:16 +0000 (UTC) Cc: cyd@gnu.org, emacs-devel@gnu.org To: lennart.borgman@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 14 02:33:15 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 1Sexzs-0004CV-0i for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2012 02:33:12 +0200 Original-Received: from localhost ([::1]:50270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sexzr-0003Lc-Ug for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2012 20:33:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sexzo-0003LW-2B for emacs-devel@gnu.org; Wed, 13 Jun 2012 20:33:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sexzm-0003ET-0c for emacs-devel@gnu.org; Wed, 13 Jun 2012 20:33:07 -0400 Original-Received: from forward18.mail.yandex.net ([95.108.253.143]:35978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sexzi-0003DZ-Kz; Wed, 13 Jun 2012 20:33:03 -0400 Original-Received: from smtp16.mail.yandex.net (smtp16.mail.yandex.net [95.108.252.16]) by forward18.mail.yandex.net (Yandex) with ESMTP id 69A5B1782230; Thu, 14 Jun 2012 04:32:59 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1339633979; bh=c7oUt420XBDC5fsvwSNO+PFZ8+MRv5M1vIR84DFmy4s=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:Content-Type: Content-Transfer-Encoding; b=cOdN9eSrOBkP+IAP6G76bTFTuOs/kswObDqGooUs/To3KJ7+67AgqOPD5bHgANqZt LIWAsXi+FH8m1X3lrS/cWOi8mMM49TVtGQplqmXO248eUG9CNnU396x6es1fqLHGfN 9XnF234SvaZ5SkPIaW6Avv3HbAvkyCSIU1qUIqSE= Original-Received: from smtp16.mail.yandex.net (localhost [127.0.0.1]) by smtp16.mail.yandex.net (Yandex) with ESMTP id 36A786A04A8; Thu, 14 Jun 2012 04:32:59 +0400 (MSK) Original-Received: from 98-87.nwlink.spb.ru (98-87.nwlink.spb.ru [178.252.98.87]) by smtp16.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Wwo8SZ9j-WwouPIm2; Thu, 14 Jun 2012 04:32:58 +0400 X-Yandex-Rcpt-Suid: lennart.borgman@gmail.com 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=1339633979; bh=c7oUt420XBDC5fsvwSNO+PFZ8+MRv5M1vIR84DFmy4s=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Content-Transfer-Encoding; b=ZXSicPHgkzpSuOssum30HeBzH/dP1007KeVJRosNpFewPkNv9BZV9DXY2OUDAl1xE coFshFtrXPvV61vLArH2UMJqFIMN2ZW+TC2iyM4Ey8oK/M/vvbXcT9PIZTMZf6SwaK 9U/VQ5HkfQCtfEYsqj/dTCFiU03oEpxAnqGSH1bw= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 95.108.253.143 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:150937 Archived-At: Lennart Borgman writes: > On Wed, Jun 13, 2012 at 12:37 PM, Dmitry Gutov wrote: >> >> Hi Chong, >> >>> Thanks, this looks interesting. The problem with nXhtml mode (and >>> php-mode) is that we've had a hell of a time trying to get the copyright >>> assignments to get them incorporated into Emacs, and at this point I've >>> given up. >> >> Is there a particular reason that multi-mode is not in the list? >> >> http://www.loveshack.ukfsn.org/emacs/multi-mode.el >> >> I reviewed the packages dealing with this problem recently, and this one >> looks most well-written, if probably outdated. >> And if we believe the copyright notice, copyright assignments are >> already in place. Provided it's a viable candidate, I might see what I >> can do to bring it up-to-date. > > Please see my comments about mumamo.el. It is not possible to write > something that works for all cases with the current Emacs. nXhtml > includes a rather large test-suite where you can see some of the > problems. It should be rather easy to change this test suite to run > with for example multi-mode.el. If you do that I think you will get a > better view of what works and what does not work. I'll look at the tests, thanks. > However it might not be worth the trouble. The real problem lies in > the Emacs C core. Parsing functions can currently not be stopped from > parsing things outside of the major mode chunk they belong too. > (mumamo.el goes a long way to try to address this problems as far as > possible. That makes the code quite complicated. A rewrite of the C > core makes things very simple. In addition to this rewrite of the > scheduling functions to add suitable tools for handling chunk finding > might be necessary, but that is much simpler.)=C2=A7 From what I know, mmm-mode counteracts this problem effectively enough, narrowing buffer to chunks during fontification, binding font-lock-dont-widen to t, etc. I'm also using narrowing during indentation, but some modes (like js) use (widen) in indent-line-function. It should be somewhat fixable by applying and removing syntax-table text property to text before the chunk, but may make things even slower. Anyway, you've seen the list of my immediate gripes about how MuMaMo works for ERB, and I'm inclined to fault chunk detection and indentation logic in your code rather than facilities provided by Emacs. That's not to say that some sort of built-in support wouldn't help, of course. -- Dmitry