Building Emacs 27 on Apple ARM M1 #

On Mac, I sometimes run a prebuilt binary and sometimes compile my own. For Apple M1 (ARM) I am using the x86 binaries from emacsformacosx.com but I wanted to try compiling a native ARM version too. I saw that the work branch of Mitsuharu Yamamoto's Mac port already has patches applied, so I decided to try it.

Screenshot of Emacs 27 compiled on Apple ARM M1

Labels: , ,

Emacs: prettier tab-line #

Back in 2018 I posted about making tabbar.el look pretty. Emacs 27 includes two built-in ways to display tabs:

  1. tab-bar-mode works per frame to show window configurations
  2. tab-line-mode works per window to show buffers

Tab-line mode seems similar to tabbar.el, so I decided to switch from tabbar.el to tab-line.

Screenshot of emacs 27 tab-line-mode
Emacs 27 tab-line mode

Labels:

Notes about eyeglasses #

These are my barely-organized notes about my need for eyeglasses to correct my nearsightedness. It is likely that I have some of this wrong because I don't fully understand it.

Correction

When an optometrist measures your "prescription" they're measuring the 0th and 1st order zernicke polynomials. The 0th order is "sphere" and is a single number, rounded to the closest 0.25. The 1st order is "cylinder" (astigmatism) and has two numbers: a direction axis and an amount. There are higher order aberrations too but the optometrist doesn't measure these. These higher order aberrations can cause halos and other effects; see this example image that shows a "coma" (point smeared out like a comet), "spherical aberration" (starbursts and halos), and "quadrefoil" (point spreads out multiple directions). Laser surgery can often correct these but sometimes the healing process generates new ones.

Labels:

Emacs mode line simplified #

Back in 2017 I posted that I switched from my own custom Emacs modeline to Spaceline. I liked having a simpler configuration with more features. Unfortunately I eventually realized that those features were slowing down my system. In particular, column number, which-function, and selection-info, and my custom unicode display had to be updated on every keystroke. I went back to the default mode line and used this trick to see when it was recalculated:

(defvar-local mode-line-eval-count 0 "Counting :eval")

;;; put this in mode-line-format
(add-to-list
 'mode-line-format
 '(:eval (progn
           (setq mode-line-eval-count (+ 1 mode-line-eval-count))
           (format "%+4d " mode-line-eval-count))))

Every recalculation, the counter increases. By experimenting with the default mode line, I found that having %c in the mode line (column number) causes it to redisplay (almost) every keystroke, and %l (line number) causes it to redisplay when changing lines. I also realized during this experimentation that Emacs felt faster with the default mode line than with Spaceline.

I decided to switch from Spaceline to the default mode line, much closer to my setup before 2017, but simpler, more modular, and matching my tabbar. It feels nice and it looks good. I thought I would miss a few of the fancy features from Spaceline, but I didn't miss them as much as I thought I would. Features I use:

  • Read-only and modified status show a bright color on the left.
  • Project directory and filename are in separate colors.
  • The color theme depends on project (red for work, blue for personal, purple for configuration).
  • Week number ties into my task tracking system.
  • Line number uses Emacs 26's line-numbers-mode instead of the mode line.
Screenshot of Emacs tabbar, line-numbers-mode, and mode-line

I've put a simplified version of the code in a gist.

Labels:

Fractal islands in the Pacific #

I'm not a big fan of the Pacific Ocean. There. I said it. I like water/land interfaces. Coasts, rivers, lakeshores, beaches, coral reefs, tide pools. The Pacific Ocean has too few of these. So … let's fix it. Here's an idea I had from around 2003 but never blogged about:

Drawing of earth with volcanic islands added
I couldn't find a whiteboard drawing from 2003 but I have this newer one

Labels: