emacs - how to wean me off the family of Java IDEs

1,291 views
Skip to first unread message

Colin Yates

unread,
Jan 16, 2013, 9:29:36 AM1/16/13
to clo...@googlegroups.com
Hi all,

After 15 off years of using IDEs I am making the jump into Emacs.  I have read http://dev.clojure.org/display/doc/Getting+Started+with+Emacs and https://github.com/technomancy/emacs-starter-kit and I am just at the point where I have stopped yelling at paredit and starting to appreciate its point.

My current major stumbling block though is navigating my project.  Whilst (I expect) the density and sane namespacing capabilities of Clojure to significantly reduce the number of files, that isn't true of everything.  In particular, ExtJS encourages you to follow the "one file per class".  You don't have to but eventually you will have more than a handful of files regardless.  

So my questions:
 - is there a decent project explorer.  I really miss the "tree on the left, editor on the right" layout
 - is there a decent JS and clojure autocompletion aware plugin
 - other than paredit, nrepl and clojure-mode (and the excellent coffee-mode for coffeescript), what other plugins should I install

Thanks all.

Col

P.S>  Please don't turn this into a flame war :)

Alex Ott

unread,
Jan 16, 2013, 9:33:30 AM1/16/13
to clo...@googlegroups.com
you can install autocomplete package (available via package.el on
MELPA) - it will provide dictionary based name completion for JS
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



--
With best wishes, Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott

Charlie Griefer

unread,
Jan 16, 2013, 9:42:39 AM1/16/13
to clo...@googlegroups.com
Hi Colin:

No real answers, but I wanted to chime in to say that I'm in the same spot. I had been putting off using Emacs until I felt I was "ready", but then came to realize that the choice to use Emacs is like the choice to have kids. If you wait until you're "ready", you'll never do it.

This is week 2 and it's definitely getting better, altho truth be told it wasn't nearly as bad last week as I expected it would be. Been working on the desktop with a cheat sheet constantly open on my laptop next to me.

I also miss the project explorer. I'm used to working with multiple files at once, having them open in tabs, and being able to easily switch back and forth between any of them. I've definitely found that to be a bit jarring in Emacs, but trust that at some point I'll get used to the "Emacs way" versus trying to find a plugin to provide a project explorer. I have to remind myself that all of the files that I'm working with are there, they're just not immediately visible. M-x B will let me go thru the list of files open in buffers, even if those buffers aren't visible. It's different, but that's where the trust comes in :)

The biggest issue I find with the lack of a project explorer is when I don't know what directory a particular file is in. Emacs provides great autocompletion when you're navigating to a particular file in the minibuffer, but that presumes you know exactly where the file is. 

I suppose there's always the option of opening a dired buffer (M-x dired) or even a shell (M-x shell). That's still not as "easy" or visual as a directory tree, but I think the big issue is that Emacs is really all about keeping your hands on the (proper) keys. A shell at least lets you continue to type your way around your directory structure to locate a file. A directory tree/project explorer would likely require grabbing the mouse and clicking down into various directories. It's what we're used to, yes… but it's not really, um… idiomatic Emacs :D

--
Charlie Griefer

"Give light, and the darkness will disappear of itself." 
-- Desiderius Erasmus

Colin Yates

unread,
Jan 16, 2013, 10:01:51 AM1/16/13
to clo...@googlegroups.com
Thanks Alex.

Charlie - I hear you.  You are right to (very gently) point out that I should embrace new idioms.  Boy it is hard though :).  I have to say that I too found it much less of a shock then I thought.  I am very familiar with Linux and shell scripts so I had that skillset already which I think helps the with the paradigm shift.

I accept your (implicit) challenge - let's continue without a project explorer :)


Jay Fields

unread,
Jan 16, 2013, 10:24:03 AM1/16/13
to clo...@googlegroups.com
emacs-live is a pretty great starting point. It's the
'whole-kitchen-sink', but it's great for finding out what you don't
know.

emacs-rocks videos are good (and short)

I also put off learning it until late last year, and I'm not
completely converted. I *love* it and would be very unhappy if I
didn't have it.

I missed the project explorer at first, until I figured out that I can
C-x C-f and just start typing, and emacs will fuzzy match what I might
be looking for, including files in directories other than current.

Marko Topolnik

unread,
Jan 16, 2013, 10:29:31 AM1/16/13
to clo...@googlegroups.com

I missed the project explorer at first, until I figured out that I can
C-x C-f and just start typing, and emacs will fuzzy match what I might
be looking for, including files in directories other than current.

This function is contributed by some package and is not the default, at least in 23. I think it was TextMate-mode, but not sure anymore because I removed it. It makes it very hard to create a new file with C-x C-f.

Charlie Griefer

unread,
Jan 16, 2013, 10:38:59 AM1/16/13
to clo...@googlegroups.com
I'm starting off with 24, so not sure what was default in 23… but C-x C-f in 24 lets you fuzzy match to a particular directory, then type a file name. The minibuffer alerts you to the fact that there's no match, but you simply hit return, then return again to confirm, and the new file is created.

Not sure if it's possible via C-x C-f to create a new directory, but new file works pretty well.

Feng Shen

unread,
Jan 16, 2013, 10:46:51 AM1/16/13
to clo...@googlegroups.com
Hi:

   I use  Everything  to find files in project.  Just type a part of the name, all files filter by your typing  listed for you to choose from.  Something like Eclipse's
   Ctrl +Shift + R (or Command + Shift + R on mac) . But you need some time to set it up.  Here is my config for your reference.

   rainbow-delimiters is helpful for my lisp coding.

larry google groups

