From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: web-mode.el Date: Sat, 16 Jun 2012 15:30:10 +0200 Message-ID: References: <4FD9F40C.90406@yandex.ru> <4FDAAADA.1030609@yandex.ru> <4FDC87D9.3080704@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1339853457 23765 80.91.229.3 (16 Jun 2012 13:30:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2012 13:30:57 +0000 (UTC) Cc: cyd@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 16 15:30:56 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 1Sft5a-0000hv-CK for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2012 15:30:54 +0200 Original-Received: from localhost ([::1]:60809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sft5a-0003UX-BT for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2012 09:30:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sft5V-0003UK-Ko for emacs-devel@gnu.org; Sat, 16 Jun 2012 09:30:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sft5T-0007Ko-R5 for emacs-devel@gnu.org; Sat, 16 Jun 2012 09:30:49 -0400 Original-Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:37463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sft5P-0007KU-Vz; Sat, 16 Jun 2012 09:30:44 -0400 Original-Received: by lahi5 with SMTP id i5so3142141lah.0 for ; Sat, 16 Jun 2012 06:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=zq3NlhYjGNp4vRtYhxLqPusHFNPcH4DJl90Fc6mdgeQ=; b=p066bxoOngyGcT8eCIF7wTbIXyvRzJpbMO1gheNgIo+AQgzepbcYpitHnp0Z+bn2QV +UuPJRDR3pwoeCVp0Eg+vMj+fKiuO4mSiGM9201A6dK3JsJdk8LgwWrqQRPkXsOOpRLh uzQQNLKczIK9+vg2qQZ9tKAS9Ng/3x2Znznkqm4C9pocRsqJCJP2vUnGyW9hPDTJTb58 GYN6BdwksmmVYXd/RU8ofW+wZl+t5zubVgrOL1R2oMyKKrhU09QzM7fC/oSvkWxY3il9 o/As1pMj5qqomUFVbS5yZTBrBO7YHnoyYwdsPxjkTIOwrMZ7Fi0XBbqCwoWWX8ogGjg4 EZ3w== Original-Received: by 10.112.83.229 with SMTP id t5mr3932407lby.8.1339853440785; Sat, 16 Jun 2012 06:30:40 -0700 (PDT) Original-Received: by 10.112.41.99 with HTTP; Sat, 16 Jun 2012 06:30:10 -0700 (PDT) In-Reply-To: <4FDC87D9.3080704@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.41 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:150973 Archived-At: On Sat, Jun 16, 2012 at 3:19 PM, Dmitry Gutov wrote: > On 16.06.2012 5:43, Lennart Borgman wrote: >> > > 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. I see. Yes, that was my proposal. I imagined something like I mentioned in a previous example i. e.: (with-chunks chunk-list ... here you lie... ) >>> 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. The reason you may need it is that for example chunks at a deeper level may have html code in them. They may be writing html code. MuMaMo tries to make it possible to fontify and indent this html code separately then. > 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. That is because it is a full parser. I think we will see more such examples now that CEDET is finally inside Emacs. >>> 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. Yes, I was trying to answer that. The reason it fails is because nxml-mode (like js2-mode) contains a full parser. I have been thinking that rewriting it is very difficult, but maybe Stefan's proposal (the change to "syntax-ppss") is a rather easy road.