This a pretty crazy little shortcut for shooting out an e-mail when you’re in the middle of something important. C-x m –> write message –> C-c C-c … That’s it. So the idea is that from emacs you can send an e-mail. I came across it by accident when chording. I knew emacs could send e-mails, but never really saw the point. It’s SO easy that I highly recommend testing it out.
Steps:
1) C-x m
2) Write out your message
3) C-c C-c
While you’re at it, you can send me some Python/Django/emacs fanciness to: irani.michael at gmail
Sometimes, a file is just not indented right (usually happens with HTML files), and is totally unmaintable. Then I find myself opening the file in emacs and manually going through each line and tabbing them to the appropriate indentation. This is really just dumb, and I should’ve looked this up a long time ago, but there’s a built in command in emacs to handle this. All you do is select the text you want to indent — ctrl-x h for the entire buffer — and then do M-x “indent-region”. That’s all. Nifty little trick. I’m going to have to mess around with the other indent commands and see what they do. You can also use the shortcut C-M-\ instead of M-x “indent-region”.
Most people don’t know this, but you can also run emacs from within your shell (like vi). There are some moments where it just doesn’t make sense to load the emacs GUI, and it’s just nice to know that we don’t have to use vi in those circumstances. All you need to do is add the “-nw” tag when running emacs to load it up in the shell. I also add the “-Q” so that there’s no fancy color schemes introduced.
emacs -nw -Q
The most common usecase for doing this is when you’re committing something from the shell and want to add a comment. Usually the default is vi in these circumstances, but it doesn’t really have to be…
Within emacs select “options” from the menu bar: then “Customize emacs” –> “Specific Face…”
Type “default” (, or “def”) then press enter.
Then you can mess with all the settings. I have “misc-fixed” set for my “Font-family”
When you’re done just save the file as you would any file in Emacs: c-x c-s