May 18, 2020

ObstaclesObstacles

Part One of My Battles with Emacs

There was no good reason to do this. Absolutely no damn reason.

I started tinkering with Emacs. I don’t have a good explanation for why I started on this journey. I was bored? I am a glutton for punishment? My pinky wasn’t getting enough exercise?

(Note: the last is an inside Emacs joke. Emacs commands seem to prefer the ⌃ key. Means that your pinky gets used a lot. I know. Not funny.)

I told myself that I was interested in org-mode. That was the ostensible reason behind this adventure. Let me step back a few.

I know a bit of Vim. Very little. I have tried to learn to live in Vim and gotten frustrated and moved away from it. I know even less of Emacs. The main cause of frustration with these editors were the following:

  1. I am comfortable with macOS. I take for granted some niceties that come with the OS. Keyboard commands which are standardized across the various programs in macOS, don’t work or don’t work all that well in these editors.
  2. I like iA Writer. It is distinguished by forcing some default choices on to the consumer and insisting that the user get on with writing and not worry about tweaking the interface. Vim and Emacs are not designed that way. They insist on letting you tweak everything. I mean everything. This ability to tweak coupled with my lack of knowledge means that I am stepping into the rabbit hole of customization all the time. Most of the time, I have no clue what I am doing. Some times my Google-fu leads to the right answer, and I am enthralled. Most of the time, what works for someone else, doesn’t work for me. Cue the frustration.
  3. Things which are simple in other editors. Number of letters in a line. Typewriter scrolling. A mystery to me in Emacs.
  4. These editors are designed for programmers. I am not one. I want to write in org-mode or Markdown. Don’t particularly care for programming conventions. There are solutions which are available on macOS which are geared towards Markdown. Programs which are optimized for Markdown: iA Writer, MultiMarkdown Composer, nvUltra to name a few. They deal with a subset of what text editors are capable of, but they specialize. They are optimized for dealing with this markup format. This lets them concentrate on providing the user with a writing environment and that is what they are good at. Emacs has a fantastic Markdown mode. But it is a completely new learning curve for me. Intuitive commands like ⌘+B for bold are replaced by ⌃C ⌃S b. Couple that with the realization that the environment is completely customizable. That means a lot of tweaking to get things just right. The writing environment? You gotta tweak that yourself.

Why am I doing this?

  1. I am old. I need to find that I can learn something new.
  2. I am intrigued by org-mode.
  3. Looking for an editor that I can live in for the rest of my life without paying a fee for that privilege. Times are hard. I want to reduce my spending.
  4. I came across an Emacs distribution called doom-emacs which intrigued me.

Worst of Both Worlds

doom-emacs lets you use Emacs with Vim keybindings, called evil mode.

The problem? I am not that good with Vim keybindings. I know some basic commands but am not comfortable with them. They are not second nature to me. So, it doesn’t really matter that I can use Vim keybindings. I don’t know them.

Like I said. This was a bad idea.

But I went through the installing process and now have an instance of Emacs which supports Vim and Emacs keybindings, none of which I am particularly familiar with.

First Things First

The font has to change.

These additions go into your config.el.

(setq
doom-font (font-spec :family "Input Mono Narrow" :size 18)
doom-big-font (font-spec :family "Input Mono Narrow" :size 36)
doom-variable-pitch-font (font-spec :family "Avenir Next" :size 18)
)

The line spacing was too close and I needed to change that.

(setq-default line-spacing 0.7)

Tao themeTao theme

The theme has to change. Doom ships with solarized light and dark pre-installed but I wanted to try something different. I ran across a lovely minimal theme called Tao.

(setq doom-theme 'tao-yang)

One of the things which Doom lets you do is move in a file through reference to the line numbers. I needed to show line numbers.

(setq display-line-numbers-type t)

I still haven’t figured out how to make every line width 90 characters. That is a work in progress. I haven’t given up that quest, but it hasn’t clicked yet. Typewriter scrolling? No answer to that one. Still looking. Haven’t given up the search. But no luck so far.

The Upside

I am learning. Finding that I can learn something new. Not too old for that. You have no idea how good that makes me feel. You will get it, once you are my age. By the way, I am 59 years old.

Doom-emacs is like a mesh of the best things of Emacs and Vim. This is a double-edged sword. You get the benefits of both editors, the evil keybindings along with Emacs and its org-mode. The complexity is astounding for someone who has limited experience with these tools. I am having to learn both Emacs and Vim concurrently.

Markdown mode in Emacs is fantastic. It is comprehensive and implemented well. I love writing Markdown in Emacs. It is well documented and it is sensible.

Suggestion 1: Buy the Guide to Markdown Mode for Emacs by Jason R. Blevins. Pay the price you can afford.

Suggestion 2: Search youtube for emacs related videos. There are a ton. Go through them.

Suggestion 3: Buy a few more books. These are two I can recommend:

  1. Mastering Emacs $39.99
  2. Harley Hahn’s Emacs Field Guide 1st ed., Hahn, Harley $29.99

Org-mode. It is overwhelming. It is great. I have just started this journey, I don’t have much to say about it yet. Except that tables are fantastic in org-mode. There is a whole calendar portion of it which I am not using. I don’t care to have my agenda maintained by Emacs. At least, not yet. I might get there but now I am using org-mode to write outlines. It is a great outlining program. All text and outlines. Folding of sections or the whole of the document. It is the best text based outlining solution that I have ever seen.

Conclusion

I am learning. I am having fun. Also tearing my remaining hair out. Frustration is a part of the learning curve. It is the most geeky thing I have attempted and the little successes add a tremendous amount of pleasure to my quarantined soul. This series is going to be continued…

macosxguru at the gmail thingie.

Thanks to: Photo by Vladislav Vasnetsov from Pexels


emacs


Previous post
Books to Read 2020-05-13 Now that people have some time on their hands, I want to recommend some books to read. Lessons From A Life Hardcover: 18.69 Kindle: 13.99 Kawasaki
Next post
Kudos Helps Me Collect Information Product: Kudos a productivity tool for macOS Price: App Store $4.99 I collect information all day long. Go to a website, find something that I want