unread,
Jan 16, 2013, 11:09:05 AM1/16/13
to Clojure
Regarding the explorer, I keep several "frames" open (a "frame" is the
word that Emacs uses for "window" -- I keep several windows open) and
in one of those windows I'll keep my bookmarks (a bookmark is an alias
you can use in Emacs to jump to any location in any file).

But I also feel that Emacs is old. I donated to LightTable on
Kickstarter and I have high hopes for it. Hopefully by the end of this
year LightTable will be strong enough that I can make the switch.



On 16 Sty, 09:29, Colin Yates <colin.ya...@gmail.com> wrote:
> Hi all,
>
> After 15 off years of using IDEs I am making the jump into Emacs.  I have
> readhttp://dev.clojure.org/display/doc/Getting+Started+with+Emacs
> andhttps://github.com/technomancy/emacs-starter-kitand I am just at the

Stefan Kamphausen

unread,
Jan 16, 2013, 11:30:53 AM1/16/13
to clo...@googlegroups.com
Just a few things, you might find interesting

* anything/helm: http://www.emacswiki.org/Anything
* speedbar (used that in my early years; got rid of it eventually)
* mtorus: http://www.emacswiki.org/emacs/MTorus (shameless self-plug)
* M-. on functions
* M-x ffap
* iswitchb-buffer (just keep the buffers open)
* Spend some months testing all the buffer cycling options listed at http://emacswiki.org/emacs/CategoryBufferSwitching
* M-x dabbrev-expand (I bind that to Shift-Space)
* Keep an eye on the recent changes at emacswiki.org.  Every now and then you will find something interesting there.

Cheers,
Stefan

Marko Topolnik

unread,
Jan 16, 2013, 11:32:03 AM1/16/13
to clo...@googlegroups.com

I'm starting off with 24, so not sure what was default in 23… but C-x C-f in 24 lets you fuzzy match to a particular directory, then type a file name. The minibuffer alerts you to the fact that there's no match, but you simply hit return, then return again to confirm, and the new file is created.

Trouble begins when it does fuzzy-match your new file name :) I ran into this when working on a Ruby project, might be less of an issue with Clojure.

Colin Yates

unread,
Jan 16, 2013, 11:32:40 AM1/16/13
to clo...@googlegroups.com
Thanks all.  LightTable does look awesome and I haven't invested enough time to fully get to grips with it yet, but I am not sure it would be an upgrade for me (wow - I am really going with the flame bait today!).  Coming from IntelliJ, which is a pretty fantastic general (i.e. Java, scala, clojure, Javascript) editor to Emacs (which is an even better general purpose editor) to a Clojure specific editor is a step backwards.

To be explicit, I marvel at the engineering behind LightTable, my concern is it might be too focused and not general enough.


Amirouche Boubekki

unread,
Jan 16, 2013, 11:33:35 AM1/16/13
to clo...@googlegroups.com
Great! emacs is my favorite editor, I used it for many years now except for Java dev because I'm too lazy to configure intelli-sens... In the following there is all I *use* in emacs and which make you ready to use emacs - as I am - daily. 

I use emacs 24 and the following only needs a vanilla emacs install and there is nothing specific to Clojure.

C is Ctrl
M is Meta (Alt)

C-x means Ctrl+X...
C-x b means Ctrl+X then b
 
My current major stumbling block though is navigating my project.  Whilst (I expect) the density and sane namespacing capabilities of Clojure to significantly reduce the number of files, that isn't true of everything.  In particular, ExtJS encourages you to follow the "one file per class".  You don't have to but eventually you will have more than a handful of files regardless.  

So my questions:
 - is there a decent project explorer.  I really miss the "tree on the left, editor on the right" layout

speedbar: «C-X speedbar» 

It's in vanilla emacs 24, it does also file/class explorer, but I don't use it. I only use «buffer navigation»:

- «C-x C-f» to browser file system
- «C-x b» to switch to the previous buffer, but the mini-buffer is active you can type the name of a buffer. If you have a lot of similarly named buffers use the «Use directory names in buffer names», it use a clever algorithm based on the path to the file to name the buffer - when needed... autocompletion work with tab and their might be smart extension to improve it, but for me it's enough

There is also the the following bindings «C-x right/left arrow» but I seldom use them.

 - is there a decent JS and clojure autocompletion aware plugin

I don't use any intelli-autocompletion but the basic autocompletion, it's a vanilla feature: «M-/» it does autocompletion based on the names that are already in the current buffer. You can use several times «M-/» to change the cnd directory, I use the followings, use arrows to navigate the ompletion.

Also to search for something in a file I use «C-s» then mini-buffer, if you don't capitalize it do a case insensitive search. There is also «C-r» for backward but instead I do the following when I want to search the whole file «M-g 0 enter» which brings you at the top of the file then «C-s» the things. «M-g» is go to line by the way.

I don't use bookmarks, I use my memory and the above commands, speebar can help in big files, if any.

Also I use «C-g» to get away «quit» the mini-buffer.

In a buffer, I use «C-a» and «C-e» to respectively go at the end of the beginning of the line and end of the line.

«C-k» to «kill» a line or several
«C-y» to yield what you killed
«C-_» to undo

To select use «C-space» then navigate, then «C-w» to cut and «C-y» to yield.

Also you will probably want if you have a big screen to cut the window to be able to look at two files at the same time:

- «C-x 3» cut vertically
- «C-x 2» cut horizontally

Then, you might sometime want to use:

- «C-1» maximize current frame
- «C-0» close current frame

Most of the time I use only two frames with vertical separation.

 - other than paredit, nrepl and clojure-mode (and the excellent coffee-mode for coffeescript), what other plugins should I install

