all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* can't find library nxml-mode.el
@ 2011-06-05  2:23 pablo platt
  2011-06-08  8:02 ` Andreas Röhler
  0 siblings, 1 reply; 3+ messages in thread
From: pablo platt @ 2011-06-05  2:23 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

Hi

I'm using the emacs 23.2 package on ubuntu 11.04
I'm trying to use mxml + actionscript mode using MuMaMo as explained here:
http://transfinite.wordpress.com/2009/04/24/multiple-modes-for-mxml-and-actionscript-in-emacs/

When trying to use TAB inside an .mxml file I'm getting an error:
emacs can't find library /usr/share/emacs/23.2/lisp/nxml/nxml-mode.el
I don't see nxml-mode.el in that path but I do see nxml-mode.elc
I've copied the nxml-mode.el file from the emacs source and the error
disappeared.

I'm new to emacs so I don't know if this is a bug in emacs, one of the
packages or my configuration.
Please see below the way I setup emacs.

Thanks

In ~/.emacs.d/ I've included the actionscript-mode from here
http://austin.pettomato.com/actionscript-mode.el
and nxhtml from
http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html

My .emacs file looks like this:

(load "~/.emacs.d/nxhtml/autostart.el")

(load-file "~/.emacs.d/actionscript-mode.el")
(autoload 'actionscript-mode "javascript" nil t)
(add-to-list 'auto-mode-alist '("\\.as\\'" . actionscript-mode))

(defun mumamo-chunk-mxml-script (pos min max)
"Find ... , return range and actionscript-mode."
(mumamo-quick-static-chunk pos min max "<Script>" "</Script>" nil
'actionscript-mode nil))

(define-mumamo-multi-major-mode mxml-actionscript-mumamo-mode
"Turn on multiple major modes for MXML files with main mode `nxml-mode'.
This covers inlined Actionscript."
("MXML Actionscript Family" nxml-mode
(mumamo-chunk-mxml-script
)))

(add-to-list 'auto-mode-alist '("\\.mxml$" . mxml-actionscript-mumamo))

[-- Attachment #2: Type: text/html, Size: 2153 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: can't find library nxml-mode.el
  2011-06-05  2:23 can't find library nxml-mode.el pablo platt
@ 2011-06-08  8:02 ` Andreas Röhler
  2011-06-08 14:46   ` PJ Weisberg
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Röhler @ 2011-06-08  8:02 UTC (permalink / raw)
  To: help-gnu-emacs

Am 05.06.2011 04:23, schrieb pablo platt:
> Hi
>
> I'm using the emacs 23.2 package on ubuntu 11.04
> I'm trying to use mxml + actionscript mode using MuMaMo as explained here:
> http://transfinite.wordpress.com/2009/04/24/multiple-modes-for-mxml-and-actionscript-in-emacs/
>
> When trying to use TAB inside an .mxml file I'm getting an error:
> emacs can't find library /usr/share/emacs/23.2/lisp/nxml/nxml-mode.el
> I don't see nxml-mode.el in that path but I do see nxml-mode.elc
> I've copied the nxml-mode.el file from the emacs source and the error
> disappeared.


Hi,


thanks pointing at that.

Think it's just an error in your configuration,

As nxml-mode is installed already, there is no need to load this file.

Just do M-x nxml-mode resp. (require 'nxml-mode)

BTW Emacs doesn't see this file because it's zipped probably.

Should exist as "nxml-mode.el.gz"

In cases, you want to install some new stuff,
AFAIU the recommended way to add mode-files is adding it's directory to 
Eamcs' load-path and afterwards require it:

(add-to-list 'load-path "MODE-DIRECTORY")
(require 'MY_NEW_MODE')


Andreas

--
https://code.launchpad.net/~a-roehler/python-mode/components-python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/


>
> I'm new to emacs so I don't know if this is a bug in emacs, one of the
> packages or my configuration.
> Please see below the way I setup emacs.
>
> Thanks
>
> In ~/.emacs.d/ I've included the actionscript-mode from here
> http://austin.pettomato.com/actionscript-mode.el
> and nxhtml from
> http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
>
> My .emacs file looks like this:
>
> (load "~/.emacs.d/nxhtml/autostart.el")
>
> (load-file "~/.emacs.d/actionscript-mode.el")
> (autoload 'actionscript-mode "javascript" nil t)
> (add-to-list 'auto-mode-alist '("\\.as\\'" . actionscript-mode))
>
> (defun mumamo-chunk-mxml-script (pos min max)
> "Find ... , return range and actionscript-mode."
> (mumamo-quick-static-chunk pos min max "<Script>""</Script>" nil
> 'actionscript-mode nil))
>
> (define-mumamo-multi-major-mode mxml-actionscript-mumamo-mode
> "Turn on multiple major modes for MXML files with main mode `nxml-mode'.
> This covers inlined Actionscript."
> ("MXML Actionscript Family" nxml-mode
> (mumamo-chunk-mxml-script
> )))
>
> (add-to-list 'auto-mode-alist '("\\.mxml$" . mxml-actionscript-mumamo))
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: can't find library nxml-mode.el
  2011-06-08  8:02 ` Andreas Röhler
@ 2011-06-08 14:46   ` PJ Weisberg
  0 siblings, 0 replies; 3+ messages in thread
From: PJ Weisberg @ 2011-06-08 14:46 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: help-gnu-emacs@gnu.org

On Wednesday, June 8, 2011, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:

> BTW Emacs doesn't see this file because it's zipped probably.
>
> Should exist as "nxml-mode.el.gz"

Debian (and presumably Ubuntu) distributes the compressed .el files in
a separate package, so it may not be there.  The .elc file should be
sufficient, though.

Presumably some code is doing something like (load "nxml-mode.el")
when it should be doing (require 'nxml-mode).

-- 

-PJ



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-08 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-05  2:23 can't find library nxml-mode.el pablo platt
2011-06-08  8:02 ` Andreas Röhler
2011-06-08 14:46   ` PJ Weisberg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.