From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: indirect-region (make-indirect-buffer) breaks major-mode fontification Date: Wed, 18 Nov 2009 14:30:54 +0100 Message-ID: References: <61136d02-7d49-4b29-82e4-3d970cb55175@m38g2000yqd.googlegroups.com> <453D5202-26FA-4AE5-9AC6-1F4973C42A9B@gmail.com> <58207d59-3528-4ee7-b8a7-b3f2f1f3e14a@r24g2000yqd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258551243 23924 80.91.229.12 (18 Nov 2009 13:34:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2009 13:34:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: senny Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 18 14:33:56 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAkfT-0006nE-Bi for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Nov 2009 14:33:55 +0100 Original-Received: from localhost ([127.0.0.1]:48630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAkfS-0008Ip-Q5 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Nov 2009 08:33:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAkcz-00075L-PP for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:31:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAkct-00073p-TW for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:31:20 -0500 Original-Received: from [199.232.76.173] (port=52779 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAkct-00073h-Ms for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:31:15 -0500 Original-Received: from mail-yw0-f194.google.com ([209.85.211.194]:56741) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAkct-0000t6-94 for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 08:31:15 -0500 Original-Received: by ywh32 with SMTP id 32so1633957ywh.14 for ; Wed, 18 Nov 2009 05:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=UZuWk4I/lXmFSGM+z8he97UoJhyohDeTEIygeAdOjlw=; b=TXidOzdMQkMvKGswLXuBUGAgXxovyC/v9JG91THnTsPEqCY0YUBg4ts8eCltCE1anb X1kKepEPWoNUAvDm38bP/5PT/tg4aID1Yw1jpLM41/BnQ0GAPVctAxsee3X3xVzfdwgq YVfzfSI8A3Tv8eUNN+tHCCWrQ2HlIM3f1sLx8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=HUmFzK3KpZrVg9To/HLoXvTBB1VbtXbzYzDpnoXXn305OtkvCWXl8cuueFZRJ9ocPR zJzfCIhT92Lne76D6mu9UnCSH0iwRRYAIrzPUd+P6WwzGPqL/A1MxyR84InP7epq7OaU YpqOlY3SDdehZX0l766bR+jrZN785CzrFXQmQ= Original-Received: by 10.100.24.18 with SMTP id 18mr110064anx.31.1258551074124; Wed, 18 Nov 2009 05:31:14 -0800 (PST) In-Reply-To: <58207d59-3528-4ee7-b8a7-b3f2f1f3e14a@r24g2000yqd.googlegroups.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69874 Archived-At: On Wed, Nov 18, 2009 at 8:54 AM, senny wrote: > >> > After that discussion I think I will give nXhtml an other shot. When I= got some spare >> > time I will look more into nXhtml and will send you my thoughts. >> >> Ok, there is a new beta now at >> >> =C2=A0http://ourcomments.org/Emacs/DL/elisp/nxhtml/beta/ >> >> This has support for server side javascript. Just do >> >> =C2=A0 M-x ssjs-html-mumamo-mode >> >> to turn it on. > Hey Lennart Hi Senny, > I just played around with the nxhtml beta you uploaded. The > highlighting seems to work good and the cursor movement relay has been > increased. After just a few minutes using the mode I've got some > complaints tough. Thanks for testing. > =C2=A0- When I scroll through pages (using scroll-down and scroll-up) the > performance is poor It is a bit slower the first time you scroll, since syntax coloring has to be handled a bit differently. Normally Emacs tries to guess what to do. It does not check everything from the beginning of the file before coloring the syntax. It looks a little bit backwards and tries to guess how to color the syntax. That is good for many reasons, for example scrolling will be faster. However when there are multiple major modes in different parts of the buffer a bit more have to be done. It has to know what major mode (ie programming language) there is in the part it is going to put syntax color on. You may think that the same stategy as above can be used and all that is needed is to look back a little bit. This was how it worked before in nXhtml. It is faster, but unfortunately it often does not work. There were a lot of complaints about this. So now nXhtml (or rather MuMaMo, part of nXhtml) looks from the beginning just to decide what major mode to use. Actually it have to be rather carefully when searching for the this. MuMaMo caches this information. The first time you scroll through a piece of the file it may be slow, but after that it will be faster. Maybe I should explain this somewhere, but it is a bit hard to know where. > =C2=A0- When I call (cleanup-buffer =3D> starterkit function to indent, > untabify and trailing whitespace removal) > =C2=A0 =C2=A0It takes like 6 seconds to clean the buffer where nxml mode = takes > around half a second. Is this for the example you sent me? That sounds a bit strange. Can you please send me a copy of cleanup-buffer so I can see what it does? Can you perhaps also try this in a fresh Emacs with just nXhtm loaded + just the function cleanup-buffer. To start a fresh Emacs with just nXhtml you can do M-x emacs-Q-nxthml > =C2=A0- There were still some indentation bugs Yes, that is likeley, those are a bit hard. If you tell me more about what you have seen it might be possible to fix them. > =C2=A0- The mode tried to validate the page all the time, which takes > about a second and blocks emacs Validation should of course not block Emacs, but if that happens it is probably due to some interaction with the multi major mode. Unfortunately the integration of parsers (like the one from nxml-mode) can not be done very well without rewriting the parsers at the moment. (I have some ideas for how to do this, but some very deep changes in Emacs are necessary for them.) It might be better for you to use it without the parse (but then XHTML completion disappears too). You can do that by selecting a multi major mode which have "html" in its name instead of "nxhtml", for example: M-x html-mumamo-mode > I tried everything with the following page: www.postfinance.ch Thanks. I have tried that too and I works quite good for me (despite my old= pc). I am using latest CVS Emacs (not yet released). What version of Emacs are you using? Is there perhaps something special in your .emacs (or some other startup fi= le)? > Regards, > Senny