Category Archives: emacs

2015-05-13 Emacs Hangout

Console Emacs vs GUI Emacs, keybindings, Org Mode, cooking, nyan, window management, calendars, SuperCollider Usual disclaimer: times are approximate, and the note-taker often gets distracted. =)

  • 0:00:00 Emacs configuration
  • 0:11:22 Console Emacs vs GUI Emacs? iTerm integration, mouse support, 256 colours, drop-down menus (although you can get a text one), …
  • 0:14:59 multihop TRAMP
  • 0:16:01 keybinding philosophies, Hyper and Super
  • 0:22:15 Remapping keys on Mac OS X (dealing with separate Alt and Meta)
  • 0:28:04 Org and mobile
  • 0:30:25 emulating hyper and super keys
  • 0:32:15 orgzly
  • 0:33:33 Org Mode and cooking, org-map-entries
  • 0:39:31 nyan
  • 0:43:04 One window, workgroups
  • 0:46:56 winner-mode
  • 0:53:30 rinari, zeus, ruby
  • 0:54:53 neotree
  • 0:58:22 keyboards
  • 1:03:24 conference
  • 1:09:22 calw; also, something about rainbow-mode, and palette, and then later Org Mode
  • 1:23:13 SuperCollider, Overtone, yasnippet
  • 1:45:13 blackink?

Text chat: Here’s the gif I have as my nyan

