I just published my Emacs configuration as an article. Contains interesting stuff on Emacs, OrgMode, Clojure and other things.
Archive for the ‘ruby’ Category
Because people asked: my current emacs configuration is at https://github.com/joodie/emacs-config
Note that it will not work as is, as it depends on my local file tree and specific installs from marmalade. So it’s mostly useful as a raw bucket of references to interesting stuff. Oh, and it includes my personal color theme, which may be an interesting example of emacs 24′s new color-theme functionalities.
I just updated emacs-rails so that feedback on the currently running test is put in the global modeline. This means you get that feedback in all buffers, so you can work on something else while your tests are running, and the minibuffer stays free for useful things.
It’s started automatically when emacs-rails is loaded, but that’s customizable of course, and you can switch it on and off using rails-ui:enable-mode-line / rails-ui:disable-mode-line.
Update: actually, the head has some nicely cleaned up code now. So just get that at http://github.com/remvee/emacs-rails/tree/master
One of the projects I’m working on is in Ruby on Rails, and I’m using emacs-rails (with some small tweaks) as the development environment.
Emacs rails works fine, except for one thing: the navigation menus (x-popup-menus) are awkward when you want to use the keyboard. So I thought I’d switch on the rails-always-use-text-menus option. Which didn’t actually work, but I fixed that bit.
Rails-always-use-text-menus uses tmm-prompt, which is the standard function on emacs to mimic drop-down menus on the console. and it’s almost as horrible as x-popup-menu: if the items in the menu aren’t static you can’t predict the which key activates which item, and it takes up a lot of screen space:
Which key can I press to go to the UserPreference model?
I really like iswitch buffers for buffer navigation, and it seemed to me that it should be possible to navigate the menus using the same technique, even for nested menus.
So here is iswitch-menu, a direct replacement for tmm-prompt and/or x-popup-menu. It’s not quite finished yet – I’m working out the last issues with some of the more “interesting” constructs used by the menubar keymap – but it’s more than adequate for use with emacs-rails, at least.
Now, I can just type some substring of the name of the model, and go there
First character typed, we can see which models still match
Second character typed, only one model still matches.
Pressing TAB completes the typed text, and goes to the selected model if there’s only one. Pressing ENTER opens the first matched model. See also the iswitchb documentation for available tweaks and key bindings.