dired-x, here is the configuration that use for it, it allows not to show useless files in the buffer and mini-buffer:

(require 'dired-x)
(setq dired-omit-files
      (rx (or (seq bol (? ".") "#")         ;; emacs autosave files
     (seq "~" eol)                 ;; backup-files
     (seq bol "svn" eol)           ;; svn dirs
     (seq ".pyc" eol))))

(setq dired-omit-extensions
      (append dired-latex-unclean-extensions
     dired-bibtex-unclean-extensions
     dired-texinfo-unclean-extensions))
(add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1)))
(put 'dired-find-alternate-file 'disabled nil)

This works in without the extension: When you browser your file systems with «C-x C-f» you can do some operations on the files and directory, I use the followings, use arrows to navigate the buffer, then on a file or directory:

- «C-r» to rename then put the new name in mini-buffer (it's a mv)
- «C-c» to copy then put the new name in mini-buffer
- «C-d» to delete
- «g» to update the content of dired (if you created a file with «C-x f» it won't appear in dired before you hit «g»)

To look a particular directory go to this directory with «C-x C-f» hit enter then «M-x grep-find the-thing-you-are-looking-for»

Also if you use git or mercurial (I have an extension for mercurial...):
- you can commit a file with «C-x v v» (yes two times «v») then a buffer will show up write the commit message, submit the message with «C-c C-c»: Done.
- you can show global colored diff with «C-x v d»

If you want to send mail you can hit «C-x m» then «C-c C-c» to send.

I also use flymake with flymake-cursor for code linting/feedback.

I use the zenburn theme which happens to work great when you use emacs in daemon mode. Daemon mode allows to share buffers between emacs instances and it runs faster of course.

Last but (probably) not least org-mode is very popular it is some kind of restructured/markdown syntax that can be useful for many things like generating pdf, latex, creating todos and probably growing a dollar-tree ;)
And tramp is useful if you need to do editing on a remote location and/or with su rights directly in emacs.

Since python 24 you can install directly extensions within emacs with «M-x package-list-packages», browser then hit «i» to install the extension you are hover, use  «x» to effectively install it. You will need to reboot for the installation to take effect.

my .emacs is available but not updated, like I said I use very little extensions so it's very simple... hence I don't understand why people say you can't use emacs without configuring it. The only thing I struggled with is space/tabs things, and minor-modes to have javascript/css highlighted in html files but this is... minor.

I forgot to save a file «C-x C-s» and to quit «C-x C-c»

Regards,

Amirouche

Colin Yates

unread,
Jan 16, 2013, 11:39:43 AM1/16/13
to clo...@googlegroups.com

Thanks a bunch.

--

Sean Corfield

unread,
Jan 16, 2013, 1:38:27 PM1/16/13
to clo...@googlegroups.com
On Wed, Jan 16, 2013 at 7:38 AM, Charlie Griefer
<charlie...@gmail.com> wrote:
> I'm starting off with 24, so not sure what was default in 23… but C-x C-f in
> 24 lets you fuzzy match to a particular directory, then type a file name.

And if you've typed a new filename and it still tries to match an
existing file, use C-f to turn off fuzzy matching temporarily so you
can create your new file.

> Not sure if it's possible via C-x C-f to create a new directory, but new
> file works pretty well.

You can C-x C-f and specify a file in a completely new directory path
and it will open the file, and tell you to use M-x make-directory to
create the new folders so you can save your file:

C-x C-f /path/to/new/file.clj (C-f if needed, RET to confirm, RET to create)
M-x make-directory RET RET
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Phil Hagelberg

unread,
Jan 16, 2013, 1:38:56 PM1/16/13
to clo...@googlegroups.com

Colin Yates writes:

> So my questions:
> - is there a decent project explorer. I really miss the "tree on the
> left, editor on the right" layout

Personally I believe this is an antipattern; IMO you should only see the
file structure it is relevant rather than the speedbar style of having
it always visible. For navigating larger projects I wrote
find-file-in-project for this:

https://github.com/technomancy/find-file-in-project

You can install it from Marmalade. If it's a project you're less
familiar with you can enable full project-relative paths rather than
having it simply show you enough to ensure it's unambiguous:

(setq ffip-full-paths t)

Of course the best solution is simply not to work on large projects and
break your codebase up into manageable units where you can keep the
project structure in your head, but I understand this isn't always
within your control.

> - other than paredit, nrepl and clojure-mode (and the excellent
> coffee-mode for coffeescript), what other plugins should I install

You're missing out if you're using git without Magit.

There's a screencast here that covers the highlights:
http://vimeo.com/2871241 It's a bit old but most of it still applies.
Every time I have to use git without Magit I am reminded of how spoiled
I am; command-line git feels like banging rocks together after using a
flamethrower.

I'm a big fan of using ERC to connect to the #clojure and #emacs
channels on Freenode too; erc-hl-nicks makes that much more pleasant:

https://github.com/leathekd/erc-hl-nicks

-Phil

Warren Lynn

unread,
Jan 16, 2013, 1:43:57 PM1/16/13
to clo...@googlegroups.com

>  - is there a decent project explorer.  I really miss the "tree on the left, editor on the right" layout

Emacs is my favorite editor. But it is not perfect. My thoughts from my 8 years of using it are:

1. It is very customizable, as it builds on Elisp. After you learned some Elisp programming (should not be a problem if you are doing Clojure), you can almost customize anything, either by setting config variables, adding advices (which can also replace the whole stock function with your own), or writing your own function/packages. The fact that you can easily see the source code and debug it (with edebug), make it easy to understand what is going on and the customization. Everybody can has his own Emacs.

2. The point 1 is also a disadvantage sometimes, because Emacs sometimes requires you to do a lot of customization. Sometimes it is because the package itself is low-quality, sometimes it is because you already have some heavy customization so when a new package is integrated into your Emacs, you need to customize it to fit your own already customized Emacs environment.

3. At this point, because my Emacs is so heavily customized, I can not even use a standard Emacs without my own customization. Because my heavy investment on it, even though I feel quite happy with my Emacs, I also feel like I am somehow trapped into it. Maybe not be a bad thing to be trapped with a good editor, just a reminder what may happen down the road.

4. Emacs is far from being perfect. Project management is a pretty weak spot. I use a combination of Emacs and other tools for my daily work. My thinking is: if you can make 80% of your work time more efficient (which in my case is editing code) by using Emacs, then overall you are more efficient even though you do need spend 20% time on other tools. If you go with an IDE with a lousy editor, you may need to reverse the 80% and 20% time and hence lose overall.



Sean Corfield

unread,
Jan 16, 2013, 1:45:35 PM1/16/13
to clo...@googlegroups.com
On Wed, Jan 16, 2013 at 8:33 AM, Amirouche Boubekki
<amirouche...@gmail.com> wrote:
>> - is there a decent project explorer. I really miss the "tree on the
>> left, editor on the right" layout
> speedbar: «C-X speedbar»

M-x speedbar - but that looks very interesting, thank you! It's kinda
funky in full-screen mode on Mac OS X but it does satisfy the project
explorer itch.

Sean Corfield

unread,
Jan 16, 2013, 1:49:23 PM1/16/13
to clo...@googlegroups.com
On Wed, Jan 16, 2013 at 10:38 AM, Phil Hagelberg <ph...@hagelb.org> wrote:
> Of course the best solution is simply not to work on large projects and
> break your codebase up into manageable units where you can keep the
> project structure in your head, but I understand this isn't always
> within your control.

Our Clojure code is a relatively small portion of a much larger
system. We have maybe 200 Clojure files in total in a project with
close to 4,000 of our own files - nearly 10,000 if you add in all the
frameworks and infrastructure that sits around that source code.
Moving more and more to Clojure will definitely reduce that number! :)

