It's apparently essential for screencasts, but I decided to have a go at it anyway and made a screencast version of the Emacs demo I gave at the last ATLRUG meeting.
Here's a list of the various features I demoed if you want to track them down to use yourself:
ECBis the Emacs Code Browser. Debian & Ubuntu have packages for this.- The buffer-switching feature I used is the ido package, which is included with Emacs 22.
- The base Ruby editing mode is matz's ruby-mode, which is included with Ruby, but is a separate package under Debian & Ubuntu.
- The RI-in-Emacs was via ri-emacs.
- The method-finding was via the Emacs built-in
tagsfeatures, but using aTAGSfile generated with Exuberant Ctags1. - The in-buffer Ruby filtering was with mfp's xmpfilter.rb and a tiny bit of Elisp around the normal Emacs sub-process facilities.
- The base XHTML editing mode was nXML mode. Grab my patch to modify its XML parser to understand that ERB sections aren't invalid.
- I use MMM mode to highlight, etc ERB sections. It doesn't grok ERB out-of-the box, but it was easy to make it do so. There is a Debian & Ubuntu package.
- Spell-checking was with
flyspell-prog-mode, which is included in Emacs. Addnxml-text-facetoflyspell-prog-text-facesto spell-check your XHTML. - The
kill ringis part of Emacs, but I gotbrowse-kill-ringfrom the Debianemacs-goodiespackage. I can't seem to find a canonical source for it, though... - The
alignpackage is part of Emacs. - The Emacs' built-in documentation is... built-in.
TRAMPis the Transparent Remote (file) Access, Multiple Protocols package. It is included in Emacs 22.- [Updated 2006-10-27] Forgot to list this the first time, but the dynamic snippet functionality is via snippet.el, and the snippet itself is from emacs-rails.
Whew. All Emacs, all the time? Hopefully my next post will be on something else...
1 Jim, I was completely wrong about tags and Ruby in Emacs. My last job was
almost all C, so I'd been using semantic for all my code-comprehension foo
and had forgotten how useful tags could be.
Commentary most sage
Would you be so nice and share your .emacs?
You need to put the post title in the <title> tag. Less work for me when adding your list to my del.icio.us bookmarks!
I'll have a look through your blog later, to find other goodies. Thanks for sharing these!
Thanks very much for this. I've been slightly annoyed with the emacs ruby support for a while, and this fills in many of the gaps for me.
However, it would, as stiff says, it would be very nice if you could post your .emacs file...
I'd be particularly intrigued to see the code for enabling align.el to work properly with ruby-mode. It doesn't work for me out of the box, so I'm assuming you've done some customisation of your own.
Which SVN lib are you using?
Dr Nic: I'm using the Subversion backend to VC (and ECB's integration with VC). It's included with Emacs 22 and an older version lives in Subversion's Subversion repo.
Thanks for your video and details regarding setting up emacs for ruby Ive been trying to follow your .emacs.d setup by loading each file one by one in a dired buffer and correcting the errors as they come (mostly by installing the suitable packages)
Where is one to find rubydb?
I should mention I am using ubuntu dapper; emacs-snapshot-gtk (22)
rustom: In Debian it's part of the
ruby-elisppackage you probably already have the Ubuntu equivalent of installed, but for some reason there are two versions namedrubydb2x.elandrubydb3x.el. Myrubydbis an incipiently hacked-on version ofrubydb3x.el.Thanks
You might yet save me from IDE-hell :-)
Though honestly I am not there yet
My speedbar looks tacky (and its look is important to convince my colleagues!)
I wander if your ECB shows the context menu for directories just like for files that are in a subversion repos. If so, how did you made it?
Ups... Wonder... :(
Maybe you can hire Roman Strobl to do voice-overs on your screencasts.
The sample .emacs file is missing. It would be extremely helpful...
Really, I cannot get things to work without it. I am running on windows XP and the differences are already enough to turn my hair gray.
Okay, I found the .emacs on your home page. The last place I'd expect to find a .emacs file.
357 impenetrable lines. Do I need all 357 to get my system to run like your video?
Emacs in general has always been weak in the area of deployment and distribution of packages
FredJ, I'm apparently a bit LD here. "on your home page" means what? I'd have expected to find a .emacs at platypope.org/.emacs or .../blog/.emacs, and after that, I'm unable to come up w/another interpretation.
The reason I'd like it is that it's not clear to me how much of which packages/programs are used, and how they interact. E.g., do you associate ruby-mode with "*.rb" files, and if so, does emacs-rails know which files to work with?
No doubt, if I had more than a tiny, rudimentary nub of experience with Ruby *or* Rails, some semirandom hacking with the elements you've named here would yield truth before I grew a long beard.
In the preceding, I failed to distinguish between FredJ and llasram, which bugs me as perhaps it does everyone else. Please accept my apologies.
I note that Markdown didn't act on the asterisks in paragraph 3; possibly to do w/the quoted asterisk in the preceding paragraph?
H'mm. I note that it's not claimed that emacs-rails.el should be loaded. On the other hand, one is not warned that there are any problems with it. I find that it fails to load, complaining about various missing functions, depending on whether I'm byte-compiling it or doing an eval-current-buffer on rails.el. In the latter case, the gripe is "Cannot open load file" "untabify-file".
Is anyone actually using emacs-rails? Anyone using emacs-rails with GNU emacs 22.0.97+? Is emacs-rails a snare and a delusion?
A certain amt of the previous rejoinder is based on pilot error. However, I'd still be interested as to whether it is considered advisable to load up emacs-rails, or just to pick the snippets out of it.
@Fingal To be honest, I've been out of the Rails thing for a while, so this may no longer work. What I had been doing was loading only the snippets defined in emacs-rails, not all of emacs-rails. HTH.
Nice screencast, good on you mate.
Thanks, this reminded me why I decided to spend the time to learn emacs.
This was fantastic. Thank you for reminding me why I love Emacs, and also bringing some feature I had not known about to life.
Cheers
Very nice screen cast. Thanks. I'll need to watch it a few times to understand all you were doing ... but that's the joy of emacs ... always something new to learn.