Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Disabling nxml-mode

Reply
Thread Tools

Disabling nxml-mode

 
 
Peter Flynn
Guest
Posts: n/a
 
      05-07-2011
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
 
Reply With Quote
 
 
 
 
Luuk
Guest
Posts: n/a
 
      05-08-2011
On 08-05-2011 00:45, Peter Flynn wrote:
> 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


http://lists.oasis-open.org/archives.../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
 
Reply With Quote
 
 
 
 
Joe Kesselman
Guest
Posts: n/a
 
      05-08-2011
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...lam/index.html

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
 
Reply With Quote
 
Joe Kesselman
Guest
Posts: n/a
 
      05-08-2011
One site which mentions it: http://www.thaiopensource.com/nxml-mode/

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

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
 
Reply With Quote
 
Joe Kesselman
Guest
Posts: n/a
 
      05-08-2011
Another reference: http://www.emacswiki.org/emacs/NxmlMode


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

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
 
Reply With Quote
 
Luuk
Guest
Posts: n/a
 
      05-09-2011
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
 
Reply With Quote
 
Xah Lee
Guest
Posts: n/a
 
      05-10-2011

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

On May 7, 3:45*pm, Peter Flynn <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
Peter Flynn
Guest
Posts: n/a
 
      05-10-2011
On 07/05/11 23:45, Peter Flynn wrote:
> 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?


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
 
Reply With Quote
 
Joe Kesselman
Guest
Posts: n/a
 
      05-10-2011
> 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).


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

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
 
Reply With Quote
 
John Bokma
Guest
Posts: n/a
 
      05-10-2011
Joe Kesselman <(E-Mail Removed)> 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic disabling of wireless connection while connected to wired net: howto? Chu Wireless Networking 2 09-27-2005 12:54 AM
Disabling SSID on Linksys WRT54GS router. Cannot disable ssid pattyjamas@hotmail.com Wireless Networking 6 08-18-2005 02:27 PM
Disabling XP firewall Geoff Wireless Networking 4 04-05-2005 02:16 PM
Disabling wireless acces on a domain =?Utf-8?B?am9obl9iYWdlcg==?= Wireless Networking 1 01-12-2005 11:54 PM
disabling html in messages Juha Pekka Lepparanta Firefox 1 10-27-2003 01:05 AM



Advertisments