Sahil Sinha 9:23 PM
Jack G. 9:24 PM (setq mac-right-command-modifier ‘hyper)<br>(setq mac-right-option-modifier ‘super) (global-set-key (kbd “H-h”) ‘er/expand-region
George Jones 9:32 PM
Jack G. 9:36 PM nyan Cranky_walk.gif
Jack G. 9:42 PM
me 9:42 PM ?
Daniel H 9:46 PM
me 9:48 PM winner-mode
George Jones 9:59 PM
George Jones 9:59 PM Xah Lee writes a LOT about keyboards
Jack G. 10:02 PM
Bogdan Popa 10:10 PM
me 10:11 PM org-gcal
Daniel H 10:12 PM
George Jones 10:12 PM having real trouble hearing…
George Jones 10:20 PM when you open a PDF in docview you can get the text with ^C^T (default bindings)
Jack G. 10:21 PM Thanks George!
George Jones 10:21 PM C-c C-t runs the command doc-view-open-text
me 10:27 PM
sai tejaa Cluri 10:27 PM hi
Jack G. 10:37 PM link
me 10:37 PM This was a fun demo of Org Mode and SuperCollider
Levi Strope 10:40 PM Jack your audio is crystal clear now… whatever that change was
Jack G. 10:45 PM
me 10:48 PM

2015-04-30 Emacs Hangout – hosted by Philip Stark

Thanks to Philip Stark for organizing an Emacs Hangout that’s more conducive to European timezones! Here’s the video and the notes.

You can add more comments on the event page. For more about upcoming Hangouts, check out our Google+ page.

Show notes (times might need a little adjustment):

  • 0:00:03 Introductions!
  • 0:03:03 A couple of Emacs semi-newbies =)
  • 0:03:52 Java and C# language support (autocomplete, refactoring, etc.); bridging the gap between Emacs and the runtime (Unity, Android, etc.). Batch mode for the latter. OmniSharp actually went pretty darn well this time around!
  • 0:06:10 OmniSharp demo
  • 0:06:13
  • 0:07:23 OmniSharp + company config, demo of completion. Includes API. Jump to definition as well.
  • 0:10:59 Cool refactoring stuff. Ex: intelligent rename. Watch out for bugs. Still neat!
  • 0:12:30 MS Visual Studio Code seems to run on the same backend =)
  • 0:13:18 OmniSharp background info
  • 0:14:53 New participant, working out the tech issues
  • 0:16:28 Java? Haven’t looked into it much yet, lower priority. Pain point: Eclipse project build chain. eclim? May give it a second chance.
  • 0:19:37 Wishlist: batch mode Unity for headless testing?
  • 0:20:05 Emacs and Python – working through the Google Code Jam problems. C-c C-c to execute code in the REPL, so much fun. Suggestion: org-babel blocks? =)
  • 0:21:37 Discussion about Scala and Ensime. Ooh, Ensime does Java too. Neat!
  • 0:22:49 New to Emacs Lisp. Discovering things and implementing them – good enough, but not well-polished. Writing. Helm, etc. So many things to learn! Balancing studying the Emacs Lisp intro and manual, and discovering things day to day.
  • 0:25:00 Separate Lisp file loading for experimental stuff.
  • 0:25:30 Woodnotes guide?
  • 0:26:32 Emacs StackExchange,, Planet Emacsen
  • 0:29:17 Spacemacs, packaged defaults. Learning with index cards. Learning curve. Emacs community is obsessed with documentation. Phenomenal! =)
  • 0:34:23 Documented conventions, nicely-designed keybindings etc. for Spacemacs
  • 0:35:50 Spacemacs setup asks you which tradition you want to follow
  • 0:36:46 nerdtree replacement – neotree
  • 0:37:27 Goal is to not rely on Spacemacs, but for it to be a stepping-stone / scaffold
  • 0:38:30 Differences between Linux window managers; simplified workflows
  • 0:40:24 Looking at configuration frameworks piecemeal, learning workflows
  • 0:43:05 Discoverability is a big issue. helm-c-yasnippet has helm-yas-complete, helm-yas-create-snippet-on-region . Can be configured to display the keys. (setq helm-yas-display-key-on-candidate t) Has additional actions if you TAB.
  • 0:50:24 Hydra demo. Ex: moving lines up and down. Hydra for Helm?
  • 0:57:25 Lispy-mnemonic
  • 1:02:58 Usability
  • 1:05:30 Lispy-mnemonic workflow – minor mode
  • 1:06:15 back-to-indentation and restoring the binding in Lispy
  • 1:07:36 org-timer and meeting notes
  • 1:08:14 Make timestamps better! =)
  • 1:10:53 Cognitive overhead of new IDEs. Ex: SublimeText C-d marks a thing (Emacs equivalent: expand-region)? More organic, flexible commands versus specific ones, staying within your mental model.
  • 1:13:00 multiple-cursors, transpose-chars versus backward-kill-word.
  • 1:17:30 helm-swoop
  • 1:21:06 micro-optimizations, command-log-mode, keyfreq, mc/mark-all-like-this(-dwim), guru-mode
  • 1:26:06 Dealing with Eclipse wizards, things that shift you out of your mental model. Discussion of Helm and Ido. Also, helm-show-kill-ring.
  • 1:31:59 Hydra and leader keys.
  • 1:32:31 Dan’s intro. Figuring out workflow. Export Org Mode to HTML. Yasnippet for HTML5 declarations? Org Mode publishing project support (org) Publishing options
  • 1:37:20 Magit, git-timemachine, git-gutter-fringe, git-wip (for committing work in progress each time you save;, git-wip-timemachine (forked git-wip,
  • 1:41:44 undo-tree
  • 1:42:57 git-messenger
  • 1:43:48 C-x v g, vc-annotate, colour-coding
  • 1:45:13 Emacs load times, profiling
  • 1:47:59 markdown and flycheck not finding an external command, checking the *Messages* buffer

Text chat:

M. Ian Graham 2:06 PM
M. Ian Graham 2:14 PM
Tim K 2:15 PM should be ok
Tim K 2:15 PM maybe someone has to unmute me
M. Ian Graham 2:15 PM
Tim K 2:15 PM i’ll just keep lurking for now then
me 2:18 PM
Tim K 2:19 PM tangentially related: ENSIME I used it for developing a web play framework project
M. Ian Graham 2:20 PM Ooo, scala goodness
Tim K 2:21 PM yeah it targets scala BUT it works for java as well !!
Philip Stark 2:23 PM Excellent.. Thank you Tim !
M. Ian Graham 2:25 PM
Tim K 2:25 PM @Will: Are you on Emacs.SE?
Philip Stark 2:26 PM right?
Tim K 2:26 PM yes There’s lots of good content for non-programmers there
Philip Stark 2:26 PM cool. I gotta check that out.
me 2:27 PM Yakshaving:
Tim K 2:32 PM For people who know their way around some of the starter kits: You could definitely score some points answering questions on Emacs.SE. My impression is that there usually aren’t that many people around who can answer these types of questions.
me 2:32 PM Good point!
Will Monroe 2:33 PM Thanks, Tim. That sounds like a good place for someone like me to start.
Tim K 2:33 PM Prelude is probably the one you’re thinking of
M. Ian Graham 2:45 PM
me 2:47 PM (setq helm-yas-display-key-on-candidate t)
Will Monroe 2:58 PM Hey everyone, I’ve really enjoyed listening to and talking with each of you. Have to go. See you all next time!
Tim K 3:03 PM Bye Will!
me 3:04 PM For the text chat: You might like
Tim K 3:12 PM Also: multiple cursors
me 3:23 PM keyfreq?
Tim K 3:25 PM guru-mode ?
me 3:41 PM
Tim K 3:41 PM
me 3:43 PM
Philip Stark 3:43 PM ah thx

Thanks, everyone!

Emacs Hangout 2015-04-15 show notes

We chatted about packages, packaging, databases, and the upcoming Emacs conference.

Event page:

What’s this Emacs Hangout thing about? This is an informal way for Emacs geeks to get together and swap tips/notes/questions. You can find the previous Hangouts or sign up for the mailing list at .

Upcoming Emacs Hangouts:

Emacs Lisp Development Tips with John Wiegley
April 28, 2015 Tue 4:00 PM Toronto time (8 PM GMT)

Emacs Hangout
April 30, 2015, at 2 PM Toronto time (6 PM GMT, 8 PM CET):

Want to find out about upcoming hangouts? You can sign up for notifications at or follow the Emacs conferences and hangouts page.

Timestamps are approximate since I was a little distracted. =)

  • 0:25:14 8:26 PM whoops, forgot to keep track of stuff. Before this: conversation about Unity/C#/etc. in Emacs; Spacemacs
  • 0:26:33 Howard demonstrates literate database queries with a remote SQL server. SSH tunnel + –protocol=tcp
  • 0:28:55 Naming the results of queries and then using them in a different calculation
  • 0:30:39 Hmm, might be a good technique for exploring old databases
  • 0:31:13 sx.el – StackExchange client
  • 0:34:16 howdoi-emacs
  • 0:34:57 sx setup, sx-tab-all-questions
  • 0:35:59 hydra sample use cases: opening files and directories, changing the quotation of strings, mode switching
  • 0:37:30 clone indirect buffers
  • 0:39:35 Cask
  • 0:43:27 use-package
  • 0:44:57 paradox
  • 0:49:11 packages
  • 0:56:02 Emacs conference stuff
  • 1:05:11 weird Emacs things =)
  • 1:07:43 Next up: literate config (Dylan, Sean)
  • 1:13:19 wrapped up

