[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indirect-region (make-indirect-buffer) breaks major-mode fontificat

From: Lennart Borgman
Subject: Re: indirect-region (make-indirect-buffer) breaks major-mode fontification
Date: Tue, 17 Nov 2009 16:13:50 +0100

On Tue, Nov 17, 2009 at 3:16 PM, senny <address@hidden> wrote:
> On 17 Nov., 15:01, Lennart Borgman <address@hidden> wrote:
>> On Tue, Nov 17, 2009 at 1:43 PM, senny <address@hidden> wrote:
>> > Hey there
>> > I am looking for a way to edit java-script and css snippets in a HTML
>> > document with their corresponding major modes. I've tried some of the
>> > multi major mode solutions but found most of them buggy and performing
>> > slowly. Recently I found the indirect-buffer feature of emacs. This is
>> > exactly what I am looking for but it somehow breaks fontification.
>> > When I clone a region into an indirect buffer the code does not get
>> > highlighted correctly.
>> > This seems only to happen when the original buffer is visible in an
>> > other window. when I only edit the indirect buffer, then fontification
>> > works as expected.
>> > Is there a workaround for this problem?
>> Perhaps try latest version of nXhtml? Which version have you tried and
>> what problems did you find. Did you report any bugs in nXhtml?
> I tried nXhtml when I used emacsW32, which was about two or three
> months ago (cant remember the exact version number of nXhtml). The
> mode felt kinda clumsy for me.

Thanks senny. Can you tell more exactly what you think is clumsy?
(nXhtml contains a lot of multi major modes and other things related
to web programming.)

> I did not report any errors because I
> didn't looked into the details, why things are not working.

But can you please tell what it was that did not work for you?

> My
> impression of nXhtml was, that it was slowing my cursor movement down
> a lot

I have made some optimisations since then (or rather removed some
mistakes). If it feels slow you can also byte compile the whole
nXhtml. (There is a menu entry in the nXhtml menu for that to make it

But of course any multi major mode solution that is dynamic and checks
for chunk boundaries while you are editing is doing a little bit more.
However I do not think you will notice it very much normally. If you
have an example where it feels slow I would be glad to know. (Please
try the latest version then.)

> and that it had some unexpected behaviours from time to time.

You mean bugs, or? Unfortunately I have no idea what you mean unless
you tell me more.

> The other thing is, that I am looking for a flexible solution, I am
> editing a lot of different template languages (jsp, esp, rhtml) and
> it would be cool to use the same solution for all these cases.

Hm. What do you mean? This exactly what nXhtml gives you, isn't it? Do
you mean that you are not looking for a flexible solution?

If you are missing some special template language then please tell me.

> Thats
> why i was heading for the "indirect-buffer" approach.

> Regards,
> Senny

reply via email to

[Prev in Thread] Current Thread [Next in Thread]