Category Archives: emacs

Reading these posts, you can probably tell that I really, really like the Emacs text editor.

View my Emacs configuration.

Check out Planet Emacsen to read other Emacs geeks’ blogs. For all things Emacs, check out the EmacsWiki.

New to Emacs? Start here:

On this page:

Emacs Chat: Sacha Chua (with Bastien Guerry)

UPDATE 2013/07/08: Now with very long transcript! (Read the full blog post to find it.)

After I chatted with Bastien Guerry about Emacs, he asked me if he could interview me for the same series. =) So here it is!

Just want the audio?

Find the rest of the Emacs chats at

[

How I use Emacs Org Mode for my weekly reviews

Summary: I use a custom Emacs Lisp function to extract my upcoming tasks and logged tasks from my Org agenda, and I combine that with data from using a JSON interface.

I use Emacs Org Mode to keep track of my tasks because of its flexibility. It’s difficult to imagine doing the kinds of things I do with a different task management system. For example, I’ve written some code that extracts data from my Org Mode task list and my time log to give me the basis of a weekly review. Here’s what my workflow is like.

Throughout the week, I add tasks to Org Mode to represent things that I plan to do. I also create tasks for things I’ve done that I want to remember, as I find that I forget things even within a week. I track my time through, a website I built myself for tracking things that I’m curious about.

On Saturday, I use M-x sacha/org-prepare-weekly-review, which:

  • runs org-agenda for the upcoming week and extracts all my non-routine tasks
  • runs org-agenda in log mode and extracts all finished tasks from the previous week
  • gets the time summary from Quantified Awesome’s JSON interface

Here’s what the raw output looks like:


I like including a list of blog posts so that people can click on them if they missed something during the week. Besides, my blog posts often help me remember what I did that week. I customized my WordPress theme to give me an org-friendly list if I add ?org=1 to the date URL. For example, here’s the list for this month: . I copy and paste the relevant part of the list (or lists, for weeks near the beginning or end of a month) into the *Blog posts section*. I could probably automate this, but I haven’t bothered.

Then I organize the past and future tasks by topic. Topics are useful because I can see which areas I’ve been focusing on and which ones I’ve neglected. I do this organization manually, although I could probably figure out how to use tags to jumpstart the process. (setq org-cycle-include-plain-lists 'integrate) means that I can use TAB to hide or show parts of the list. I use M-<down> and M-<right> for most of the tasks, and I also cut and paste lines as needed. Because my code sorts tasks alphabetically, I’m starting to name tasks with the context at the beginning to make them easier to organize.

If I remember other accomplishments, I add them to this list. If I think of other things I want to do, I add them to the list and I create tasks for them. (I should probably write a function that does that…)

The categories and time totals are part of the weekly review template inserted by sacha/org-prepare-weekly-review. I use my smartphone or laptop to track time whenever I switch activities, occasionally backdating or editing records if I happen to be away or distracted. If I’m at my computer, I sometimes estimate and track time at the task level using Org Mode’s clocking feature. Since I’m not consistent with task-based time-tracking, I use that mainly for investigating how much time it takes me to do specific things, and I don’t automatically include that in my reports.

When I’m done, I use org2blog/wp-post-subtree to publish the draft to my blog. I preview it in WordPress to make sure everything looks all right, and then publish it.

It’s wonderful being able to tweak your task manager to fit the way you work. Yay Emacs, Org Mode, WordPress, and making your own tools!

Animating things in Emacs

Some years ago, I came across M-x animate-birthday-present (and therefore animate-string and animate-sequence) while reading through the output of M-x apropos-command RET . RET, which lists all of the interactive commands. (Well worth exploring! The Emacs Manual also lists a few unusual things under “Amusements.”) It’s one of my favourite examples of odd things you can find in Emacs, like M-x doctor and M-x tetris. I use animate-string to create the title sequences of Emacs chats like this one with Bastien Guerry.

It turns out that lots of people use the Emacs text editor for animating things. Andrea Rossetti (from Trieste, Italy) e-mailed to share this little thing he put together to simulate typing in Emacs. And, boggle of boggles, someone even taught a course on Emacs Lisp Animations.

Next: Maybe someone can make an onion-skin animation mode to go on top of artist-mode so that we can make Emacs flipbooks? Winking smile

Emacs Chat: Bastien Guerry

In this chat, Bastien tells stories about getting started in Emacs, reading his mail/news/blogs in Gnus, and hacking his life with Org. =) Enjoy!

Want just the audio? You can get MP3s or OGG from

How to Learn Emacs: A Hand-drawn One-pager for Beginners / A visual tutorial

This entry is part 1 of 4 in the series A Visual Guide to Emacs

UPDATE 2013-09-23: New, much larger version – see below!
UPDATE 2013-06-01: Here’s a zoomable, pannable version thanks to MapLib!

Here’s version 2 (September 2013). You can print this at 16.5″x10.75″ at 300dpi. Have an ordinary printer? Check out PosteRazor!

How to Learn Emacs - v2 - Large

Original post from May 2013:

I thought I’d draw a one-page guide for some of the things that people often ask me about or that would help people learn Emacs (and enjoy it). You can click on the image for a larger version that you can scroll through or download. It should print all right on 8.5×11″ paper (landscape) if you want to keep it around as a reminder. Might even work at 11×17″. =)

How to Learn Emacs

You can find the image on Imgur and Flickr too.

Feel free to share, reuse, or modify this under the Creative Commons Attribution Licence. Enjoy!

Possibly counterintuitive point: It’s good to learn at least the basics of Vim. Despite the perception of a “Emacs vs. Vi” holy war (one of the classic battles in computer science), it makes sense to know both editors especially if you work with people who use Vi a lot. Know enough Vi to find your way around, and then learn how to customize Emacs to fit you to a tee. That way, you’ll avoid the pressure of not being able to work well with your team or your infrastructure, and you’ll have the space to explore Emacs. =) Emacs is totally awesome.

Need help with Emacs? Feel free to leave a comment or get in touch with me. I’m often in the #emacs channel on , and I also occasionally schedule time to help people one-on-one. Also, the Emacs community (mailing lists, newsgroups, IRC channel) can be wonderful, so definitely reach out to them too. =)

Meta discussion: How can I make this even better? What else would you like me to draw a guide for? I’d love to hear your thoughts! Also, thanks to dash, nicferrier, fledermaus, ijp, hypnocat, Fuco, macrobat, taylanub, axrfnu, Sebboh, thorkill, jave_, jrm, and the rest of #emacs for suggestions and feedback!

Update 2013-05-18: Check out the conversations on Hacker News and Reddit!


Emacs chat intro

It turns out to be lots of fun to talk to other people about Emacs. You pick up all sorts of tips and interesting ideas that way.

One of the reasons why I do these chats is to help people get a sense of other people using Emacs. Now that I know John Wiegley sounds like when he’s excitedly talking about Emacs, it’s so much more fun reading his code. =) I’d love it if you told me a little bit about your story. Sharing how you got started with Emacs (what helped, what needs work) might give us ideas on how to make it easier for people to start. What was your “aha!” moment? What are the things you love, and what would you like to see improved? Walk me through your config, highlighting any quirky things you’ve done to make Emacs fit the way you work.

In addition to your story, you probably have lots of little tips that could save people time or make their Emacs lives better. No time to blog or screencast? Show us your favourite tricks in a chat, and I’ll take care of putting it up on the Net. It’s a quick way to get things out of your brain and onto the Internet. =)

If you have Emacs configuration or Lisp questions, ask away. I might be able to help, or someone listening might know the answer. We can spend some time digging into code or bouncing around ideas. I’m happy to help for free. If you come away with something incredibly useful, you can buy me a virtual mug of hot chocolate through PayPal or make a donation towards an awesome Emacs thing like =) It’s all cool.

I’d love to record and share our conversation so that more people can learn from it. If there are parts that you’d like blurred or not have recorded, or if you prefer to not have the conversation recorded at all, please tell me and I’ll be happy to accommodate that.

Want to talk about Emacs? Get in touch with me at [email protected]!