Text chat and links:

me 8:08 PM By the way, we can use this text chat as a backchannel. After the chat, I’ll copy it and share it with the show notes so that other people can grab links.
Howard Abrams 8:14 PM Here is my investigation of my save hooks in case you can kick off some sort of script:
me 8:15 PM External to Emacs, but possibly interesting:
Dylan Thiedeke 8:16 PM You said there was a ruby-guard? I will have to look into that for authoring and editing cookbooks and recipes for use with Chef
me 8:17 PM ?
Dylan Thiedeke 8:18 PM Awesome! Will definitely be looking at that thanks Sacha
Swaroop C H 8:20 PM csharp layer – ?
M. Ian Graham 8:21 PM Nice link Swaroop, I’ll see if I can pull it in
me 8:25 PM
Swaroop C H 8:26 PM
Sod Oscarfono 8:32 PM +1 for being a bassist!
M. Ian Graham 8:32 PM
Howard Abrams 8:32 PM Here is the blog post about the literate database work:
me 8:34 PM
Zachary Kanfer 8:48 PM There’s an Emacs song: and
Samer Masterson 8:53 PM gimmie a sec, getting headphones
me 8:56 PM Question from a viewer: Why would someone use both Cask and use-package at the same time ?
Sod Oscarfono 8:57 PM i’m an ex-event manager… i’d be keen on helping get one happening in oceania
me 8:57 PM Oooooh
Sod Oscarfono 8:57 PM nz or aus maybe
Samer Masterson 8:57 PM
Dylan Thiedeke 8:57 PM Sod I’m in AU. Not qualified enough to present but would help out if I could
Sod Oscarfono 8:59 PM thanks Dylan. perfect/ any ideas on a rough idea of numbers of emacs users globally? by region? hard to quantify i realise but are we talking hundreds, thousands, hundreds of thousands do you think? keen as Samer… i’m nowhere near as proficient with emacs, or programming as most here but i have many other skills.. event management, audio engineer, graphic design and close connection with large format commercial printer
Dylan Thiedeke 9:03 PM Sod in Australia I couldn’t even imagine a number. Maybe poll the #emacs IRC channel on friend and the emacs group on G+
me 9:03 PM Sod: Woohoo! Awesomeness.
Dylan Thiedeke 9:04 PM Sod I’m not a programmer either but use emacs for documentations and starting to use it for project management with org-mode etc
Sod Oscarfono 9:04 PM community is the magic word when talking to me
Samer Masterson 9:04 PM
Sod Oscarfono 9:05 PM feel free to add me Dylan we can fire some ideas back and forth. maybe a poll of interest in a local conf or meetup
me 9:06 PM Sod, Dylan: Neato!
Howard Abrams 9:07 PM I’m sorry, but I have to leave as well. Thanks for the fun and I will listen to the rest later.

