Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disabling nxml-mode

16 views
Skip to first unread message

Peter Flynn

unread,
May 7, 2011, 6:45:01 PM5/7/11
to
I just upgraded a machine to Ubuntu Natty, which installed Emacs 23.2,
which appears to open XML files in nxml-mode by default. My .emacs file says

> (autoload 'xml-mode "psgml" "Major mode to edit XML files." t )
> (setq auto-mode-alist (cons '("\\.[XxRrMmDdTt][TtMmDdSsNnEe][PpAaMmLlFfSsIi]?[EePp]*[Cc]*$" . xml-mode) auto-mode-alist))

which has been working fine for years. It looks as if Emacs 23.2 defines
xml-mode to point to nxml-mode, and this is somehow superseding my .emacs.

Unfortunately I still need to use psgml's xml-mode for all my XML stuff.
Does anyone know how I disable Emacs' new behaviour?

///Peter

Luuk

unread,
May 8, 2011, 3:24:38 PM5/8/11
to

http://lists.oasis-open.org/archives/docbook-apps/200707/msg00126.html

Is an article from someone who is switching to nxml in 2007, about 4
years ago......

I was just Googling because i want to know what nXML is, but still have
not found the answer ;)

--
Luuk

Joe Kesselman

unread,
May 8, 2011, 5:45:16 PM5/8/11
to
On 5/8/2011 3:24 PM, Luuk wrote:
> I was just Googling because i want to know what nXML is, but still have
> not found the answer ;)

nXML is a newer version of the XML syntax-annotation-and-assistance
macros for the Emacs editor.

--
Joe Kesselman,
http://www.love-song-productions.com/people/keshlam/index.html

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."

Joe Kesselman

unread,
May 8, 2011, 5:46:08 PM5/8/11
to
One site which mentions it: http://www.thaiopensource.com/nxml-mode/

Joe Kesselman

unread,
May 8, 2011, 5:46:28 PM5/8/11
to

Luuk

unread,
May 9, 2011, 2:26:28 PM5/9/11
to
On 08-05-2011 23:46, Joe Kesselman wrote:
> Another reference: http://www.emacswiki.org/emacs/NxmlMode
>
>

thanks... i will look at it, when i've found some time to do that ;)

--
Luuk

William F Hammond

unread,
May 9, 2011, 4:12:58 PM5/9/11
to
Peter Flynn <pe...@silmaril.ie> writes:

> . . . It looks as if Emacs 23.2 defines xml-mode to point to


> nxml-mode, and this is somehow superseding my .emacs.

(Really? Did you build it yourself?)

> Unfortunately I still need to use psgml's xml-mode for all my XML stuff.
> Does anyone know how I disable Emacs' new behaviour?

I'm still using 22, so I can only guess.

But I'd try starting emacs with the switch --no-site-file .
That should not block your own init file.


-- Bill

Xah Lee

unread,
May 10, 2011, 7:23:01 AM5/10/11
to

the reason it nxml-mode is loaded when u call xml-mode is probably
because there is a alias.

you can probably set it back by:

(defalias 'xml-mode 'sgml-xml-mode)

Peter wrote:
> (setq auto-mode-alist (cons '("\\.[XxRrMmDdTt][TtMmDdSsNnEe]
[PpAaMmLlFfSsIi]?[EePp]*[Cc]*$" . xml-mode) auto-mode-alist))

that seems to be pretty bad.

you probably want to use add-to-list instead of setq.
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))

also, the file suffix


"\\.[XxRrMmDdTt][TtMmDdSsNnEe][PpAaMmLlFfSsIi]?[EePp]*[Cc]*$"

seems quite wild. What is it?

nxml-mode is a new mode for xml, written by the xml expert James
Clark, who is also the original author of sgml-mode (html-mode and xml-
mode are parts of sgml-mode). nxml-mode features on-the-fly xml
validation. It's 10k lines of elisp.

the following might provide helpful info:

〈How to Install Emacs Packages〉
http://xahlee.org/emacs/emacs_installing_packages.html

〈New Features in Emacs 23〉
http://xahlee.org/emacs/emacs23_features.html

Xah

Message has been deleted

Xah Lee

unread,
May 10, 2011, 3:16:58 PM5/10/11
to

On May 10, 10:15 am, "B. T. Raven" <ni...@nihilo.net> wrote:
> Thanks for the Emacs23 new features pages. It would have been a long
> time before I found out about proced and global visual-line-mode on my own.
>
> Two questions on matters your embedded links lead to:
> 1) Why is ergoemacs not gpl licensed?

it is? am curious how you got the impression that it's not?

