You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I installed mmm-mode 20200705.2339 from Melpa on GNU Emacs 26.3 installed by dnf on Fedora 32, and I tried it by embedding some XML in a Python script and delimiting it for mmm-mode's "universal" class:
When I loaded this file, Emacs set the XML string to a different background but did not fontify anything (although fontify was turned on), and Emacs gave me the following message in the minibuffer:
The same thing happened when I did package-delete on mmm-mode and asked the package manager to install the older version 0.5.8 from gnu. So I tried changing the xml-mode to sgml-mode and got this:
File local-variables error: (wrong-type-argument stringp (sgml-xml-mode XML SGML))
So to make sure it wasn't some problem in my .emacs files, I tried:
with xml-mode it partially fontified the XML string, didn't fontify the surrounding Python, and still displayed the "wrong-type-argument number-or-marker-p nil" message in the minibuffer;
with sgml-mode or html-mode it completely fontified the XML string, only partially fontified the surrounding Python but didn't display any errors;
and when I installed the Melpa package again and ran:
Regarding the first example, I've pushed a fix for nxml-mode. Let's see how it goes, on the first glance it seems to be working, but since it generally expects the full control of the buffer, as well as valid XML, you'll probably encounter other cases where it causes problems. But that depends on your usage. Generally, I'd recommend sgml-mode. And when I try it here, I don't see the error you described (with Emacs 27 or 26.3).
c-mode is an old pain. I'm not able to debug it to the necessary extent, and it changes often enough to make any support broken over time. So it's unlikely to work. js-mode should, however.
Hi, I installed mmm-mode 20200705.2339 from Melpa on GNU Emacs 26.3 installed by
dnf
on Fedora 32, and I tried it by embedding some XML in a Python script and delimiting it for mmm-mode's "universal" class:When I loaded this file, Emacs set the XML string to a different background but did not fontify anything (although fontify was turned on), and Emacs gave me the following message in the minibuffer:
The same thing happened when I did
package-delete
on mmm-mode and asked the package manager to install the older version 0.5.8 from gnu. So I tried changing thexml-mode
tosgml-mode
and got this:So to make sure it wasn't some problem in my
.emacs
files, I tried:and this time:
xml-mode
it partially fontified the XML string, didn't fontify the surrounding Python, and still displayed the "wrong-type-argument number-or-marker-p nil" message in the minibuffer;sgml-mode
orhtml-mode
it completely fontified the XML string, only partially fontified the surrounding Python but didn't display any errors;and when I installed the Melpa package again and ran:
I got exactly the same result as above, for each of the 3 cases.
The same thing happened when I omitted the
-mode
part of{%xml-mode%}
etc and just wrote things like{%xml%}
.So I tried
js-mode
:and this time there was no error message, the surrounding Python was fontified, but the Javascript was not fontified.
So I tried
c-mode
:and I got the "wrong-type-argument stringp nil" error again, and fontification was incomplete.
So to try to give us some idea of where that "wrong-type-argument" message is coming from, I wrapped the call to
mmm-mode-on
in adebug-on-error
:and I got this:
which looks as if there's some bad interaction going on between the fontify code of the different modes involved. I don't know how to fix this.
The text was updated successfully, but these errors were encountered: