07/29/2009
It's not the THE new icon
| More on the Emacs icon |
I've had a couple of twitter messages and email responses about my post to create a new Emacs icon. To be clear about that post, I'm not looking to build the new Emacs icon. I'm interesting in building a new Emacs icon. I just want a new icon that I can use. Something more modern and that I'm comfortable keeping on my screen all day long. Something that people will want to use, even if they don't use Emacs.
See, the problem with building an official new icon is that there are all kinds of considerations like "branding," "consistency," "accessibility" and the whole Emacs has a 100+ year history thing. I love Emacs, and I'm glad it has such a rich history and a powerful "brand," but I'm not interested wading into those waters.
I'm interested in creating a separate, totally unofficial icon. I'm suggesting we reimagine the whole thing from the ground up. What would an icon look like for the Emacsen of today. The not-quite-text-editor, not-quite-operating-system, passable-tetris-client, etc. What does that icon look like? Does it have an animal mascot of some kind? (I'm nixing the GNU/Bison thing). Is it abstract? I don't know... But we should try to figure it out.
Greg Newman has volunteered his wonderful artistic abilities in the coming weeks, so something is going to happen. But if you have any thoughts, please blog it, join the twitter conversation or email me directly.
07/28/2009
A New Emacs Icon
| A new Emacs icon |
I'd make it open source and free for all to use, anybody else interested?
07/25/2009
Emacs 23: File name [Confirm]
In what is turning out to be a series of posts on great new features in emacs 23, I've got another one today.
When you hit C-x C-f somefile TAB RET, normally the filename will be completed and you'll open the correct file. However, in past emacs versions, if there were two files with different extensions (say somefile.c and somefile.h), it would open up an empty buffer called "somefile."
In the emacs 23, when you do the same thing, it will ask you to confirm that you actually want to open this file. It's saved me from opening a ton of non-existent files.
![]() |
| Are you sure? |
07/24/2009
Emacs 23: Smarter window splitting
![]() |
| Vertical window spliting in Emacs 23 |
As I've mentioned before, I've been using the Emacs nightlies and despite having to work through a few configuration issues, I've been enjoying many of the new features I've been noticing.
One of the things I noticed right away, was how much smarter emacs was about splitting and opening new windows when it needed to prompt me for something. For example, when I do C-x C-f TAB TAB, emacs has always split my screen in half horizontally. However, now it seems to recognize when I've got a super wide window and split it vertically. It's a much better experience.
Kudos to whoever did that... even if it was a while ago and I hadn't noticed in previous emacs versions.
07/22/2009
Nightlies: Best Feature
As I mentioned before, I've been using the nightlies of emacs 23 lately. It's good stuff, I have new favorite features almost hourly. Right now, I have a couple favorites that are both part of eshell.
First, eshell now handles C-a like you expect. Previously, pressing C-a brought you back to the total beginning of the line, before your prompt. Now it brings you back to the end of the prompt, exactly like any regular shell.
Second is a feature this one will probably let me stay in eshell more than I already do. You can now redirect output to a file. Before, when you did date > thecurrentdate.txt it would tell you that you can't redirect output like that. Not anymore! That works like a charm now.
These two little things make eshell feel so much more robust. What else am I missing?
Now, if only git would work without telling me "WARNING: terminal is not fully functional" ... but it's time I got comfortable with vc-mode anyways.
Stop opening new frames in Emacs 23

I've recently starting using some cocoa nightlies of Emacs 23 as my main editor. It's a bit crashy in places and it took some fixing of my main config files, but it's a lot of fun.
My biggest gripe with it has been how it opens files. Sure, C-x C-f works as you'd expect, but something changed with the way it opens files in other ways. For example, when you drag and drop a file onto the dock icon, it opens the file in a new frame. It also opens files in a new frame when I use my handy command line script (which essentially calls open -a).
I know aquamacs has done this for a while, but I always hated it. So I was esspecially disheartened to see this behaviour make it into standard Emacs... especially since I couldn't figure out how to fix it.
Well, after asking in irc, hober suggested that I do (global-set-key drag-and-drop-something-or-other 'ns-something-or-other). This led me to try M-x customize-group RET ns. Naturally that worked and I found Ns Pop Up Frames. Set that to Never and you're good to go. I'm assuming you could also just do this in your .emacs: (setq ns-pop-up-frames nil).
Something new every day.
07/20/2009
Text Expander In Emacs
TextExpander is a great little OSX utility that reads in all the text you type and based on certain phrases, inserts other phrases.
For example, you could set it up to correct change "teh" to "the." Or you could set it up to take the word "sig" and expand it to be:
Thanks for all the fish, Ted Roden
You get the idea.
The only problem with this software is that it's kind of a hack. It inserts the replacement text by emulating a Command-v (paste). The offically supported solution is to remap M-v to yank. But any self respecting emacs user who would remap page up should just go back to using vi.
So I created a tiny bit of elisp to import your TextExpander snippets as abbreviations in abbrev-mode. This way, you can configure all of your snippets in one place and still have them work in emacs.
Installation is simple:
- Setup TextExpander to "Expand In" "All Applications, except" and check Emacs.
- Download my elisp code.
- Run M-x textexpander-sync
- That's it.
Let me know what you think!
09/03/2008
ShifD - Emacs (and vi) Key Commands
I was able to distract the guys working on shifd long enough to slide a couple of commits past them.
So for today, I'll just talk about one of the features I added when the rest of the staff wasn't looking. You can now edit and save shifd content using familiar key commands. 1
First, because it was easy, I added vi shortcuts. So i will put you in insert mode. It opens up the text box, focuses it and waits patiently. When you've added your text, you can hit [escape] :wq and it'll save and close it.
Adding vi shortcuts made me feel dirty, so I quickly added emacs commands too. The emacs version is pretty much only useful on a Mac, because control-s means something very different on windows/linux. To start a new shifd note, you can press [control]-x [control]-f2. To save the note, press [control]-x [control]-s. Not bad, eh?
There are a couple other shortcuts as well. For example, t will show/hide the input box, but those aren't quite on the same level of nerdiness, so I won't mention them all here. Go try it out for yourself.
1. This stuff, like most of the internet, is disabled in Internet Explorer.
2. I know that this would generally prompt you in emacs, but you get the gist of it.
07/09/2008
Google Region
Somehow, this didn't occur to me until today: it would be really great to select some text and enter a key command to search for that text on google. It may have taken me a long time to realize I wanted something like that, but I've used it today more times than I'd like to admit.
Anyways, here's how to make that happen in emacs, complete with a "control-c g" shortcut.
;; google-region (defun google-region (&optional flags) "Google the selected region" (interactive) (let ((query (buffer-substring (region-beginning) (region-end)))) (browse-url (concat "http://www.google.com/search?ie=utf-8&oe=utf-8&q=" query)))) ;; press control-c g to google the selected region (global-set-key (kbd "C-c g") 'google-region)
06/28/2008
Shifd from emacs
I made a little extension for emacs so that I could shifd things directly from inside the editor. Here's a video of it in action. If you're interested in the extension, let me know. I can make it available.
Emacs and Shifd from Ted Roden on Vimeo.

