since a few weeks I have some serious problem, while using emacs for webdevelopement. I use (and would like to in future) nxhtml-mode. It seems that this mode (or the underlying nxml-mode) causes emacs to consume 100 % cpu-power - at least after a while. I can not spotify the exact reason for this; in some cases it seem to be caused be validation. Emacs says MEM FULL! (mode line), freezes and there's no other way as to kill the process.
I setup a separate .emacs-webdev to use emacs for webdevelopement without allmost any of my extensions/configuration, which I usually use. This did work for a while, but as I had a crash today, it seems, that it can happen anytime.
There might be some side effects concerning one or the other extension but I have no clue how I can find out whats going on. It could also be caused by some bug in nxhml/nxhtml-mode but I can not find any information on the web, which seems to backup this.
I already filed a bug report at launchpad (which admittedly is based on a very poor information base, as I do not know how to securely reproduce the misbehaviour); also my posting at stackoverflow [2] was not crowned with success.
Currently I use emacs 23.2.1 on Linux Mint 11. The last version of nxml-mode I used is 20041004.
Any tips about that? How can I possibly find out, what emacs causes to do that?
> since a few weeks I have some serious problem, while using emacs for
> webdevelopement. I use (and would like to in future) nxhtml-mode. It seems that
> this mode (or the underlying nxml-mode) causes emacs to consume 100 % cpu-power
> - at least after a while. I can not spotify the exact reason for this; in some
> cases it seem to be caused be validation. Emacs says MEM FULL! (mode line),
> freezes and there's no other way as to kill the process.
> ...
I can't help you with nxhtml-mode, but if you describe what exact
features from it you're using, people here might suggest some
alternatives.
nxml-mode, by the way, is considered fairly stable, so if you don't need anything additional, you can use it alone.
Dmitry Gutov <dgu...@yandex.ru> writes:
>> since a few weeks I have some serious problem, while using emacs for
>> webdevelopement. I use (and would like to in future) nxhtml-mode. It > seems that
>> this mode (or the underlying nxml-mode) causes emacs to consume 100
>> % > cpu-power
>> - at least after a while. I can not spotify the exact reason for > this; in some
>> cases it seem to be caused be validation. Emacs says MEM FULL! (mode > line),
>> freezes and there's no other way as to kill the process.
>> ...
Have you tried disabling validation.
If your XML file has no newlines then Emacs will choke.
IIRC, validation happens under the control of timer. Try increasing it.
--
> I can't help you with nxhtml-mode, but if you describe what exact
> features from it you're using, people here might suggest some
> alternatives.
Mostly I am working with xhtml mixed with php, and css-mode. I found that the indentation is the best of all modes, especially when working with xhtml with php chunks. I offen use the option to find/mark matching elements.
> nxml-mode, by the way, is considered fairly stable, so if you don't need
> anything additional, you can use it alone.
well yes, that's what I did. It seemed to work, although I started to add some modes/extensions I offen use, such as anything and elscreen as well as the stuff lots of people have in their dot-emacs (matching parentheses aso.). At some point I again had this strange memory overflow. I admit, I haven't had the patience to find out, whether it is nxhtml crashes itself at some point or this is a side effect of nxhtml and some other mode. As I said, I am not able to reprocuce it consistantly. I only have the assumption, that it takes some time until the crash occurs.
Thanks a lot for the input.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> since a few weeks I have some serious problem, while using emacs for
>>> webdevelopement. I use (and would like to in future) nxhtml-mode. It
>> seems that
>>> this mode (or the underlying nxml-mode) causes emacs to consume 100
>>> %
>> cpu-power
>>> - at least after a while. I can not spotify the exact reason for
>> this; in some
>>> cases it seem to be caused be validation. Emacs says MEM FULL! (mode
>> line),
>>> freezes and there's no other way as to kill the process.
>>> ...
> Have you tried disabling validation.
I tried to do that over the menu, but did not find the responsible variable to disable it completely.
> If your XML file has no newlines then Emacs will choke.
This is to say: at the EOF?
> IIRC, validation happens under the control of timer. Try increasing it.
Do you know, how to do this? I assume, it is a variable of nxml-mode, right?
Thanks
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Butz <m...@mkblog.org> writes:
> Am 26.08.2012 18:01, schrieb Jambunathan K:
>> >> since a few weeks I have some serious problem, while using emacs for
>>>> webdevelopement. I use (and would like to in future) nxhtml-mode. It
>>> seems that
>>>> this mode (or the underlying nxml-mode) causes emacs to consume 100
>>>> %
>>> cpu-power
>>>> - at least after a while. I can not spotify the exact reason for
>>> this; in some
>>>> cases it seem to be caused be validation. Emacs says MEM FULL! (mode
>>> line),
>>>> freezes and there's no other way as to kill the process.
>>>> ...
>> Have you tried disabling validation.
> I tried to do that over the menu, but did not find the responsible
> variable to disable it completely.
M-x apropos-variable RET validate RET
,----
| Type RET on an entry to view its full documentation.
| | rng-nxml-auto-validate-flag
| Non-nil means automatically turn on validation with nxml-mode.
| rng-validate-chunk-size
| Number of characters in a RELAX NG validation chunk.
| rng-validate-delay
| Time in seconds that Emacs must be idle before starting a full
| validation.
| rng-validate-quick-delay
| Time in seconds that Emacs must be idle before starting a quick
| validation.
`----
>> If your XML file has no newlines then Emacs will choke.
> Am 26.08.2012 18:01, schrieb Jambunathan K:
>> Have you tried disabling validation.
>
> I tried to do that over the menu, but did not find the responsible variable to
> disable it completely.
If you're going to disable validation, you might want to look into just
using html-mode instead of nxml-mode. It has commands for moving to
matching tags, too:
Jambunathan K <kjambunat...@gmail.com> writes:
> Martin Butz <m...@mkblog.org> writes:
>> Am 26.08.2012 18:01, schrieb Jambunathan K:
>>> >> since a few weeks I have some serious problem, while using emacs for
>>>>> webdevelopement. I use (and would like to in future) nxhtml-mode. It
>>>> seems that
>>>>> this mode (or the underlying nxml-mode) causes emacs to consume 100
>>>>> %
>>>> cpu-power
>>>>> - at least after a while. I can not spotify the exact reason for
>>>> this; in some
>>>>> cases it seem to be caused be validation. Emacs says MEM FULL! (mode
>>>> line),
>>>>> freezes and there's no other way as to kill the process.
>>>>> ...
>>> Have you tried disabling validation.
>> I tried to do that over the menu, but did not find the responsible
>> variable to disable it completely.
> M-x apropos-variable RET validate RET
> ,----
> | Type RET on an entry to view its full documentation.
> | > | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
>>> If your XML file has no newlines then Emacs will choke.
>>> IIRC, validation happens under the control of timer. Try increasing it.
>> Do you know, how to do this? I assume, it is a variable of nxml-mode, right?
> See above options.
> ps: I haven't used nxhtml-mode
I've tried most methods for mixed mode.
nxhtml is really the only mode for mixed mode programming that even
begins to be useful. I tend to find most other recommendations are done
by people who are not using mixed mode at all. Regradless how the
purists see mixed mode files (try mentioning PHP even in #emacs) , they
are very common. php and html/css/javascript in one file is not
unusual. Emacs addressing this "natively" would be a real boon.
Unfortunately nxhrml doesnt seem to be maintained anymore, or?
Certainly in trunk emacs 24 using nxthml produces loads of popup error
buffers. I emailed the author but got no response.
Dmitry Gutov <dgu...@yandex.ru> writes:
> Martin Butz <m...@mkblog.org> writes:
>> Am 26.08.2012 18:01, schrieb Jambunathan K:
>>> Have you tried disabling validation.
>> I tried to do that over the menu, but did not find the responsible > variable to
>> disable it completely.
> If you're going to disable validation, you might want to look into just
> using html-mode instead of nxml-mode. It has commands for moving to
> matching tags, too:
html-mode is useless, give or take, for mixed mode files.
> IIRC nxhtml should also have a multi-mode for PHP that is based on
> html-mode.
nxhtml ships with its own php mode and is one of the main reasons for
its development from what I can gather. It has come along a long way and
is very useful when it works properly.
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ,----
> | Type RET on an entry to view its full documentation.
> |
> | rng-nxml-auto-validate-flag
> | Non-nil means automatically turn on validation with nxml-mode.
> | rng-validate-chunk-size
> | Number of characters in a RELAX NG validation chunk.
> | rng-validate-delay
> | Time in seconds that Emacs must be idle before starting a full
> | validation.
> | rng-validate-quick-delay
> | Time in seconds that Emacs must be idle before starting a quick
> | validation.
> `----
Thanks. I'll give it a try.
Martin
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, m...@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~