Re: Getting Started in Mac OS X Snow Leopard

2009-12-07 Thread Lauri Pesonen
Thanks everyone for the recommendations.

2009/12/4 Steve Purcell st...@sanityinc.com:

 Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in Emacs 
 as in other OS X apps:

  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'none)
  (setq default-input-method MacOSX)

Hmm, I've tried to avoid doing this since I'm used to Option being the
Meta key (IIRC that's the default both in Cocoa Emacs and Aquamacs).

I'm just surprised how no one seems to have a good answer for this.
I've googled for it and trawled through Stack overflow and all the
solutions are all hacks. The same issue comes up in Terminal where
in the settings you can bind Option to meta (you can then use emacsy
meta shortcuts like meta-f forward-word in the shell), but this will
again result in # not being available. Maybe switching to a US keymap
is the easiest way around this... It's just surprising to me that the
hash key, which is used in so many programming languages, is broken by
default on OS X in the UK.

 (My full emacs config tree is here: http://github.com/purcell/emacs.d)

I'll have a look. And thanks again to everyone who replied.

 -Steve

-- 
  ! Lauri

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-07 Thread Lauri Oherd
I have a Macbooc Pro with Sweden keyboard so had a little different
issues here - by default not possible to type characters {[]} on
Carbon Emacs.
I solved it by adding the following to my .emacs file:

;; paredit-mode
(add-to-list 'load-path (expand-file-name ~/.emacs.d/paredit))

(autoload 'paredit-mode paredit
  Minor mode for pseudo-structurally editing Lisp code.
  t)
(autoload 'enable-paredit-mode paredit)
(add-hook 'clojure-mode-hook'enable-paredit-mode)
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)

(when (eq system-type 'darwin)
  (eval-after-load paredit
'(progn
   (define-key paredit-mode-map (kbd M-7)
 'paredit-open-curly)
   (define-key paredit-mode-map (kbd M-8)
 'paredit-open-square)
   (define-key paredit-mode-map (kbd M-9)
 'paredit-close-square)
   (define-key paredit-mode-map (kbd M-0)
 'paredit-close-curly

Maybe the following snippet solves your issue:

(global-set-key (kbd M-3) (lambda (optional n)
  (interactive p)
  (insert-bracket 35 n)))

If you are using paredit mode and don't like this to be mapped
globally then this applies it only for buffers with paredit mode:
(define-key paredit-mode-map (kbd M-3) (lambda (optional n)
  (interactive p)
  (insert-bracket 35 n)))

Lauri

On Mon, Dec 7, 2009 at 1:15 PM, Lauri Pesonen lauri.peso...@iki.fi wrote:
 Thanks everyone for the recommendations.

 2009/12/4 Steve Purcell st...@sanityinc.com:

 Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in Emacs 
 as in other OS X apps:

  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'none)
  (setq default-input-method MacOSX)

 Hmm, I've tried to avoid doing this since I'm used to Option being the
 Meta key (IIRC that's the default both in Cocoa Emacs and Aquamacs).

 I'm just surprised how no one seems to have a good answer for this.
 I've googled for it and trawled through Stack overflow and all the
 solutions are all hacks. The same issue comes up in Terminal where
 in the settings you can bind Option to meta (you can then use emacsy
 meta shortcuts like meta-f forward-word in the shell), but this will
 again result in # not being available. Maybe switching to a US keymap
 is the easiest way around this... It's just surprising to me that the
 hash key, which is used in so many programming languages, is broken by
 default on OS X in the UK.

 (My full emacs config tree is here: http://github.com/purcell/emacs.d)

 I'll have a look. And thanks again to everyone who replied.

 -Steve

 --
  ! Lauri

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-07 Thread Lauri Oherd
Sorry, pressed send button too fast - here is correct elisp code:

(global-set-key (kbd M-3) (lambda (optional n)
  (interactive p)
  (let ((last-command-event 35))
(self-insert-command n


On Mon, Dec 7, 2009 at 4:02 PM, Lauri Oherd lauri.oh...@gmail.com wrote:
 I have a Macbooc Pro with Sweden keyboard so had a little different
 issues here - by default not possible to type characters {[]} on
 Carbon Emacs.
 I solved it by adding the following to my .emacs file:

 ;; paredit-mode
 (add-to-list 'load-path (expand-file-name ~/.emacs.d/paredit))

 (autoload 'paredit-mode paredit
  Minor mode for pseudo-structurally editing Lisp code.
  t)
 (autoload 'enable-paredit-mode paredit)
 (add-hook 'clojure-mode-hook    'enable-paredit-mode)
 (add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)

 (when (eq system-type 'darwin)
  (eval-after-load paredit
    '(progn
       (define-key paredit-mode-map (kbd M-7)
         'paredit-open-curly)
       (define-key paredit-mode-map (kbd M-8)
         'paredit-open-square)
       (define-key paredit-mode-map (kbd M-9)
         'paredit-close-square)
       (define-key paredit-mode-map (kbd M-0)
         'paredit-close-curly

 Maybe the following snippet solves your issue:

 (global-set-key (kbd M-3) (lambda (optional n)
                              (interactive p)
                              (insert-bracket 35 n)))

 If you are using paredit mode and don't like this to be mapped
 globally then this applies it only for buffers with paredit mode:
 (define-key paredit-mode-map (kbd M-3) (lambda (optional n)
                              (interactive p)
                              (insert-bracket 35 n)))

 Lauri

 On Mon, Dec 7, 2009 at 1:15 PM, Lauri Pesonen lauri.peso...@iki.fi wrote:
 Thanks everyone for the recommendations.

 2009/12/4 Steve Purcell st...@sanityinc.com:

 Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in 
 Emacs as in other OS X apps:

  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'none)
  (setq default-input-method MacOSX)

 Hmm, I've tried to avoid doing this since I'm used to Option being the
 Meta key (IIRC that's the default both in Cocoa Emacs and Aquamacs).

 I'm just surprised how no one seems to have a good answer for this.
 I've googled for it and trawled through Stack overflow and all the
 solutions are all hacks. The same issue comes up in Terminal where
 in the settings you can bind Option to meta (you can then use emacsy
 meta shortcuts like meta-f forward-word in the shell), but this will
 again result in # not being available. Maybe switching to a US keymap
 is the easiest way around this... It's just surprising to me that the
 hash key, which is used in so many programming languages, is broken by
 default on OS X in the UK.

 (My full emacs config tree is here: http://github.com/purcell/emacs.d)

 I'll have a look. And thanks again to everyone who replied.

 -Steve

 --
  ! Lauri

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-07 Thread Steve Purcell
On 7 Dec 2009, at 11:15, Lauri Pesonen wrote:
 2009/12/4 Steve Purcell st...@sanityinc.com:
 
 Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in Emacs 
 as in other OS X apps:
 
  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'none)
  (setq default-input-method MacOSX)
 
 Hmm, I've tried to avoid doing this since I'm used to Option being the
 Meta key (IIRC that's the default both in Cocoa Emacs and Aquamacs).
 
 I'm just surprised how no one seems to have a good answer for this.
 I've googled for it and trawled through Stack overflow and all the
 solutions are all hacks. The same issue comes up in Terminal where
 in the settings you can bind Option to meta (you can then use emacsy
 meta shortcuts like meta-f forward-word in the shell), but this will
 again result in # not being available. Maybe switching to a US keymap
 is the easiest way around this... It's just surprising to me that the
 hash key, which is used in so many programming languages, is broken by
 default on OS X in the UK.



That's why I always either buy US keyboards for programming, or (better) use a 
UK keyboard with a US keymap selected in OS X. Why better? Well, you get one 
extra key, and the ` and ~ chars end up in a better position, next to the left 
shift key.

But you still end up needing Option to get £ etc. in regular Cocoa 
applications, and since the OS X deadkey scheme is really nice, I value being 
able to use that scheme in Emacs above any preferences for Emacs' Meta key. 
Running Emacs in Terminal is a mess, then, as you say.

-Steve

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-05 Thread Phil Hagelberg
Andreas Pauley apau...@gmail.com writes:

 GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0)
  of 2008-09-22 on plume.sr.unh.edu - Aquamacs Distribution 1.5

 I deleted the .swank-clojure/ dir in my home directory and tried M-x
 slime again.
 It seems that this error occurs if the download fails and the .swank-
 clojure directory has already been created.

 To reproduce, create an empty .swank-clojure and do M-x slime again.

Yep; it turns out the process to clean up after a failed download only
works on Emacs 23. I strongly recommend using Emacs 23 where possible,
but I will try to fix this. Thanks for the heads-up.

-Phil

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-04 Thread Lauri Pesonen
2009/12/2 Matthew Williams matthew.d.willi...@gmail.com:
 Using the Cocoa build of Emacs 23 (http://www.emacsformacosx.com) I
 was able to get up and running extremely quickly with Technomancy's
 swank-clojure install.

This is very much off-topic, but...

How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK
keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a
mode where option-3 is interpreted as '#' rather than a meta-3 which
takes care of my problem, but I haven't figured out how to do the same
thing in the Cocoa build.

So at the moment I'm using Aquamacs because of this, but I'd really
like to use the Cocoa build, because it's plain old emacs without
all the customisations that Aquamacs has.

Oh, and another nice Aquamacs feature that I haven't found on the
Cocoa build is fullscreen editing (shift-cmd-enter).

-- 
  ! Lauri

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-04 Thread mccraigmccraig
use the u.s. keyboard map. #/£ is the only difference [i've yet discovered]

Lauri Pesonen wrote:
 2009/12/2 Matthew Williamsmatthew.d.willi...@gmail.com:
 Using the Cocoa build of Emacs 23 (http://www.emacsformacosx.com) I
 was able to get up and running extremely quickly with Technomancy's
 swank-clojure install.

 This is very much off-topic, but...

 How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK
 keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a
 mode where option-3 is interpreted as '#' rather than a meta-3 which
 takes care of my problem, but I haven't figured out how to do the same
 thing in the Cocoa build.

 So at the moment I'm using Aquamacs because of this, but I'd really
 like to use the Cocoa build, because it's plain old emacs without
 all the customisations that Aquamacs has.

 Oh, and another nice Aquamacs feature that I haven't found on the
 Cocoa build is fullscreen editing (shift-cmd-enter).


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-04 Thread Andreas Pauley


On Dec 4, 3:37 am, Phil Hagelberg p...@hagelb.org wrote:
 So this is a problem with the auto-download of Clojure jars that
 swank-clojure attempts. It looks like it's having trouble downloading
 and is unable to clean up after itself, but I can't reproduce it. What
 version of Emacs are you using?

GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll
bars)
 of 2008-05-02 on king, modified by Ubuntu

However, I've managed to get it working on my Mac using both:
GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2009-08-16 on black.local

and

GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0)
 of 2008-09-22 on plume.sr.unh.edu - Aquamacs Distribution 1.5

I deleted the .swank-clojure/ dir in my home directory and tried M-x
slime again.
It seems that this error occurs if the download fails and the .swank-
clojure directory has already been created.

To reproduce, create an empty .swank-clojure and do M-x slime again.

The error Wrong number of arguments: delete-directory, 2 occured
only on my Ubuntu Hardy desktop.
Maybe because it has the oldest version of the 3 emacsen.


 Note that this method of using slime is really only intended for quick
 experimentation. The other methods (#2 and #3) of using slime detailed
 athttp://technomancy.us/swank-clojureshould still work fine and are
 generally more commonly used.

Thanks, I think I'll try method 2.

Regards,
Andreas Pauley

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-04 Thread John Harrop
On Fri, Dec 4, 2009 at 4:41 AM, Lauri Pesonen lauri.peso...@iki.fi wrote:

 2009/12/2 Matthew Williams matthew.d.willi...@gmail.com:
  Using the Cocoa build of Emacs 23 (http://www.emacsformacosx.com) I
  was able to get up and running extremely quickly with Technomancy's
  swank-clojure install.

 This is very much off-topic, but...

 How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK
 keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a
 mode where option-3 is interpreted as '#' rather than a meta-3 which
 takes care of my problem, but I haven't figured out how to do the same
 thing in the Cocoa build.


I don't suppose binding meta-3 to self-insert works?

If not, find out if there's an elisp way to get a character by ASCII code or
similarly. The # symbol is ASCII 35. Then find what elisp code is used to
insert a specific character by ASCII code, and bind meta-3 to something you
code up that inserts ASCII 35.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Getting Started in Mac OS X Snow Leopard

2009-12-04 Thread Steve Purcell
On 4 Dec 2009, at 09:41, Lauri Pesonen wrote:

 How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK
 keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a
 mode where option-3 is interpreted as '#' rather than a meta-3 which
 takes care of my problem, but I haven't figured out how to do the same
 thing in the Cocoa build.


Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in Emacs as 
in other OS X apps:

  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier 'none)
  (setq default-input-method MacOSX)

With those settings, option-3 should give you '#' on your UK keyboard, and 
option-e-e would give you é, for example.

(My full emacs config tree is here: http://github.com/purcell/emacs.d)

-Steve

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-04 Thread Andreas Pauley


On Dec 3, 7:45 pm, christophe mckeon gonzalez de leon
chromatoph...@gmail.com wrote:
 you might want to try watching peepcode's emacs video.
 he suggests using the carbon emacs port. i'm not sure
 if i'll be going with that or with the plain terminal version,
 i'm just getting acquainted with emacs myself.

Thanks, I just bought both the Emacs and Clojure screencasts :-)

Andreas

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-04 Thread Charras
That was the same problem it gave me. When I follow those steps.

Since you already install some stuff, what I did was erase the
~/.emcas.d/ folder (rm -r ~/.emacs.d) and the ~/src/ folder (I don't
remember what, but something got installed there form clojure, and
that was the only thing I had there, that's why I could just erase the
whole folder), and ~/.emacs. So basically to install it, I un-install
all the stuff that did work how I expected.

After this I follow this steps:

1. Install emacs from here: http://emacsformacosx.com/
2. Install Elpa in emacs, following the instructions from:
http://tromey.com/elpa/install.html
3. Install swank-clojure using ELPA: M-x package-list-packages, typing
i next to swank-clojure (http://technomancy.us/swank-clojure)
4. Than just do M-x slime. At this point it will say that clojure is
not install, and ask if you want to install it, just say yes. This
will do the rest. It will download and install for you all you need.
Slime, Clojure, etc.

Once you do this it should work. It worked for me.

Once you do the installation using steps 1, 2 and 3, you'll have a new
~/.emacs, ~/.emacs.d. Notice that if you have Aquamacs install your ~/
Library/Preferences/Aquamacs\ Emacs/Preferences.el will not work,
since you have a ~/.emacs, so in order to use Aquamacs and use it with
out problems, you have to edit your ~/.emacs file, just put ; at the
beginning of each line you don't want to be consider. By the way, your
~/Library/Preferences/Aquamacs\ Emacs/customizations.el might be
change, and have some lines that say that where included by Elpa, I
erase those lines as well, so I would suggest to do that.

Hope this helps. Good luck Andreas.

Guido

On Dec 3, 9:35 am, Andreas Pauley apau...@gmail.com wrote:
 Hi all,

 I followed the above swank-clojure instructions using bothAquamacs
 and the plain emacs for Mac OS X on my Leopard Macbook.
 I also tried it on an Ubuntu (Hardy) desktop.

 In all of these cases the process fails when slime tries to connect to
 the Lisp interpreter.

 Just to be explicit, here are the steps I followed (using Linux this
 time):
 1. Install ELPA usinghttp://tromey.com/elpa/install.html(No
 problems)
 2. Install clojure-mode using M-x package-list-packages, typing i next
 to clojure-mode, and then x
 There were a few warnings with this step, but clojure-mode seems to be
 working afterwards.

 3. Install swank-clojure using M-x package-list-packages, typing i
 next to swank-clojure, and then x
 There were quite a few warnings with this step.
 (If I don't install clojure-mode explicitly before swank-clojure, this
 step ends with an error)

 4. M-x slime, answer yes when asking to install Clojure. This ends
 with an error:

 It looks like Clojure is not installed. Install now? (y or n)
 Loading url...done
 Loading url-auth...done
 Contacting host: repo.technomancy.us:80
 Loading url-cache...done
 Loading mail-utils...done
 Reading [text/plain]... 571k of 571k (100%)
 Loading arc-mode...done
 Parsing archive file...done.
 Saving file /home/andreas/.swank-clojure/swank-clojure-1.0.jar...
 Wrote /home/andreas/.swank-clojure/swank-clojure-1.0.jar
 byte-code: Wrong number of arguments: delete-directory, 2

 Further attempts at M-x slime produces the following error, which is
 probably expected since there is no clojure jar in my home dir, just
 the swank clojure jar.
 The error:
 (require
 'swank.swank)

 (swank.swank/ignore-protocol-version
 nil)

 (swank.swank/start-server /tmp/slime.31171 :encoding iso-latin-1-
 unix)

 Exception in thread main java.lang.NoClassDefFoundError: clojure/
 main
 Caused by: java.lang.ClassNotFoundException:
 clojure.main
         at java.net.URLClassLoader$1.run(URLClassLoader.java:
 217)
         at java.security.AccessController.doPrivileged(Native
 Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:
 205)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:
 323)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
 294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:
 268)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
 336)
 Could not find the main class: clojure.main. Program will
 exit.

 Process inferior-lisp exited abnormally with code
 1

 On my mac I have a working clojure which I can play with using jline.
 I've just never been able to get slime and Clojure going.

 Any tips?

 Thanks,
 Andreas

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-03 Thread Andreas Pauley
Hi all,

I followed the above swank-clojure instructions using both Aquamacs
and the plain emacs for Mac OS X on my Leopard Macbook.
I also tried it on an Ubuntu (Hardy) desktop.

In all of these cases the process fails when slime tries to connect to
the Lisp interpreter.

Just to be explicit, here are the steps I followed (using Linux this
time):
1. Install ELPA using http://tromey.com/elpa/install.html (No
problems)
2. Install clojure-mode using M-x package-list-packages, typing i next
to clojure-mode, and then x
There were a few warnings with this step, but clojure-mode seems to be
working afterwards.

3. Install swank-clojure using M-x package-list-packages, typing i
next to swank-clojure, and then x
There were quite a few warnings with this step.
(If I don't install clojure-mode explicitly before swank-clojure, this
step ends with an error)

4. M-x slime, answer yes when asking to install Clojure. This ends
with an error:

It looks like Clojure is not installed. Install now? (y or n)
Loading url...done
Loading url-auth...done
Contacting host: repo.technomancy.us:80
Loading url-cache...done
Loading mail-utils...done
Reading [text/plain]... 571k of 571k (100%)
Loading arc-mode...done
Parsing archive file...done.
Saving file /home/andreas/.swank-clojure/swank-clojure-1.0.jar...
Wrote /home/andreas/.swank-clojure/swank-clojure-1.0.jar
byte-code: Wrong number of arguments: delete-directory, 2

Further attempts at M-x slime produces the following error, which is
probably expected since there is no clojure jar in my home dir, just
the swank clojure jar.
The error:
(require
'swank.swank)

(swank.swank/ignore-protocol-version
nil)

(swank.swank/start-server /tmp/slime.31171 :encoding iso-latin-1-
unix)

Exception in thread main java.lang.NoClassDefFoundError: clojure/
main
Caused by: java.lang.ClassNotFoundException:
clojure.main
at java.net.URLClassLoader$1.run(URLClassLoader.java:
217)
at java.security.AccessController.doPrivileged(Native
Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:
205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:
323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:
268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
336)
Could not find the main class: clojure.main. Program will
exit.

Process inferior-lisp exited abnormally with code
1

On my mac I have a working clojure which I can play with using jline.
I've just never been able to get slime and Clojure going.

Any tips?

Thanks,
Andreas

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-03 Thread christophe mckeon gonzalez de leon
you might want to try watching peepcode's emacs video.
he suggests using the carbon emacs port. i'm not sure
if i'll be going with that or with the plain terminal version,
i'm just getting acquainted with emacs myself.

http://www.apple.com/downloads/macosx/unix_open_source/carbonemacspackage.html

he also recommends the emacs starter kit which contains elpa
and some other goodies.

http://github.com/technomancy/emacs-starter-kit/

the starter kit instructions also recommend carbon emacs on mac
and they walk through getting it everything set up.

best of luck,
_c

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-03 Thread Phil Hagelberg
Andreas Pauley apau...@gmail.com writes:

 It looks like Clojure is not installed. Install now? (y or n)
 Loading url...done
 Loading url-auth...done
 Contacting host: repo.technomancy.us:80
 Loading url-cache...done
 Loading mail-utils...done
 Reading [text/plain]... 571k of 571k (100%)
 Loading arc-mode...done
 Parsing archive file...done.
 Saving file /home/andreas/.swank-clojure/swank-clojure-1.0.jar...
 Wrote /home/andreas/.swank-clojure/swank-clojure-1.0.jar
 byte-code: Wrong number of arguments: delete-directory, 2

So this is a problem with the auto-download of Clojure jars that
swank-clojure attempts. It looks like it's having trouble downloading
and is unable to clean up after itself, but I can't reproduce it. What
version of Emacs are you using?

Note that this method of using slime is really only intended for quick
experimentation. The other methods (#2 and #3) of using slime detailed
at http://technomancy.us/swank-clojure should still work fine and are
generally more commonly used.

-Phil

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-02 Thread Charras
Matthew;

Thank you! Now I'm being able to program with Clojure. This was the
route I should have use from the begging. Aquamacs is not very
suitable for ELPA installations. Anyone who wants to use Clojure in
Emacs, in a Mac OS X computer should follow this instructions. It's
very easy.

Guido

On Dec 2, 1:42 pm, Matthew Williams matthew.d.willi...@gmail.com
wrote:
 Using the Cocoa build of Emacs 23 (http://www.emacsformacosx.com) I
 was able to get up and running extremely quickly with Technomancy's
 swank-clojure install.

 http://technomancy.us/swank-clojure

 After just a few minutes I was in the REPL and ready to go.

 Good luck!

 On Nov 30, 8:32 pm, Charras guido.carba...@gmail.com wrote:



  Hello;

  I already install Clojure using MacPorts, and I can use it with clj.
  But the environment is not what I will like. I'm trying to set up
  clojure, so I can use it inAquamacs. I already download the clojure-
  mode.el, in there says that I can install it using ELPA, but I don't
  know how to install ELPA inaquamacs.

  Please, if someone can help me to setup clojure, in my Mac, and be
  able to use it, withAquamacs, I'll appreciated very much.

  Regards!

  Guido

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Charras
Hello;

I already install Clojure using MacPorts, and I can use it with clj.
But the environment is not what I will like. I'm trying to set up
clojure, so I can use it in Aquamacs. I already download the clojure-
mode.el, in there says that I can install it using ELPA, but I don't
know how to install ELPA in aquamacs.

Please, if someone can help me to setup clojure, in my Mac, and be
able to use it, with Aquamacs, I'll appreciated very much.

Regards!

Guido

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Charras
Steve, I already try to follow does instructions. I copied the text
into the *scratch* buffer, and did control j (C-j), but nothing
happen, it just move the cursos to the next line. Do you know how can
I make Aquamacs eval the *scratch* buffer? 'Cause I think that's my
problem.

Guido

On Dec 1, 7:19 am, Steve Purcell st...@sanityinc.com wrote:
 Theinstallationpage for ELPA tells you how to install ELPA itself and to show 
 a list of installable packages:http://tromey.com/elpa/install.html

 That should work fine in Aquamacs.

 When you've got as far as the package list, press 'i' next to the clojure 
 entry, then x. These steps should get you a working clojure-mode.

 As far as hooking clojure-mode up to a working clojureinstallationgoes, I'd 
 suggest skipping your MacPortsinstallationand running M-x clojure-install.

 -Steve

 On 1 Dec 2009, at 06:32, Charras wrote:

  Hello;

  I already install Clojure using MacPorts, and I can use it with clj.
  But the environment is not what I will like. I'm trying to set up
  clojure, so I can use it in Aquamacs. I already download the clojure-
  mode.el, in there says that I can install it using ELPA, but I don't
  know how to install ELPA in aquamacs.

  Please, if someone can help me to setup clojure, in myMac, and be
  able to use it, with Aquamacs, I'll appreciated very much.

  Regards!

  Guido

  --
  You received this message because you are subscribed to the Google
  Groups Clojure group.
  To post to this group, send email to clojure@googlegroups.com
  Note that posts from new members are moderated - please be patient with 
  your first post.
  To unsubscribe from this group, send email to
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread David Nolen
http://tromey.com/elpa/install.html

Just follow the instructions here.

They are pretty clear.

David

On Tue, Dec 1, 2009 at 5:30 PM, Charras guido.carba...@gmail.com wrote:

 David;

 My problem is that I haven't been able to install the clojure-mode.
 What I read is that this is done using ELPA, but that means that I
 need to install ELPA as well, and this make things even worse, now I
 have two things that I can't install.

 Do you have a different way to do this? If so, please send a dummies
 type instruction list.

 Guido

 On Dec 1, 4:03 pm, David Nolen dnolen.li...@gmail.com wrote:
  On Tue, Dec 1, 2009 at 3:59 PM, Charras guido.carba...@gmail.com
 wrote:
   Steve, I already try to follow does instructions. I copied the text
   into the *scratch* buffer, and did control j (C-j), but nothing
   happen, it just move the cursos to the next line. Do you know how can
   I make Aquamacs eval the *scratch* buffer? 'Cause I think that's my
   problem.
   Guido
 
  You can eval the scratch buffer but you'll only be eval'ing elisp.
 
  Make a new buffer called foo.clj. Clojure mode should be loaded here, if
  not, clojure-mode is not properly intalled. M-x slime to start a repl.
 Now
  if you are at the end of a sexpr C-x C-e should send it to the REPL.
 
  Hope that works for you.
 
  David
 
 
 
   On Dec 1, 7:19 am, Steve Purcell st...@sanityinc.com wrote:
Theinstallationpage for ELPA tells you how to install ELPA itself and
 to
   show a list of installable packages:
 http://tromey.com/elpa/install.html
 
That should work fine in Aquamacs.
 
When you've got as far as the package list, press 'i' next to the
 clojure
   entry, then x. These steps should get you a working clojure-mode.
 
As far as hooking clojure-mode up to a working
 clojureinstallationgoes,
   I'd suggest skipping your MacPortsinstallationand running M-x
   clojure-install.
 
-Steve
 
On 1 Dec 2009, at 06:32, Charras wrote:
 
 Hello;
 
 I already install Clojure using MacPorts, and I can use it with
 clj.
 But the environment is not what I will like. I'm trying to set up
 clojure, so I can use it in Aquamacs. I already download the
 clojure-
 mode.el, in there says that I can install it using ELPA, but I
 don't
 know how to install ELPA in aquamacs.
 
 Please, if someone can help me to setup clojure, in myMac, and be
 able to use it, with Aquamacs, I'll appreciated very much.
 
 Regards!
 
 Guido
 
 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient
 with
   your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.comclojure%2bunsubscr...@googlegroups.com
 clojure%2bunsubscr...@googlegroups.comclojure%252bunsubscr...@googlegroups.com
 
 For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
 
   --
   You received this message because you are subscribed to the Google
   Groups Clojure group.
   To post to this group, send email to clojure@googlegroups.com
   Note that posts from new members are moderated - please be patient with
   your first post.
   To unsubscribe from this group, send email to
   clojure+unsubscr...@googlegroups.comclojure%2bunsubscr...@googlegroups.com
 clojure%2bunsubscr...@googlegroups.comclojure%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.comclojure%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Jason
in Aquamacs try coping the code on the ELPA install page and then
eval'ing with C-x-e

(hold down control key, then type x key and then e key)

On Dec 1, 2:30 pm, Charras guido.carba...@gmail.com wrote:
 David;

 My problem is that I haven't been able to install the clojure-mode.
 What I read is that this is done using ELPA, but that means that I
 need to install ELPA as well, and this make things even worse, now I
 have two things that I can't install.

 Do you have a different way to do this? If so, please send a dummies
 type instruction list.

 Guido

 On Dec 1, 4:03 pm, David Nolen dnolen.li...@gmail.com wrote:



  On Tue, Dec 1, 2009 at 3:59 PM, Charras guido.carba...@gmail.com wrote:
   Steve, I already try to follow does instructions. I copied the text
   into the *scratch* buffer, and did control j (C-j), but nothing
   happen, it just move the cursos to the next line. Do you know how can
   I make Aquamacs eval the *scratch* buffer? 'Cause I think that's my
   problem.
   Guido

  You can eval the scratch buffer but you'll only be eval'ing elisp.

  Make a new buffer called foo.clj. Clojure mode should be loaded here, if
  not, clojure-mode is not properly intalled. M-x slime to start a repl. Now
  if you are at the end of a sexpr C-x C-e should send it to the REPL.

  Hope that works for you.

  David

   On Dec 1, 7:19 am, Steve Purcell st...@sanityinc.com wrote:
Theinstallationpage for ELPA tells you how to install ELPA itself and to
   show a list of installable packages:http://tromey.com/elpa/install.html

That should work fine in Aquamacs.

When you've got as far as the package list, press 'i' next to the 
clojure
   entry, then x. These steps should get you a working clojure-mode.

As far as hooking clojure-mode up to a working clojureinstallationgoes,
   I'd suggest skipping your MacPortsinstallationand running M-x
   clojure-install.

-Steve

On 1 Dec 2009, at 06:32, Charras wrote:

 Hello;

 I already install Clojure using MacPorts, and I can use it with clj.
 But the environment is not what I will like. I'm trying to set up
 clojure, so I can use it in Aquamacs. I already download the clojure-
 mode.el, in there says that I can install it using ELPA, but I don't
 know how to install ELPA in aquamacs.

 Please, if someone can help me to setup clojure, in myMac, and be
 able to use it, with Aquamacs, I'll appreciated very much.

 Regards!

 Guido

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient 
 with
   your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.comclojure%2bunsubscr...@googlegroups.com
  
 For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

   --
   You received this message because you are subscribed to the Google
   Groups Clojure group.
   To post to this group, send email to clojure@googlegroups.com
   Note that posts from new members are moderated - please be patient with
   your first post.
   To unsubscribe from this group, send email to
   clojure+unsubscr...@googlegroups.comclojure%2bunsubscr...@googlegroups.com

   For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting Started in Mac OS X Snow Leopard

2009-12-01 Thread Giancarlo Angulo
I also had trouble installing elpa

I went the more roundabout route.


What I did was download clojuremode.el
here:
http://github.com/technomancy/clojure-mode

I got this code snippet

(add-to-list 'load-path ~/clojure/clojure-mode)
 (setq inferior-lisp-program clj)
 (require 'clojure-mode)
 (setq auto-mode-alist
 (cons '(\\.clj$ . clojure-mode)
 auto-mode-alist))

 (add-hook 'clojure-mode-hook
 '(lambda ()
 (define-key clojure-mode-map \C-c\C-e 'lisp-eval-last-sexp)))


from here:
http://paulbarry.com/articles/2008/07/02/getting-started-with-clojure-and-aquamacs

put it in your *customizations.el* file
found in

 ~/Library/Preferences/Aquamacs Emacs/

put

then I believed I restarted aquamacs, out of habit, don't think I needed to.

then,
M-x clojure-install (I don't remember but I think if you haven't installed
git you have to..)

follow the prompts

I'm not sure how properly I did things but whatever works.

Hope this helps.


=
angol
=
-|-^...@^_^, =|+^_^X++~_~,@-
The only thing worse than a hopeless romantic is a hopeful one
Magbasa bago Mamuna. Mag-isip bago mambatikos
Without Truth there is no Justice, Without Justice, there is Tyranny
Semper fi
Proof of Desire is Pursuit
www.onthe8spot.com
http://www.facebook.com/giancarlo.angulo
http://twitter.com/Neoryder
09173822367


On Tue, Dec 1, 2009 at 2:32 PM, Charras guido.carba...@gmail.com wrote:

 Hello;

 I already install Clojure using MacPorts, and I can use it with clj.
 But the environment is not what I will like. I'm trying to set up
 clojure, so I can use it in Aquamacs. I already download the clojure-
 mode.el, in there says that I can install it using ELPA, but I don't
 know how to install ELPA in aquamacs.

 Please, if someone can help me to setup clojure, in my Mac, and be
 able to use it, with Aquamacs, I'll appreciated very much.

 Regards!

 Guido

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.comclojure%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en