On this page:

Emacs Chat: Iannis Zannos – Emacs and SuperCollider

Emacs! Music! Iannis Zannos shares how Emacs can be used for all sorts of awesomeness with Org Mode and SuperCollider.

Check this event page for details and comments =)

Emacs Basics: Customizing Emacs

Hello, I’m Sacha Chua, and this is an Emacs Basics video on customizing Emacs. Emacs is incredibly flexible. You can tweak it to do much more than you might expect from a text editor. This week, we’re going to focus on learning how to tweak Emacs with M-x customize and by editing ~/.emacs.d/init.el.


You can download the MP3 from Archive.org

Customize

You can change tons of options through the built-in customization interface. Explore the options by typing M-x customize. Remember, that’s Alt-x if you’re using a PC keyboard and Option-x if you’re on a Mac. So for me, that’s Alt-x customize <Enter>. In the future, I’ll just refer to this as the Meta key, so remember which key is equivalent to Meta on your keyboard. (Review – Emacs Basics: Call commands by name with M-x)

After you run M-x customize, you’ll see different groups of options. Click on the links to explore a group.

For example, people often want to change the backup directory setting. This is the setting that controls where the backup files (the files ending in ~) are created. You’ve probably noticed that they clutter your current directory by default. To change this setting, select the Files > Backup group. Look for the entry that says Backup Directory Alist. Click on the arrow, or move your point to the arrow and press <Enter>. Click on INS, or move your point to INS and press <Enter>. Fill it in as follows:

  • Regexp matching filename: .
  • Backup directory name: ~/.emacs.d/backups

Click on State and choose Save for future sessions. This will save your changes to ~/.emacs.d/init.el. When you’re done, type q to close the screen.

You can also jump straight to customizing a specific variable. For example, if you want to change the way Emacs handles case-sensitive search, you can use M-x customize-variable to set the case-fold-search variable. By default, case fold search is on, which means that searching for a lower-case “hello” will match an upper-case “HELLO” as well. If you would like to change this so that lowercase only matches lowercase and uppercase matches only uppercase, you can toggle this variable. I like leaving case fold search on because it’s more convenient for me. If you make lots of changes, you can use the Apply and Save button to save all the changes on your current screen.

Not sure what to customize? You can learn about options by browsing through M-x customize or reading the manual (Help > Read the Emacs Manual or M-x info-emacs-manual). You can also search for keywords using M-x customize-apropos.

~/.emacs.d/init.el

The Customize interface lets you change lots of options, but not everything can be changed through Customize. That’s where your Emacs configuration file comes in. This used to be a file called ~/.emacs in your home directory, and you’ll still come across lots of pages that refer to a .emacs file (or “dot emacs”). The new standard is to put configuration code in your ~/.emacs.d/init.el file, which you can create if it does not yet exist.

What goes into your ~/.emacs.d/init.el file? If you open it now, you’ll probably find the settings you saved using M-x customize. You can also call functions, set variables, and even override the way Emacs works. As you learn more about Emacs, you’ll probably find Emacs Lisp snippets on web pages and in manuals. For example, the Org manual includes the following lines:

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

This code sets C-c l (that’s Control-c l) to run org-store-link, C-c c to run org-capture, C-c a to run org-agenda, and C-c b to run org-iswitchb. You can add those to the end of your ~/.emacs.d/init.el file. They’ll be loaded the next time you start Emacs. If you want to reload your ~/.emacs.d/init.el without restarting, use M-x eval-buffer.

Emacs Lisp may look strange. Don’t worry, you can get the hang of it even if you don’t think of yourself as a programmer. You can start by copying interesting snippets from other people’s configuration files. Start with small chunks instead of large ones, so you can test if things work the way you want them to. If you need help, StackOverflow and other Q&A resources may be useful.

As you experiment with configuring Emacs, you may run into mistakes or errors. You can find out whether it’s a problem with Emacs or with your configuration by loading Emacs with emacs -Q, which skips your configuration. If Emacs works fine with your configuration, check your ~/.emacs.d/init.el to see which code messed things up. You can comment out regions by selecting them and using M-x comment-region. That way, they won’t be evaluated when you start Emacs. You can uncomment them with M-x uncomment-region.

Emacs gets even awesomer when you tailor it to the way you want to work. Enjoy customizing it!

Weekly review: Week ending April 4, 2014

Blog posts

