emacs-humanities
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-humanities] Emacs as a Unix citizen


From: Oliver Taylor
Subject: Re: [emacs-humanities] Emacs as a Unix citizen
Date: Wed, 30 Dec 2020 10:25:16 -0800

> On Dec 29, 2020, at 2:56 AM, Protesilaos Stavrou <info@protesilaos.com> wrote:
> 
> I believe in a previous message to this list you wrote about your
> experiences as a newcomer to Emacs.  I am paraphrasing here but the idea
> was that you found it difficult at first, until you eventually got the
> chance to do some extra reading, which gave you the confidence to set up
> Emacs the way you wanted.
> 
> So my question is what helped you get past that initial phase?  Did you
> start from scratch and read the official manual?  Was the built-in
> tutorial helpful?  Perhaps you copied code from some other user or
> relied on a preconfigured setup?

First, I'm sorry this answer is so long. Second, your dotemacs and videos on
YouTube were helpful!

In the beginning, I found the documentation and tutorial intimidatingly
complete and verbose. I wanted to learn Emacs the way I learned every other
piece of software I've used, a brief introduction followed by experimentation
with fun stuff. That's what I did and was perhaps partly to blame for my
initial difficulties.

I didn't get started with a distribution or 'starter kit' simply because I
wanted to learn Emacs from a blank slate and learn The Emacs Way. Besides, it
is hard to know where to start with those distros/kits, they are all very well
developed and intimating to a non-programmer-dotfile-hack like me.

It was my interest in Org Mode that got be started down this rabbit hole. I
had learned enough about Org Mode through various video tutorials/explanations
to believe that it would be useful to me in my work and it seemed like getting
better acquainted with Emacs for the purpose of becoming more proficient with
Org Mode was worth that investment (spoiler: it was worth it).

But, as I said, it wasn't an easy start. Perhaps appropriately, keybindings
proved to be the critical thing. Many thousands of words have been written
across the internet about the merits or demerits of Emacs's keybindings and I
will not rehash those arguments here, but I am one of those people who was all
but turned away from Emacs by the default keybindings (though I love the
Readline bindings, which I learned via MacOS and UNIX). It was learning to
re-bind keys that helped me move past that initial phase of difficulty and
confusion because doing that both makes Emacs your own and introduces you to
many important Emacs concepts.

+ It reveals that everything you do in Emacs is a function. So typing "M-b" is
  the exact same thing as typing "M-x backward-word".
+ You can explore what keys are bound to what functions with 'describe-key'
  and 'describe-function'. Which itself is a nice introduction to the help
  system.
+ It is easy to put (global-set-key (kbd "M-<left>") 'backward-word) into
  ~/.emacs.d/init.el, evaluate it, and test the result.
+ Doing this hammers-home the idea that every aspect of Emacs is totally
  malleable.
+ It doesn't take long to realize you can create your own functions, often by
  simply combining built-in functions. For example:

    (defun mark-to-beginning-of-visual-line ()
      (interactive)
      (set-mark-command nil)
      (beginning-of-visual-line))

    (global-set-key (kbd "S-s-<left>" 'mark-to-beginning-of-visual-line)

Once I learned the above I was able to quickly make Emacs behave in a manner I
understood and I gained enough confidence to encourage further exploration.

From there I (like many people) moved on to the whizz-bang fun stuff like
Ivy/Swiper/Counsel and Hydra. At this stage I probably should have instead
read the documentation carefully but I wanted fun stuff to tinker with. While
figuring out how to install, manage, and configure packages via my init file
was not exactly intuitive, getting started with a completion framework was an
important step in my journey. If I could go back I would start with:
which-key, icomplete-vertical, and orderless. These packages do much more than
just make things easier, they help reveal functionality that would otherwise
remain hidden. With these packages simply exploring 'execute-extended-command',
'describe-symbol', or "C-x" are very rewarding exercises.

From there I dove into the info pages. There is a wealth of information in
there and they reward careful reading, but for some reason it took me a long
time to stumble on them. These days they're my first place to look for help.

The most recent development was finally understanding how to use 'straight.el'
to install/update packages and 'use-package' to control the loading of
packages and configure them. This method of managing packages fits nicely with
how all the other apps/programs in my dotfiles operate. It took me a long time
banging my head against the keyboard to wind up with something that seems,
now, quite simple.

-----

I've been slowly chipping away at a minimal init file[1] that might serve as a
starting point for someone looking to get started with Emacs (and is
comfortable hacking at dotfiles). This was a nice excuse to get it on its
feet. If anyone has any suggestions for how this might be improved, I'm all
ears.

1: https://github.com/olivertaylor/dotfiles/blob/master/emacs/minimum.el




reply via email to

[Prev in Thread] Current Thread [Next in Thread]