Writing “tips of the day” + some Emacs tips

Briefly, if you want to learn a new subject or especially a new computer thing, if you write down a "tip of the day" each day–something that was new to you, at least–you will quickly learn a ton.

This technique first worked for me with Perl, back in the late '90s. At my internship I had a small whiteboard, and I wrote on it a Perl "tip of the day." No one besides me cared about it, really, but I'd write down some small thing I learned. The tips were really basic (for Perl); things like

  • perlvar is the perl man page for variables
  • $|++ unbuffers output
  • $0 is the name of the current program

etc. etc. I mean you could get more than a month just out of perlvar(1).

In any case, some days these tips took me like 30 seconds to write, but in other cases they opened a new avenue for investigation. For example, maybe I learned about the command line version of CPAN.

I've used this technique to learn other things, too, especially when I didn't know what there was to learn. Right now I'm using this technique in two ways: (1) I write a Jira "tip of the week" in my emails to people asking them to update their projects; and (2) I have been writing an Emacs "tip of the day" for myself on and off since July 1.

And here ends the preface that gives me an excuse to talk about Emacs.

Emacs tips

I've been using Emacs for at least twenty years, and I've gone through fits and starts where I've learned a lot (like when I read through the manual) and then very little. But I've been recommitted to it especially as I've moved my task system and email into it.

So since July 2020, I've had an optional task for myself to write an Emacs tip of the day. I have a small yasnippet template for the task, which is just

# -*- mode: snippet -*-
# name: tip
# key: tip
# --
- <`(format-time-string "%Y-%m-%d %a")`>

(I made that after I learned one day that you can add lisp code to snippets!)

To populate these tips, I maintain a list of Emacs web pages to go through slowly. One way to find good content, as always, is https://pinboard.in/t:emacs.

Here are a few that have been really helpful!

  • (global-set-key (kbd "M-SPC") 'cycle-spacing) - Then M-SPC alternates between multiple spaces, one space, and no space.
  • C-q quotes the next character, so you can type a literal character
  • C-x . sets the fill-prefix for text wrapping.
  • C-x C-n is "set goal column" so you go to that column whenever you go to the next/previous line. Great for bulk-editing.
  • in multi-save (C-x s), ! means "save all"
  • M-a and M-e to go backward/forward a sentence.
  • M-z is zap to character, which I use surprisingly often.
  • remapping C-x to kill-this-buffer is great
  • s-' toggles between every window across frames!
  • when recording a macro, C-x C-k C-i is the counter for that macro iteration

I've recorded way more tips than that, but those have had the most "staying power" and have been incorporated into daily use.

There are a ton more that I've forgotten, so my tip of the day file is now in itself a source for more tips of the day!