> You're missing out if you're using git without Magit.

+1 - magit is awesome sauce!

> I'm a big fan of using ERC to connect to the #clojure and #emacs

Also +1

Amirouche Boubekki

unread,
Jan 16, 2013, 2:04:57 PM1/16/13
to clojure
I also use «M-x eshell» for a shell inside emacs and «M-x compile» when I just want to run a fire and forget shell command, the initial mini buffer will start with «make» you can replace it with whatever you need and the output of the command will be in a new buffer. What I usually do, call me crazy, I fire gedit with «M-x compile RET C-backspace C-backspace gedit ugly.html RET», correct the indentation and reload the file in emacs. 

I don't know clojure-mode, but python-mode has a binding to load the current buffer and start an interpreter, very useful for testing things: «C-c C-c».

Also mini-buffer commands have their own history so when you do a search with «C-s» you can navigate the history with up/down arrows, same for compile, grep...

In python-mode «M-;» will comment a line.

Happy hacking ;)


2013/1/16 Sean Corfield <seanco...@gmail.com>

Amirouche Boubekki

unread,
Jan 16, 2013, 2:06:27 PM1/16/13
to clojure
last one: «M-x whitespace-cleanup»

Alex Ott

unread,
Jan 16, 2013, 2:14:11 PM1/16/13
to clo...@googlegroups.com
just want to say, that ECB that works with fresh Emacs/CEDET is
available from my repo: https://github.com/alexott/ecb

On Wed, Jan 16, 2013 at 7:32 PM, localredhead <levi....@gmail.com> wrote:
> ECB is another option. It shows the directory tree, methods/functions,
> altered files (waiting to be saved) etc.
>
> I get the sense that people avoid ECB but I've always used because it had
> IDE-like functionality that I missed.
>
> Configuring it can be a bit difficult but IMO worth it. I preferred it over
> speedbar.
>
> -Levi
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



Gary Johnson

unread,
Jan 16, 2013, 3:50:59 PM1/16/13
to clo...@googlegroups.com
There's a MELPA package (use `M-x package-list-packages') called sr-speedbar that displays the speedbar in the same frame you are already working in. I just stick sr-speedbar-toggle on F11 and call it a day. YMMV.

localredhead

unread,
Jan 16, 2013, 5:51:40 PM1/16/13
to clo...@googlegroups.com
+1 sr-speedbar for NERDTree like functionality.  Normal speedbar being a different window always bothered me.
 
sr-speedbar + find-files-in-project is a pretty powerful combo.

Sean Corfield

unread,
Jan 16, 2013, 9:50:42 PM1/16/13
to clo...@googlegroups.com
sr-speedbar seems to depend on the CL package being present? Not sure
I want to have that installed... I seem to recall cautions from
several folks about that...?

Sean
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



Mark

unread,
Jan 16, 2013, 10:05:48 PM1/16/13
to clo...@googlegroups.com
As a long time Eclipse user who dabbles with Clojure using CCW, I'd love to hear your experience of emacs after you get used to it.  Would you consider writing up a blog entry?


On Wednesday, January 16, 2013 6:29:36 AM UTC-8, Colin Yates wrote:

vemv

unread,
Jan 16, 2013, 10:55:24 PM1/16/13
to clo...@googlegroups.com
The traditional project explorer / directory tree I use is dirtree: https://github.com/zkim/emacs-dirtree - with a couple of tweaks I found it to be very useful.

It is based on tree-mode. There are other available file browser plugins based on it.

Phil Hagelberg

unread,
Jan 16, 2013, 11:34:50 PM1/16/13
to clo...@googlegroups.com


On Jan 16, 2013 6:50 PM, "Sean Corfield" <seanco...@gmail.com> wrote:
> sr-speedbar seems to depend on the CL package being present? Not sure
> I want to have that installed... I seem to recall cautions from
> several folks about that...?

cl.el ships with emacs and is widely used. Writing elisp without it is extremely cumbersome as you miss out on reduce, filter, keyword args etc. The only downside is your code can't be included in Emacs itself. You may be thinking of eieio, which is a CLOS clone that introduces a lot of annoying runtime overhead, but that's separate from cl.el.

-Phil

Sean Corfield

unread,
Jan 17, 2013, 1:26:41 AM1/17/13
to clo...@googlegroups.com
On Wed, Jan 16, 2013 at 8:34 PM, Phil Hagelberg <ph...@hagelb.org> wrote:
> cl.el ships with emacs and is widely used.

OK, so I shouldn't worry about this warning when I install a package then?

Warning: cl package required at runtime

I've seen that a couple of times and assumed it meant cl was not
installed (and some of the stuff out there on the 'net makes it sound
like the cl package causes a lot of problems... good to know that's
not the case!).

However, when I try to install sr-speedbar I also get this error which
prevents installation:

Error: Symbol's function definition is void: make-local-hook

So I guess there's a pre-req for sr-speedbar?

Alex Ott

unread,
Jan 17, 2013, 2:38:38 AM1/17/13
to clo...@googlegroups.com
Another thing, that I want to mention, that some work for support of
Clojure in CEDET already started:
- there is lein project type for EDE, that automatically recognizes
lein projects, and uses lein to fetch classpath information, that can
be used for name completion (after parser will be ready). You can also
compile project from any open file, by using standard commands for
compilation.
- there is basic parser for Clojure code for CEDET:
https://github.com/kototama/clojure-semantic - I hope, that it will be
included into standard CEDET distribution...
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



--

Korny Sietsma

unread,
Jan 17, 2013, 7:41:36 AM1/17/13
to clo...@googlegroups.com

I've been using projectile for project-level commands, and found it quite good - it autodetects project root from things like .git directories, and then gives you commands like "open file in project", "search in project" etc.

- Korny
--
Sent from my geek device... Spelling mistakes can be blamed on Google

On Jan 17, 2013 1:29 AM, "Colin Yates" <colin...@gmail.com> wrote:
Hi all,

After 15 off years of using IDEs I am making the jump into Emacs.  I have read http://dev.clojure.org/display/doc/Getting+Started+with+Emacs and https://github.com/technomancy/emacs-starter-kit and I am just at the point where I have stopped yelling at paredit and starting to appreciate its point.

My current major stumbling block though is navigating my project.  Whilst (I expect) the density and sane namespacing capabilities of Clojure to significantly reduce the number of files, that isn't true of everything.  In particular, ExtJS encourages you to follow the "one file per class".  You don't have to but eventually you will have more than a handful of files regardless.  

So my questions:
 - is there a decent project explorer.  I really miss the "tree on the left, editor on the right" layout
 - is there a decent JS and clojure autocompletion aware plugin
 - other than paredit, nrepl and clojure-mode (and the excellent coffee-mode for coffeescript), what other plugins should I install

Thanks all.

Col

P.S>  Please don't turn this into a flame war :)

--

Korny Sietsma

unread,
Jan 23, 2013, 10:03:28 PM1/23/13
to clo...@googlegroups.com

On 17 January 2013 17:26, Sean Corfield <seanco...@gmail.com> wrote:
Error: Symbol's function definition is void: make-local-hook

bump - anyone know a workaround for this - I was interested in sr-speedbar, especially for editing over an ssh session, but it doesn't seem to work with emacs 24?

- Korny


--
Kornelis Sietsma  korny at my surname dot com http://korny.info
"We do not quit playing because we grow old, we grow old because we quit playing" - O.W. Holmes

Phillip Lord

unread,
Jan 24, 2013, 8:38:34 AM1/24/13
to clo...@googlegroups.com


make-local-hook has been deprecated for a while now and has now been
removed. In general, you can just ignore it and everything will work
correctly. So:

(defalias 'make-local-hook 'ignore)

before you load anything should solve this problem. Whether any other
problems remain, I don't know.
> --

--
Phillip Lord, Phone: +44 (0) 191 222 7827
Lecturer in Bioinformatics, Email: philli...@newcastle.ac.uk
School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower, skype: russet_apples
Newcastle University, msn: m...@russet.org.uk
NE1 7RU twitter: phillord

Korny Sietsma

unread,
Feb 1, 2013, 10:04:55 PM2/1/13
to clo...@googlegroups.com
Phillip - thanks, that works nicely.  (I had gotten it working by downloading sr-speedbar.el manually and editing it, but I prefer to stick with the packaged version if possible, less for me to remember)

- Korny



--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Korny Sietsma

unread,
Feb 1, 2013, 10:13:10 PM2/1/13
to clo...@googlegroups.com
Actually, that still didn't seem to work.  After a bit of fiddling, I found that if I install sr-speedbar from melpa, it spits out a couple of warnings, thinks it is installed, but I don't get any sr-speedbar commands.  Strange.

I'll stick to just downloading the package from http://www.emacswiki.org/emacs/sr-speedbar.el and installing it manually - that seems to work fine (even without disabling make-local-hook).  If/when I find time to dig further, I'll try to work out what is going wrong for me with the melpa install.

- Korny

Colin Yates

unread,
May 1, 2013, 4:03:35 AM5/1/13
to clo...@googlegroups.com
So a few months after using emacs, I gotta say I love it.  First I absolutely hated it with a passion, and it really highlights my (fast but) poor typing skills :).  Like Clojure I guess it requires a very different mindset.  My constant frustration now is deciding whether to spend the time improving my emacs skills (at the level of mainly implementing keybindings) or improving my lein and Clojure skills.  

Nice problem to have though coming from the Enterprise Java world where the biggest problem was remembering to stop and think rather than just cntrl-spacing the application.  I jest of course.

The biggest 'ah - got it' for me was when I realised IDEs are great for navigating huge object models which are relatively narrow but deep (i.e. lots of nested relationships).  This requires a special set of navigation skills (cntrl-click to go to declaration, autocompletion etc).  Clojure (and I guess FP) code tends to be a much wider and shallower surface (i.e. lots of sibling functions with a few well defined data structures).  The other huge win is the REPL.  Trying things out, viewing the doc or source of functions etc. is just such a liberating experience.

Loving it.

Víctor M. Valenzuela

unread,
May 1, 2013, 4:20:44 AM5/1/13
to clo...@googlegroups.com
My constant frustration now is deciding whether to spend the time improving my emacs skills (at the level of mainly implementing keybindings) or improving my lein and Clojure skills.

One skill can help bootstrapping the other :) clojure.core/trampoline style.

Thanks for sharing your experience, I feel greatly identified with it.

--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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 a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/Uhe5Wjmkb5s/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ulises

unread,
May 1, 2013, 7:13:38 AM5/1/13
to clo...@googlegroups.com
> The biggest 'ah - got it' for me was when I realised IDEs are great for navigating huge object models which are relatively narrow but deep (i.e. lots of nested relationships). This requires a special set of navigation skills (cntrl-click to go to declaration, autocompletion etc). Clojure (and I guess FP) code tends to be a much wider and shallower surface (i.e. lots of sibling functions with a few well defined data structures). The other huge win is the REPL. Trying things out, viewing the doc or source of functions etc. is just such a liberating experience.

Try M-. (and M-,) on a symbol. If your nrepl is set up correctly, etc.
that should take you to the code for a function/macro and back.

The one thing I sorely miss in nrepl is a 'who-calls' type of
functionality. Is this implemented and I just haven't found it yet?

U

Colin Yates

unread,
May 1, 2013, 7:36:02 AM5/1/13
to clo...@googlegroups.com
Without static typing, I guess grep is the best?



U

Víctor M. Valenzuela

unread,
May 1, 2013, 7:44:28 AM5/1/13
to clo...@googlegroups.com
I think such a feature is available in common lisp's slime. It shouldn't be hard to implement in clojure, particularly considering how helpful namespaces are.

one would miss calls through eval etc, but that happens in statically-typed langs too (think reflection).

Ulises

unread,
May 1, 2013, 8:13:15 AM5/1/13
to clo...@googlegroups.com
Because it's part of slime is why I was wondering whether it was
already there and I had just missed it.

grep will do for now I suppose.
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Phil Hagelberg

unread,
May 1, 2013, 6:43:45 PM5/1/13
to clo...@googlegroups.com

Ulises writes:

> Because it's part of slime is why I was wondering whether it was
> already there and I had just missed it.

IIRC the implementation in swank-clojure is basically just grep that
works inside jar files; it gives you lots of false positives when
functions have the same name.

It would be great if someone could implement this as a standalone,
orthogonal tool that could be tied into various nrepl clients.

-Phil

James Thornton

unread,
May 1, 2013, 8:46:44 PM5/1/13
to clo...@googlegroups.com
Here's a key Emacs tip that will reduce your stress and make the key combinations easier, but it may not be obvious when you're first starting out...

When you're learning something new, it's easy for bad form to go unnoticed unless someone points it out -- this is true in golf, tennis, Emacs, or whatever -- and over time bad form becomes a bad habit. Until you hit a wall, you may not realize your stroke has a serious flaw because that's the way you've always done it and so you've never thought to change it. 

While there are thousands of books, videos, and instructors to help you learn proper form for stuff like golf and tennis, there aren't too many resources teaching proper Emacs form. 

When I started using Emacs ~15 years ago, I learned the keyboard combinations in a certain way and this habit continued for years. But when I moved to Clojure, I hit a wall because swank and nrepl enable you to evaluate values in the buffer and so my workflow changed and my key combo usage skyrocketed. 

Eventually my knuckles and fingers were feeling it from the repetitive stress so I started looking around for solutions, such as swapping the Ctrl key with the Caps Lock key, getting special hacker-friendly keyboards, and I even considered switching to Vi.

Then one day I had an epiphany -- I had been doing it wrong -- I had been using my left hand and only my left hand for all the key combinations. 

