I am looking for a good online resource to get started with Lisp from
scratch.
I use emacs where the .emacs file is written in Lisp. For example I have
declared a variable:
(setq mylisp "~/work/mylisp/")
which is the path to some .el files.
Now I would like to use the variable mylisp in:
;; Line numbers
(load-file (cons mylisp "setnu.el" ))
(global-set-key "\C-cl" 'setnu-mode)
where setnu.el is in the ~/work/mylisp/ dir. But it gives an error.
On Sat, 23 Feb 2008 13:05:24 +0100, saneman wrote:
> I am looking for a good online resource to get started with Lisp from
> scratch.
>
> I use emacs where the .emacs file is written in Lisp. For example I have
> declared a variable:
>
> (setq mylisp "~/work/mylisp/")
>
> which is the path to some .el files.
>
> Now I would like to use the variable mylisp in:
>
> ;; Line numbers
> (load-file (cons mylisp "setnu.el" )) (global-set-key "\C-cl"
> 'setnu-mode)
>
> where setnu.el is in the ~/work/mylisp/ dir. But it gives an error.
Just to let you know (this might be obvious already), you are writing in
elisp. This is a dialect of lisp, which is different from Common Lisp,
the main focus of this channel.
Things you'll notice immediately are that it has a slightly different set
of standard functions and (relevantly here) has a different way of
handling pathnames --- in CL, "~" won't do what you want.
If you're looking for more specific help with elisp, you'll probably get
more joy in gnu.emacs.help (which also has lots of posters) than here.
Rupert
Hi,
saneman <·······@asd.com> writes:
> I am looking for a good online resource to get started with Lisp from
> scratch.
>
> I use emacs where the .emacs file is written in Lisp. For example I
> have declared a variable:
>
> (setq mylisp "~/work/mylisp/")
>
> which is the path to some .el files.
>
> Now I would like to use the variable mylisp in:
>
> ;; Line numbers
> (load-file (cons mylisp "setnu.el" ))
> (global-set-key "\C-cl" 'setnu-mode)
>
> where setnu.el is in the ~/work/mylisp/ dir. But it gives an error.
Press C-x C-e behind the (cons mylisp "setnu.el") form and see that it
does not what you want. After that, have a look at CONCAT (C-h f concat
RET).
But for loading, better use
(add-to-list 'load-path "~/work/mylisp")
(require 'setnu) ; or (load "setnu")
...
HTH,
Hannes
saneman <·······@asd.com> writes:
> I am looking for a good online resource to get started with Lisp from
> scratch.
>
> I use emacs where the .emacs file is written in Lisp. For example I
> have declared a variable:
>
> (setq mylisp "~/work/mylisp/")
>
> which is the path to some .el files.
>
> Now I would like to use the variable mylisp in:
>
> ;; Line numbers
> (load-file (cons mylisp "setnu.el" ))
> (global-set-key "\C-cl" 'setnu-mode)
>
> where setnu.el is in the ~/work/mylisp/ dir. But it gives an error.
irc://irc.freenode.org/#emacs
news:gnu.emacs.help
http://www.emacswiki.org/
http://www.gnu.org/software/emacs/manual/html_mono/emacs.html
http://www.gnu.org/software/emacs/emacs-faq.text
http://www.gnu.org/software/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
http://www.gnu.org/software/emacs/manual/html_mono/elisp.html
--
__Google__
http://www.google.com/
Google escribi�:
> saneman <·······@asd.com> writes:
>
>> I am looking for a good online resource to get started with Lisp from
>> scratch.
>>
>> I use emacs where the .emacs file is written in Lisp. For example I
>> have declared a variable:
>>
>> (setq mylisp "~/work/mylisp/")
>>
>> which is the path to some .el files.
>>
>> Now I would like to use the variable mylisp in:
>>
>> ;; Line numbers
>> (load-file (cons mylisp "setnu.el" ))
>> (global-set-key "\C-cl" 'setnu-mode)
>>
>> where setnu.el is in the ~/work/mylisp/ dir. But it gives an error.
>
> irc://irc.freenode.org/#emacs
> news:gnu.emacs.help
> http://www.emacswiki.org/
> http://www.gnu.org/software/emacs/manual/html_mono/emacs.html
> http://www.gnu.org/software/emacs/emacs-faq.text
> http://www.gnu.org/software/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
> http://www.gnu.org/software/emacs/manual/html_mono/elisp.html
>
For a brief moment I believed Google finally gained conciousness. Then I
looked at the header.
Nice one. :)
Leandro