[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nxhtml-mode from OurComments.org
From: |
Sébastien Vauban |
Subject: |
Re: nxhtml-mode from OurComments.org |
Date: |
Mon, 09 Jun 2008 09:28:29 +0200 |
User-agent: |
Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) |
Hi Lennart,
>>> I try to use `nxhtml-mode' from OurComments.org, but I
>>> constantly get errors -- within GNU Emacs 23, both on Ubuntu
>>> 8.04 and on Windows -- such as this one:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> Debugger entered--Lisp error: (wrong-type-argument integerp (0 . 8))
>>> aset(#^[nil #^[nil #^[... nil syntax-table #^^[3 0 ...
>>> require(css-mode)
>> ...
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> The code I put in my `.emacs' file follows, though, what's in
>>> the readme...
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> ;; load nxhtml
>>> (when (load
>>> "~/Media/Download/emacs/site-lisp/nxml-1.32-20080601/autostart.el")
>>>
>>> ;; always skip the nXhtml welcome message
>>> (setq nxhtml-skip-welcome t))
>>> --8<---------------cut here---------------end--------------->8---
>
> That seems ok.
>
>> Any idea?
>
> Yes:
>
> 1) Try starting from
>
> emacs -Q
> M-x load-file RET (file above) RET
That works with no problem... Good for you, bad for me? ;-)
> 2) Please send an example file
I can do it, if really needed, but -- in fact -- there is no
point in sending one, as the problem occurs at the loading of
`nxhtml', not when I load a `.xhtml' file...
>> If there is, what you probably need to do is make sure your
>> locally installed one appears in the load-path before the
>> once bundled with emacs.
>
> So you should not do this.
That's, though, more or less what I do, as I'm building my
`load-path'...
--8<---------------cut here---------------start------------->8---
;; load-path enhancement
(defun my-add-to-load-path (this-directory &optional with-subdirs recursive)
"Add THIS-DIRECTORY at the beginning of the load-path, if it exists.
Add all its subdirectories not starting with a '.' if the
optional argument WITH-SUBDIRS is not nil.
Do it recursively if the third argument is not nil."
(when this-directory
(when (file-directory-p this-directory)
(let* ((this-directory (expand-file-name this-directory))
(files (directory-files this-directory t "^[^\\.]")))
;; completely canonicalize the directory name (*may not* begin with `~')
(while (not (string= this-directory (expand-file-name this-directory)))
(setq this-directory (expand-file-name this-directory)))
(message "Adding `%s' to load-path..." this-directory)
(add-to-list 'load-path this-directory)
(if with-subdirs
(progn
(while files
(setq dir-or-file (car files))
(when (file-directory-p dir-or-file)
(if recursive
(my-add-to-load-path dir-or-file 'with-subdirs)
(my-add-to-load-path dir-or-file)))
(setq files (cdr files)))))))))
--8<---------------cut here---------------end--------------->8---
... in this order ...
--8<---------------cut here---------------start------------->8---
;; The most important directories are the last!
;; 1.
(defvar distro-site-lisp-directory
(concat (or (getenv "SHARE")
"/usr/share") "/emacs/site-lisp/")
"Name of directory where additional Emacs goodies Lisp files (from the
distro optional packages) reside.")
(my-add-to-load-path distro-site-lisp-directory
'with-subdirs)
;; 2.
(defvar local-site-lisp-directory
(concat (or (getenv "LOCAL_SHARE")
"~/Media/Download") "/emacs/site-lisp/")
"Name of directory where additional Emacs goodies Lisp files (from the
Internet) reside.")
(my-add-to-load-path local-site-lisp-directory
'with-subdirs 'recursive)
;; 3.
(defvar my-site-lisp-directory "~/emacs/site-lisp/"
"Name of directory where my personal additional Emacs Lisp files reside.")
(my-add-to-load-path my-site-lisp-directory
'with-subdirs)
--8<---------------cut here---------------end--------------->8---
... resulting in the following `load-path', slightly edited to
make it readable...
,----
| ("/home/sva/emacs/site-lisp/"
| [...]
| "/home/sva/Media/Download/emacs/site-lisp/yasnippet-0.4.0"
| "/home/sva/Media/Download/emacs/site-lisp/w3-cvs/lisp"
| "/home/sva/Media/Download/emacs/site-lisp/w3-cvs"
| "/home/sva/Media/Download/emacs/site-lisp/trunk/tests"
| "/home/sva/Media/Download/emacs/site-lisp/trunk/src"
| "/home/sva/Media/Download/emacs/site-lisp/trunk/scripts"
| "/home/sva/Media/Download/emacs/site-lisp/trunk/lisp"
| "/home/sva/Media/Download/emacs/site-lisp/trunk/gdtoa"
| "/home/sva/Media/Download/emacs/site-lisp/trunk/docs"
| "/home/sva/Media/Download/emacs/site-lisp/trunk/contrib"
| "/home/sva/Media/Download/emacs/site-lisp/trunk"
| "/home/sva/Media/Download/emacs/site-lisp/predictive/latex"
| "/home/sva/Media/Download/emacs/site-lisp/predictive"
| "/home/sva/Media/Download/emacs/site-lisp/org-6.03/lisp"
| "/home/sva/Media/Download/emacs/site-lisp/org-6.03"
| "/home/sva/Media/Download/emacs/site-lisp/nxml-1.32-20080601/zipped-utils"
| "/home/sva/Media/Download/emacs/site-lisp/nxml-1.32-20080601/util"
| "/home/sva/Media/Download/emacs/site-lisp/nxml-1.32-20080601/related"
|
"/home/sva/Media/Download/emacs/site-lisp/nxml-1.32-20080601/nxml-mode-20041004"
| "/home/sva/Media/Download/emacs/site-lisp/nxml-1.32-20080601/nxhtml"
| "/home/sva/Media/Download/emacs/site-lisp/nxml-1.32-20080601/etc"
| "/home/sva/Media/Download/emacs/site-lisp/nxml-1.32-20080601"
| [...]
| "/usr/share/emacs/site-lisp/dictionaries-common"
| "/usr/share/emacs/site-lisp/"
| "/usr/share/emacs/23.0.60/site-lisp/auctex"
| "/usr/share/emacs-snapshot/site-lisp/auctex"
| "/usr/share/emacs/site-lisp/auctex"
| "/etc/emacs-snapshot"
| "/etc/emacs"
| "/usr/local/share/emacs/23.0.60/site-lisp"
| "/usr/local/share/emacs/site-lisp"
| "/usr/share/emacs/23.0.60/site-lisp"
| "/usr/share/emacs/site-lisp"
| "/usr/share/emacs/23.0.60/lisp"
| "/usr/share/emacs/23.0.60/lisp/url"
| "/usr/share/emacs/23.0.60/lisp/textmodes"
| "/usr/share/emacs/23.0.60/lisp/progmodes"
| "/usr/share/emacs/23.0.60/lisp/play"
| "/usr/share/emacs/23.0.60/lisp/org"
| "/usr/share/emacs/23.0.60/lisp/obsolete"
| "/usr/share/emacs/23.0.60/lisp/nxml"
| [...])
`----
Is that the problem?
Best regards,
Seb
--
Sébastien Vauban
Message not available
- Re: nxhtml-mode from OurComments.org,
Sébastien Vauban <=