Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Disabling nxml-mode (http://www.velocityreviews.com/forums/t747940-disabling-nxml-mode.html)

Peter Flynn 05-07-2011 10:45 PM

Disabling nxml-mode
 
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 05-08-2011 07:24 PM

Re: Disabling nxml-mode
 
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

Joe Kesselman 05-08-2011 09:45 PM

Re: Disabling nxml-mode
 
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."

Joe Kesselman 05-08-2011 09:46 PM

Re: Disabling nxml-mode
 
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."

Joe Kesselman 05-08-2011 09:46 PM

Re: Disabling nxml-mode
 
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."

Luuk 05-09-2011 06:26 PM

Re: Disabling nxml-mode
 
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

Xah Lee 05-10-2011 11:23 AM

Re: Disabling nxml-mode
 

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 <pe...@silmaril.ie> 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


Peter Flynn 05-10-2011 08:42 PM

Re: Disabling nxml-mode
 
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

Joe Kesselman 05-10-2011 11:02 PM

Re: Disabling nxml-mode
 
> 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."

John Bokma 05-10-2011 11:11 PM

Re: Disabling nxml-mode
 
Joe Kesselman <keshlam.cat.nospam@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/


All times are GMT. The time now is 07:22 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.