Sketches

  1. 2014.03.29 Litterbox analysis #quantified
  2. 2014.04.01 01 – Why is it that people don’t vote – Findings from Samara’s Democracy Talks – Alison Loat
  3. 2014.04.01 02 – Who doesn’t vote – Findings from the 2010 municipal election – Myer Siemiatycki
  4. 2014.04.01 03 – What systems can we change – Municipal electoral reform – Desmond Cole, Dave Meslin
  5. 2014.04.01 04 – Mobilize to Vote 2(tpse)
  6. 2014.04.01 05 – Mobilizing Mount Dennis tenants to vote for landlord licensing – Judy Duncan
  7. 2014.04.01 06 – Voter contact workshop – Graham Mitchell, Michal Hay, Jesse Boateng
  8. 2014.04.01 07 – Election day planning and pulling the vote workshop – Graham Mitchell, Michal Hay, Jesse Boateng
  9. 2014.04.01 Figuring out more about what I want to do #planning
  10. 2014.04.01 How do I feel about snippets versus longer podcasts #podcasting #decision
  11. 2014.04.02 Evaluating my sharing #sharing #decision
  12. 2014.04.02 Imagining learning sprints #my-learning
  13. 2014.04.02 On thinking about a variety of topics – a mesh of learning #my-learning
  14. 2014.04.03 Dealing with the fog of work #experiment #fire
  15. 2014.04.03 How can I delegate even more effectively #delegation

Link round-up

Focus areas and time review

  • Business (57.9h – 34%)
    • Earn (28.2h – 48% of Business)
      • E1: Load people into comm
      • Earn – E2: Re-render video 3 if necessary
      • Earn – M: Set up M templates
      • Earn – M: Set up and print invoice
      • Earn – M: Sketchnote conference
      • Earn: E1: 2.5-3.5 days of consulting
      • Earn – E2: Set up video 3?
      • Earn: E1: 2.5-3.5 days of consulting
    • Build (22.0h – 37% of Business)
      • Build – Learn: Explore ManyCam
      • Build – Packaging: Review new cover for Sketchnotes 2013
      • Build – Quantified Awesome: Always default to creating a note field
      • Build – Quantified Awesome: Fix 24h goals and range goals
      • Build – Quantified Awesome: Fix display of totals in daily summary
      • Upgrade Linode Ubuntu install
      • Make it easier to cross-link Org
      • Stop loading d3js
      • Record session on learning keyboard shortcuts
      • Drawing (5.1h)
        • Draw “A” page for Emacs ABCs
      • Delegation (1.8h)
        • Get web development delegation off the ground
      • Packaging (4.6h)
        • Check on print copy of Sketchnotes 2013
        • Fix spine for Sketchnotes 2013
        • Put together print for Sketchnotes 2012
        • Review Sketchnotes 2012 digital proof
      • Paperwork (4.6h)
        • File payroll return
    • Connect (7.7h – 13% of Business)
      • Emacs chat prep: Iannis
      • Reach out regarding Emacs Google Hangout?
      • Emacs chat: Iannis Zannos – music
      • Invite bbatsov for an Emacs Chat
      • Talk to Tom Marble about Emacs
  • Relationships (3.6h – 2%)
    • Attend W-’s family thing
    • Cook something during the week
    • File taxes
    • Go to Gamfternoon at Hacklab
    • Help Eric with focus
    • Raspberry Pi: Learn how to do image analysis to detect changed areas
    • Write blog post about Raspberry Pi litter box cam
    • install the libraries I need for simplecv
    • Check results for project F
  • Discretionary – Productive (7.7h – 4%)
    • Encode litter box data
    • Go for an hour-long walk
    • Reflect on fog of work
    • Reflect on learning sprints
    • Update evil plans so that it has a little bit of margin
    • Writing (1.0h)
      • Write about discretionary speed
  • Discretionary – Play (3.2h – 1%)
  • Personal routines (19.9h – 11%)
  • Unpaid work (16.6h – 9%)
  • Sleep (61.6h – 36% – average of 8.8 per day)

Experiment update: Mid-term pre-mortem check

In the early days of my 5-year experiment with semi-retirement, I brainstormed ways it could fail. I worried that I might end up too distracted to make useful stuff, or that I’d end up being incapable of pursuing my ideas, or that I’d mess up somewhere–paperwork, people, products–and botch the whole thing. I worried that I’d finish the experiment with nothing to show and no compelling story for the gap I’d have in my resume. I worried that W- would get tired of this exploration.

20121210-business-planning-experiment-premortem.png

20121210-business-planning-experiment-premortem.png

I feel less worried now. Part of it was realizing that I can plan for only so much safety. Part of it was learning how to choose what I’m going to focus on, how to select my projects without managers and track my progress without annual performance reviews. (Well, I still have annual reviews, but they’re self-driven.) Part of it was trusting that I can handle things, a confidence which grew after each small step.

Looking back, I can see the things I found mentally challenging in the beginning, and how I worked around them.

  • The career gap doesn’t look all that scary now. I know lots of other people who have managed it. They’re fine, and I’ll be fine too.
  • Self-direction turned out to be good to learn, and it seems like I can come up with useful projects.
  • Paperwork? There were a few stressful hours as I learned more about the tax code – I amended my first corporate tax return a number of times – but I think that doing my own books was worth it. Besides, Canada Revenue Agency is surprisingly approachable. Hmm.
  • Opportunity cost? “Wasted potential” only
2014-02-21 What did I find challenging when I started #experiment

2014-02-21 What did I find challenging when I started #experiment

If you’re starting your own experiment or you’re well into one, I’d love to hear about some of the challenges you faced and how you worked around them!

More Emacs drawings: Dired, moving around

Dired is the Emacs directory editor. You can get to it with C-x C-f (find-file) if you specify a directory. C-x d (dired) works too. Dired makes it easy to do batch operations on files. One of the niftiest features that you might not even think of looking for, though, is the ability to make a Dired buffer editable using C-x C-q (dired-toggle-read-only). Then you can use replace-regexp, keyboard macros, and all sorts of other ways to change filenames. When you switch back out of editing mode with C-x C-q, the files will be updated.

Here’s a cheat sheet for working with Dired.

2014-02-24 Emacs tips - use Dired to manage files #dired #emacs

2014-02-24 Emacs tips – use Dired to manage files #dired #emacs

Also, bjonnh suggested making a cheat sheet for movement commands. I use the M-b, M-f, C-M-b, and C-M-f shortcuts a lot when working with Emacs Lisp. C-a and C-e are great too.

2014-02-27 Map for getting the hang of Emacs movement #emacs #map #guide

2014-02-27 Map for getting the hang of Emacs movement #emacs #map #guide

If you use evil-mode because you’re used to Vim shortcuts, this cheat sheet won’t be useful to you, but maybe I can make an evil-mode cheat sheet someday.

In other news, I’m slowly becoming the kind of person who can understand SmartParens. I’m getting the hang of slurp and barf, but the rest of it still boggles me. Someday!

Figuring out a fair price for outsourcing work

How can you figure out a fair budget for delegating work? If you set your budget too low, you might get frustrated by lack of response or by the kinds of results you get. If you set your budget too high, you might waste effort and talent. I can’t give you a price sheet. Besides, your needs will evolve over time. However, I can share some of the things I’ve been learning about budgeting for outsourcing or checking if people’s times are reasonable.

If you’re working with hourly assistance, you can ask people to track their times for specific tasks so that you can get a sense of how much something costs. You can also give a time limit and ask them to send you what they have at the end of that time. This will help you get a sense of their speed and the cost of the task. If you’re working with fixed-cost services, you can translate things back into hourly estimates and compare that with your own experience. Pick one system of measurement so that you can compare your chioces.

2014-03-24 Determining a fair price for outsourced work #delegation #outsourcing

2014-03-24 Determining a fair price for outsourced work #delegation #outsourcing

Instead of trying to nail down a single price, try to figure out a range that you’re comfortable with. You can start by looking for flat-rate fees from companies or people who post fixed prices online. For example, Transcript Diva lists transcript rates and timelines for some of their competitors as well. For general tasks, services like Fiverr and Fancy Hands help establish a range of $5-15 for common tasks.

Another way to establish a limit for what you’re willing to spend is to consider how long it takes you to do things yourself, and what else you would do with that time. Adjust based on people’s experience. Beginners will take longer to do things than you will, while experienced people may do this just as fast as you can. Specialists who have invested in tools or training may do things even faster. Sometimes it makes sense to delegate a task to someone who isn’t the optimal choice in terms of speed or cost, if they’re more integrated with the way you work or if you want to help them grow. (Sketch: delegation and task efficiency; blog post)

Then experiment. Try delegating a small task to a lower-cost service to see if that will meet your needs. Try delegating a similar task to a premium service to see if it’s worth the price. Try a mid-range service.

Think about the value you can get from the different types of results you have. If a service is expensive but it leads to a lot more income, it may be worth it.

Think of when you’d prefer to do things yourself, too. For example, even though it’s easy to find inexpensive data entry assistance, I prefer to automate straightforward tasks because I get to learn more about automation along the way.

As you delegate, think about what was worth it, and adjust accordingly. Make your experiments a little bit bigger as you get used to the idea. Find your sweet spot, and then keep experimenting. Good luck!