For example, if you look at the keyboard shortcuts on the nrepl wiki (https://github.com/kingtim/nrepl.el), you'll see the command to "evaluate the top level form under point and display the result in the echo area" is C-M-x. 

Before I realized my bad habit, I would contort my left hand to hit "Ctrl Alt x" -- this feels awkward and if you do it enough times over the years the repetitive stress builds up. A better way is to use both hands. This may seem obvious to those who did it right from the beginning, but if you start off down the wrong path, it can be a real pain. 

To execute C-M-x using both hands, simultaneously hold down the Ctrl key with your left pinky while holding down the Alt key with your right thumb, and hit "x" with your left index finger. Doing it this way feels natural and smooth. Now I almost always use my right thumb for Meta/Alt, and once I realized this, the Emacs command combinations made much more sense.  

This simple adjustment changed everything.

HTH

- James

Softaddicts

unread,
May 1, 2013, 9:44:11 PM5/1/13
to clo...@googlegroups.com
Being left handed, I slightly disagree about your left hand (I'm left handed most of
the time :) however the stress of repetive movements is often overlooked.

15 years ago, I started to use my left hand to control the mouse.
My trunk had started leaning toward the right after a few years of using my right
hand to control it, I had to compensate.

No ,I did not verify recently if my trunk was now bending toward the left :)

I use Eclipse these days, having used Emacs heavily in the 80's but got dragged toward Eclipse (Java side effect ?).

I will eventually get back to it but reading your comment made me realize that I should
wait when I can find emacs support for pedals much like an organ or a piano :)

Luc P.
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Softaddicts<lprefo...@softaddicts.ca> sent by ibisMail from my ipad!

John Gabriele

unread,
May 1, 2013, 10:08:37 PM5/1/13
to clo...@googlegroups.com
On Wednesday, May 1, 2013 9:44:11 PM UTC-4, Luc wrote:

I will eventually get back to it but reading your comment made me realize that I should
wait when I can find emacs support for pedals much like an organ or a piano  :)


They've got pedals at <https://www.kinesis-ergo.com/> which I think work with their Contoured keyboard (which is, IMO, amazing).

Throw in a trackpad (mount it to the middle of the Contoured) and baby, you got a stew goin'. :)

I hit both Ctrl and Alt with my thumbs. Pinkies only do the Shift keys. It's wonderful.

---John

Softaddicts

unread,
May 1, 2013, 10:31:45 PM5/1/13
to clo...@googlegroups.com
I may try their Savant Elite product :))) Three pedals !

Devin Walters

unread,
May 1, 2013, 11:49:55 PM5/1/13
to clo...@googlegroups.com
Voicing strong disagreement with using emacs-live as a starting point. One reason: They rebind a bunch of default emacs bindings, which is just fine by me, but C-h to a newcomer is important, and IIRC they rebound it.

I think Phil's emacs-starter-kit modules/packages are a better place to start.


On Wednesday, January 16, 2013 at 9:24 AM, Jay Fields wrote:

