all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: senny <yves.senn@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: indirect-region (make-indirect-buffer) breaks major-mode  fontification
Date: Wed, 18 Nov 2009 05:52:02 -0800 (PST)	[thread overview]
Message-ID: <9be07ac3-7eca-4417-8766-6cf9430ad4a2@l2g2000yqd.googlegroups.com> (raw)
In-Reply-To: mailman.10965.1258551083.2239.help-gnu-emacs@gnu.org

On 18 Nov., 14:30, Lennart Borgman <lennart.borg...@gmail.com> wrote:
> On Wed, Nov 18, 2009 at 8:54 AM, senny <yves.s...@gmail.com> 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
>
> >>  http://ourcomments.org/Emacs/DL/elisp/nxhtml/beta/
>
> >> This has support for server side javascript. Just do
>
> >>   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.
>
> >  - 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.
>
> >  - When I call (cleanup-buffer => starterkit function to indent,
> > untabify and trailing whitespace removal)
> >    It 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
>
> >  - 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.
>
> >  - 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 file)?
>
> > Regards,
> > Senny

This discussion is probably not the right place to start a discussion
about nXhtml
features and bugs. You should probably name me a place where we can go
into
detail about the bugs I have with nXhtml mode.
To conclude: I am still looking for a fontification fix with the
"indirect" buffer
approach. All the fuzz i just had with one page and nXhtml shows me,
that I am better
served with a quick and dirty solution. I need things to work fast and
work as expected.
Of course there could be conflicts with nXhtml and my .emacs
configuration (which
has grown fairly large and is available here: http://github.com/senny/emacs-configs)
but I don't have the time to dig into nXhtml and figure out how
everything works.

Thanks for your assistance and the fast feedback.


  parent reply	other threads:[~2009-11-18 13:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 12:43 indirect-region (make-indirect-buffer) breaks major-mode fontification senny
2009-11-17 14:01 ` Lennart Borgman
     [not found] ` <mailman.10887.1258466524.2239.help-gnu-emacs@gnu.org>
2009-11-17 14:16   ` senny
2009-11-17 14:20     ` Joost Kremers
2009-11-17 14:40       ` senny
2009-11-17 15:13     ` Lennart Borgman
     [not found]       ` <ADEECBBC-DEC5-45E1-9A56-C8877DA04F7C@gmail.com>
     [not found]         ` <e01d8a50911171135g288b67dfk8bcc6d15812a994c@mail.gmail.com>
     [not found]           ` <453D5202-26FA-4AE5-9AC6-1F4973C42A9B@gmail.com>
2009-11-17 20:28             ` Lennart Borgman
     [not found]             ` <mailman.10926.1258489768.2239.help-gnu-emacs@gnu.org>
2009-11-18  7:54               ` senny
2009-11-18 13:30                 ` Lennart Borgman
     [not found]                 ` <mailman.10965.1258551083.2239.help-gnu-emacs@gnu.org>
2009-11-18 13:52                   ` senny [this message]
2009-11-18 15:44                     ` Lennart Borgman
2009-11-18 16:38                       ` Lennart Borgman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9be07ac3-7eca-4417-8766-6cf9430ad4a2@l2g2000yqd.googlegroups.com \
    --to=yves.senn@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.