> 2) For kui (keyboard user interface) I use keytweak, firemacs, and
> xkeymacs on w32 desktop but on thinkpad I can't get Fn key to do duty as
> a mod key even though xev shows it as rassigned by xmodmap. Since you
> are an ergonomics maven, I was hoping you (or any-one here) might know
> whether the bottom-row keys on a thinkpad could be swapped around and
> re-arranged without resorting to kernel surgery a la Rick Van Rein's
> Funkey patch:
>
> http://rick.vanrein.org/linux/funkey/#modes
>
> Thanks again, Xah, and, in advance, if you know anything about question 2.

if i understand correctly, you are using Windows on a desktop and
linux on your thinkpad labtop. Some problem occur with the linux on
thinkpad?

i dont' think i know the answer anyway.

On Windows, you might try AutoHotkey, which i use. I have some
tutorial here:

〈Windows Programing: AutoHotkey Tutorial〉
http://xahlee.org/mswin/autohotkey.html

according to Wikipedia, there's a linux version of AutoHotkey but i
never tried.

am guessing you can't remap Fn key by software on arbitary laptop
because they are probably hardwired in non-standard ways.

thanks for mentioning keytweak
http://webpages.charter.net/krumsick/

i haven't heard of it before.

Xah

Peter Flynn

unread,
May 10, 2011, 4:42:22 PM5/10/11
to

Thanks to Jason Rumney on the emacs-nxml-mode mailing list, the solution
is to replace the autoload above with

(require 'nxml-mode)
(require 'psgml)

This works perfectly.

///Peter

Joe Kesselman

unread,
May 10, 2011, 7:02:19 PM5/10/11
to
> also, the file suffix
> "\\.[XxRrMmDdTt][TtMmDdSsNnEe][PpAaMmLlFfSsIi]?[EePp]*[Cc]*$"
> seems quite wild. What is it?

It's a regular expression which covers .xml and a heck of a lot of other
possible extensions, including many you probably didn't intend to accept
(such as .repepepec, for those whose frogs confuse flies and files).

John Bokma

unread,
May 10, 2011, 7:11:58 PM5/10/11
to
Joe Kesselman <keshlam.c...@verizon.net> writes:

>> also, the file suffix
>> "\\.[XxRrMmDdTt][TtMmDdSsNnEe][PpAaMmLlFfSsIi]?[EePp]*[Cc]*$"
>> seems quite wild. What is it?
>
> It's a regular expression which covers .xml and a heck of a lot of
> other possible extensions, including many you probably didn't intend
> to accept (such as .repepepec, for those whose frogs confuse flies and
> files).

LOL!

--
John Bokma j3b

Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/

Message has been deleted

rusi

unread,
May 11, 2011, 12:05:04 AM5/11/11
to
No idea if this works... Still
https://help.ubuntu.com/community/LaptopSpecialKeys

[Id be interested to know if it does]

Xah Lee

unread,
May 11, 2011, 12:17:10 AM5/11/11
to
On May 10, 7:03 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
> > according to Wikipedia, there's a linux version of AutoHotkey but i
> > never tried.
>
> > am guessing you can't remap Fn key by software on arbitary laptop
> > because they are probably hardwired in non-standard ways.
>
> True but xev (x events) shows them redefined and sending state
> information (downkey and upkey). I think those are the only two states
> on any mod key.

> Keytweak
> does the part of AutoHotKey that I'm interested in (substitution in w32
> registry). Most of the rest Emacs can do already and I don't want to
> introduce gratuitous complexity into an area where my understanding is
> already fragile.
>
> On my specific problem, I studied this until I was dizzy and tried
> various combo with xmodmap but with no luck:
>
> http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work

Nice. Very technical and detailed. I'll mention it when i get
questions for ThinkPad.
Thanks for the link.

That's quite a site for ThinkPad!

Xah

Peter Flynn

unread,
May 11, 2011, 4:24:50 PM5/11/11
to
On 10/05/11 12:23, Xah Lee wrote:
> also, the file suffix
> "\\.[XxRrMmDdTt][TtMmDdSsNnEe][PpAaMmLlFfSsIi]?[EePp]*[Cc]*$"
> seems quite wild. What is it?

Matches .xml and a stack of other related file extensions. Needs pruning :-)

///Peter

Message has been deleted

Tim X

unread,
May 11, 2011, 6:35:50 PM5/11/11
to
"B. T. Raven" <ni...@nihilo.net> writes:

> Thanks for the link. It's a little over my head but I'll give it a try.

Have you tried using the xev program to see what keycodes and mappings
are being used? Also worth verifying the key sequence is not being
'stolen' by the window manager etc.

Tim

--
tcross (at) rapttech dot com dot au

Message has been deleted
0 new messages