> emacs-live is a pretty great starting point. It's the
> 'whole-kitchen-sink', but it's great for finding out what you don't
> know.
>
> emacs-rocks videos are good (and short)
>
> I also put off learning it until late last year, and I'm not
> completely converted. I *love* it and would be very unhappy if I
> didn't have it.
>
> I missed the project explorer at first, until I figured out that I can
> C-x C-f and just start typing, and emacs will fuzzy match what I might
> be looking for, including files in directories other than current.
>
> On Wed, Jan 16, 2013 at 10:01 AM, Colin Yates <colin...@gmail.com (mailto:colin...@gmail.com)> wrote:
> > Thanks Alex.
> >
> > Charlie - I hear you. You are right to (very gently) point out that I
> > should embrace new idioms. Boy it is hard though :). I have to say that I
> > too found it much less of a shock then I thought. I am very familiar with
> > Linux and shell scripts so I had that skillset already which I think helps
> > the with the paradigm shift.
> >
> > I accept your (implicit) challenge - let's continue without a project
> > explorer :)
> >
> >
> > On 16 January 2013 14:42, Charlie Griefer <charlie...@gmail.com (mailto:charlie...@gmail.com)> wrote:
> > >
> > >
> > > On Jan 16, 2013, at 7:29 AM, Colin Yates <colin...@gmail.com (mailto:colin...@gmail.com)> wrote:
> > >
> > > Hi all,
> > >
> > > After 15 off years of using IDEs I am making the jump into Emacs. I have
> > > read http://dev.clojure.org/display/doc/Getting+Started+with+Emacs and
> > > https://github.com/technomancy/emacs-starter-kit and I am just at the point
> > > where I have stopped yelling at paredit and starting to appreciate its
> > > point.
> > >
> > > My current major stumbling block though is navigating my project. Whilst
> > > (I expect) the density and sane namespacing capabilities of Clojure to
> > > significantly reduce the number of files, that isn't true of everything. In
> > > particular, ExtJS encourages you to follow the "one file per class". You
> > > don't have to but eventually you will have more than a handful of files
> > > regardless.
> > >
> > > So my questions:
> > > - is there a decent project explorer. I really miss the "tree on the
> > > left, editor on the right" layout
> > > - is there a decent JS and clojure autocompletion aware plugin
> > > - other than paredit, nrepl and clojure-mode (and the excellent
> > > coffee-mode for coffeescript), what other plugins should I install
> > >
> > >
> > > Hi Colin:
> > >
> > > No real answers, but I wanted to chime in to say that I'm in the same
> > > spot. I had been putting off using Emacs until I felt I was "ready", but
> > > then came to realize that the choice to use Emacs is like the choice to have
> > > kids. If you wait until you're "ready", you'll never do it.
> > >
> > > This is week 2 and it's definitely getting better, altho truth be told it
> > > wasn't nearly as bad last week as I expected it would be. Been working on
> > > the desktop with a cheat sheet constantly open on my laptop next to me.
> > >
> > > I also miss the project explorer. I'm used to working with multiple files
> > > at once, having them open in tabs, and being able to easily switch back and
> > > forth between any of them. I've definitely found that to be a bit jarring in
> > > Emacs, but trust that at some point I'll get used to the "Emacs way" versus
> > > trying to find a plugin to provide a project explorer. I have to remind
> > > myself that all of the files that I'm working with are there, they're just
> > > not immediately visible. M-x B will let me go thru the list of files open in
> > > buffers, even if those buffers aren't visible. It's different, but that's
> > > where the trust comes in :)
> > >
> > > The biggest issue I find with the lack of a project explorer is when I
> > > don't know what directory a particular file is in. Emacs provides great
> > > autocompletion when you're navigating to a particular file in the
> > > minibuffer, but that presumes you know exactly where the file is.
> > >
> > > I suppose there's always the option of opening a dired buffer (M-x dired)
> > > or even a shell (M-x shell). That's still not as "easy" or visual as a
> > > directory tree, but I think the big issue is that Emacs is really all about
> > > keeping your hands on the (proper) keys. A shell at least lets you continue
> > > to type your way around your directory structure to locate a file. A
> > > directory tree/project explorer would likely require grabbing the mouse and
> > > clicking down into various directories. It's what we're used to, yes… but
> > > it's not really, um… idiomatic Emacs :D
> > >
> > > --
> > > Charlie Griefer
> > > http://charlie.griefer.com
> > >
> > > "Give light, and the darkness will disappear of itself."
> > > -- Desiderius Erasmus
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Clojure" group.
> > > To post to this group, send email to clo...@googlegroups.com (mailto:clo...@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+u...@googlegroups.com (mailto:clojure+u...@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 clo...@googlegroups.com (mailto:clo...@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+u...@googlegroups.com (mailto:clojure+u...@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 clo...@googlegroups.com (mailto:clo...@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+u...@googlegroups.com (mailto:clojure+u...@googlegroups.com)

Kendall Shaw

unread,
May 1, 2013, 11:00:52 PM5/1/13
to clo...@googlegroups.com
On 5/1/2013 5:46 PM, James Thornton wrote:
> ...
> Before I realized my bad habit, I would contort my left hand to hit
> "Ctrl Alt x" -- this feels awkward and if you do it enough times over
> the years the repetitive stress builds up. A better way is to use both
> hands. This may seem obvious to those who did it right from the
> beginning, but if you start off down the wrong path, it can be a real
> pain.
>
> To execute C-M-x using both hands, simultaneously hold down the Ctrl
> key with your left pinky while holding down the Alt key with your
> right thumb, and hit "x" with your left index finger. Doing it this
> way feels natural and smooth. Now I almost always use my right thumb
> for Meta/Alt, and once I realized this, the Emacs command combinations
> made much more sense.
I spent years with the beginnings of carpal tunnel syndrome and tried
all sorts of changes, including using both hands. But, finally, I
started using viper mode (vi key bindings) and I have had no carpal
tunnel symptoms for 10 years.

Kendall

Phil Hagelberg

unread,
May 2, 2013, 12:13:45 PM5/2/13
to clo...@googlegroups.com

Devin Walters writes:

> Voicing strong disagreement with using emacs-live as a starting
> point. One reason: They rebind a bunch of default emacs bindings,
> which is just fine by me, but C-h to a newcomer is important, and IIRC
> they rebound it.
>
> I think Phil's emacs-starter-kit modules/packages are a better place to start.

Eh; even the Starter Kit does way too much. It's a common problem with
newcomers who pull in these huge packages that bundle lots of unrelated
functionality together; it's difficult to debug when things don't work
right since you can't tell where a specific piece of functionality comes
from.

These days I recommend pulling in small specific packages for the
things you want rather than a one-size-fits-all config. It means a
little more reading and exploring up front, but it pays off in the end.

I spun off the bare minimum from the Starter Kit into a small, focused,
actually-documented package called better-defaults.el that might be a
good starting place:

https://github.com/technomancy/better-defaults

I plan on doing more work around documenting useful packages in the
future along with putting together some kind of high-level ecosystem
guide, but haven't gotten to it yet. In the mean time, reading the
source for the Starter Kit can be illuminating, even if you don't use it
outright.

-Phil

Devin Walters

unread,
May 2, 2013, 1:29:52 PM5/2/13
to clo...@googlegroups.com, clo...@googlegroups.com
I agree with you, but personally found that the starter-kit wasn't as divergent from the norm as emacs-live and didn't have as many strong opinions. My big complaint is really just the rebinding of C-h. It's important for newcomers to be able to use that to learn about bindings and so on that are custom. I basically just learned how to use the help commands and then extracted the portions of the starter kit I wanted over time.

Sent via Mobile


On Thu, May 2, 2013 at 11:17 AM, Phil Hagelberg <ph...@hagelb.org> wrote:

null

<contents.asc>

Gary Trakhman

unread,
May 2, 2013, 1:35:40 PM5/2/13
to clo...@googlegroups.com
After a year and a half of use, I still don't know anything about C-h, I've gotten by for a year or so on 'M-x describe-bindings' and more ad-hoc methods of finding stuff out.



--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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.

Eric S Fraga

unread,
May 10, 2013, 11:45:05 AM5/10/13
to Kendall Shaw, clo...@googlegroups.com
Kendall Shaw <ks...@kendallshaw.com> writes:

[...]

> I spent years with the beginnings of carpal tunnel syndrome and tried
> all sorts of changes, including using both hands. But, finally, I
> started using viper mode (vi key bindings) and I have had no carpal
> tunnel symptoms for 10 years.

+1.

I now use evil mode. My wrists thank me all the time for this.

--
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 + Ma Gnus v0.8 + evil 1.0-dev
: BBDB version 3.02 ($Date: 2013/04/13 13:39:40 $)

Reply all
Reply to author
Forward
0 new messages