2015-04-08 Emacs Lisp Development Tips with John Wiegley

You can find John Wiegley on Twitter (@jwiegley) or at

0:00:00 Paredit mode. Start with it from day 1! Matching pairs of parentheses, won’t let you delete one without the other. Inserts appropriate newlines, too
0:03:56 Emacs as a Lisp environment. (Also, Helm is what’s responsible for the display.) Evaluating a function makes it available in the global scope, which has all these functions and commands you can do. This makes it easy to iteratively develop your functions, because you can just execute things directly.
0:05:08 Without (interactive), you can’t call functions with M-x. You can use M-: or put the call in your scratch buffer.
0:06:00 command-log-mode
0:06:47 pp-eval-last-sexp. Check out for other config things
0:07:14 debugging. e to evaluate within the current context. Also, stepping, quit.
0:08:09 Edebug with C-u C-M-x. Interactive debugging. SPC moves you forward, one Lisp form at a time. It shows you results in the minibuffer. You can descend into Lisp forms or go into functions. ? shows keybindings. Check out the Emacs Lisp chapter on EDebug, highly recommendeg.
0:09:25 You can also use the (debug) form to go to the debugger.
0:10:26 eldoc: Seeing arguments in the minibuffer as you type, because no one remembers all the arguments anyway. eldoc-mode, or add (turn-on-eldoc-mode) to your config.
0:11:30 What functions should you call in the first place? What concepts? Emacs predates many standard terms, so that’s why things are a little confusing. Ex: “frames” and “windows” are not what you might think they are. OS window = frame. Area within Emacs = window. Opposite of HTML. Use the Emacs tutorial C-h t.
0:13:04 Read the Emacs Lisp intro, which you can get to with C-h i (which lists the manuals that are available). Read the Emacs Lisp manual too.
0:14:03 Other weird terms: point, mark, marker. (point) vs (point-marker).
0:15:35 C-h f (describe-function) shows the help for the function. Nearly all functions you’ll probably call are documented well. Lots of options. Check out C-h f for interactive, for example.
0:17:17 C-h v (describe-variable).
0:17:46 More in-depth documentation: C-h i, go to the Emacs Lisp manual, then use i to view the index.
0:18:22 info-lookmore shows you the Info documentation for the symbol under point. Works for other Lisps too (ex: Common Lisp)
0:19:46 Sanity-checking paired parentheses with M-x check-parens. Handy for adding to your after-save-hook in Emacs Lisp mode.
0:20:40 Paredit editing capabilities. Ex: C-k kills the current sexp. paredit-raise-sexp replaces the parent sexp with the following sexp. slurping and barfing. Barfing – spitting out an element from the list form. C-{ or C-} (with suggested keybindings). C-( and C-) are slurping, which pulls forms in. Works for strings, too.
0:22:38 Maximum barfage and slurpage. Useful for slurping everything in, for example. paredit-slurp-all-the-way-forward.
0:24:13 redshank (companion to paredit) for refactoring. Ex: redshank-condify-form converts an if to a cond for when you realize you’ve got more than two conditions.
0:25:05 M-1 M-( surround the next one thing with parens
0:25:25 redshank: wrap a let, change if to a when, etc.
0:25:52 C-h k (describe-key) shows what a keyboard shortcut or menu item will do.
0:27:26 Took a while to get used to paredit, but you eventually get into the zen of paredit.
0:27:54 Linter – M-x elint-current-buffer. Loads every module that your code depends on (so the first time is slow), and then shows you style notes.
0:28:50 C-q for manually inserting parentheses
0:29:10 Helm, which shows you all the other stuff that matches your query. Lets you select by regex, multiple patterns, etc. Much nicer and more interactive.
0:30:29 Profiler M-x elp-instrument-function, then call the function, then elp-results will show you the time it took to execute. Results aggregate, and are reset when you call elp-results.
0:32:30 Measuring memory consumption. Also, internal representation of lists. reverse vs. nreverse. Like nconc, nreverse, setcar, setcdr. This can greatly speed up your code, if you can avoid using the garbage collector. EmacsWiki – memory-use-counts, but not particularly helpful? Another package that extends the Emacs Lisp profiler? Avoid premature optimization.
0:38:55 elint and flycheck? flycheck’s designed for external processes, so that might be a challenge. Possibility: use async to spawn another Emacs? Doesn’t seem to be available yet.
0:40:40 ert
0:48:11 testcover,, undercover.el
0:48:13 Read Emacs Lisp manual, etc.
0:48:20 Creating a mode. You don’t have to make it from scartch – start by copying someone else, and then strip away everything you don’t want.
0:49:58 checkdoc – checks the style of your documentation strings.
0:51:30 defining a minor mode
0:56:08 when to define a major mode – structure of your buffer

The balance between doing and improving – evaluating yak-shaving

A reader wrote:

… I came to realize that many Emacs users seem to spend a great deal of time learning about Emacs, tweaking it, and writing new extensions, rather than getting non-Emacs-related work done. Sometimes it feels as though heavy Emacs users actually get less done overall, if you consider only non-Emacs-related tasks. My question is, is it possible to get work done in Emacs, without most of that work being Emacs-related?

It got me thinking about skills or tools that can be used to improve themselves, and the balance between using and improving tools.

2015-03-15c Skills or tools that can be used to improve themselves -- index card #learning #bootstrapping

2015-03-15c Skills or tools that can be used to improve themselves – index card #learning #bootstrapping

Not all skills or tools can be used to improve themselves. I’m learning how to sew, but that doesn’t lead to making my sewing machine better (aside from fiddling with the dials).

Here are some skills that can be used reflexively:

  • Philosophy asks questions about good questions to ask
  • Learning about learning helps you learn more effectively
  • Woodworkers and machinists have a tradition of making their own tools
  • 3D printers can print parts for their own models
  • You can program tools to help you program better: testing, version control, project management, etc.

Although making your own tools takes time, here are some advantages of doing so instead of buying them off the shelf:

  • You understand the internals better, and you can appreciate the subtleties
  • You can customize it to fit the way you work
  • You can create different variants for greater flexibility. Mass customization can’t anticipate or cost-effectively provide all the different types of things people may want.
  • As your skills and needs increase, you can create better and better tools for yourself.

Many programmers spend time deliberately improving their toolkits; if they don’t, they stagnate. At the basic level, people try programs or frameworks that other people have created. The next level might be scripting things to work together. A third level might be writing customizations or extensions, and a fourth level might be creating entirely new tools or frameworks. Beginner programmers might start at the first level of reusing other people’s code, but wizardly performance often involves a mix of the other levels.

So the question is: How can we balance doing things and improving things?

No one can answer this for you.

Me, I tend to avoid hard deadlines and I do things faster than people expect them to be done, so I have plenty of leeway to improve my tools – which helps me be even more effective, so it’s a virtuous cycle.

You’ll need to find your own balance. You might get urgent stuff out of the way first, and then figure out how to balance smaller requests with investing in capabilities.

Here’s something I put together to help you figure out where you might be in terms of balance. Alternatively, if you’re thinking about whether to pick up a skill or tool that can be used to improve itself, you can use this to evaluate what you read from people sharing their experiences with the tool. Can they find a good balance for themselves, or are they frustrated by the challenges of getting something to work?

2015-03-16a The balance between using and improving tools -- index card #learning #bootstrapping

2015-03-16a The balance between using and improving tools – index card #learning #bootstrapping

  • “I have what I need in order to work.” This is the basic scenario. People focus on doing things instead of improving things.
  • I can keep pushing, but performance is dropping, so I should invest time in maintenance.” It’s like the way a knife or a saw dulls over time. When you notice diminishing returns, it might be good to invest some time in maintenance. It’s not an urgent need, but it can pay off.
  • I’d better take care of this now before it becomes a problem.” This is like maintaining a car or taking care of your health. A little time now can avoid big problems later.
  • Grr, it’s broken. I have to fix it before I can work.” If you let things go for too long, or if you’re working with something finicky, you’ll be forced into maintenance mode. For example, some 3D printers require a lot of fiddling. Watch out for this scenario.
  • It’s fine the way it is, but I know I can make it better.” The way you’re currently doing things is okay, but you know (from your experience or from what you’ve read of other people) that you can invest a little time to work more effectively. You might even know the return on investment. It’s easy to decide whether you should just go ahead with the status quo or invest the time in improving.
  • It’s fine the way it is, but I think I can make it better.” The way you’re currently doing things is okay, but you have some ideas that might make it even better. If you think those ideas might be worth it, it might be good to give yourself a time limit for exploring those ideas so that you don’t get distracted. Alternatively, you can save it for a slower time.
  • I’m waiting or stuck, so I might as well work on tools.” Maybe you’re waiting for feedback from someone else. Maybe you’re waiting for programs to compile or tests to pass. Why not spend a little time exploring how to make your tools a little better?
  • I’m doing this for fun/learning.” Tool improvement can become more enjoyable than some of the other ways you used to like spending time. For example, you might find yourself wanting to watch a screencast or try out a tweak instead of watching TV or browsing random sites on the Internet. You don’t have to completely replace other activities, you just have to shift a little time from things that have less value to you.
  • I can’t write about my actual work, but I can write about this.” If you’re wondering about yak-shaving propensity based on the blog posts you’re reading, consider: do people write about their improvements instead of the work that they’re doing because their work is confidential or hard to explain? Maybe they think blog posts about improvements are more interesting. Maybe they’re writing about improvements in the process of figuring things out (which in an excellent process, by the way). All these things can skew your perception of how much time people spend doing things versus improving things, and how much they accomplish within that time.

In terms of Emacs, these things mostly apply to me:

  • “I’m doing this for fun/learning” – Emacs tickles my brain, and the community is wonderful.
  • “I can’t write about my actual work, but I can write about this” – I suppose I could write more about the other stuff I’m interested in (sewing? cooking?), so there’s that. However, the consulting stuff is covered by agreements, and that’s a small fraction of my life anyway.

I assume other geeks are rational, especially if they have a lot of experience with it and other tools. Therefore, if people spend time tweaking (while avoiding the consequences of low performance), I assume it’s because they see the value of doing so (whether the pay-off is certain or not). On the surface, an effective person’s behaviour might resemble an ineffective person’s behaviour – six hours sharpening the saw for two hours of work, or six hours procrastinating and two hours of cramming? But if you look at:

  • if they get stuff done
  • whether other people are happy with their performance, or if they generally appear successful in their endeavours
  • how happy they are about the process

then you can get a better idea of whether it’s working for them.

As you think about your own balance or read other people’s blogs, can you identify what scenarios you and other people might resonate with? Am I missing any that I should add to the list? Please comment below!