tvl-depot/emacs
William Carroll 4187e888c8 Disable company-mode during git commits
Why didn't I configure this earlier? For years, my workflow involved checking a
buffer's major mode and then extending that major-mode's hook. Confusingly (to
me), the `major-mode` for `COMMIT_EDITMSG` is `text-mode`, and I didn't want to
disable `company-mode` for *all* `text-mode` buffers, which is what the
following would have done:

```elisp
(add-hook 'text-mode-hook (lambda () (company-mode -1))
```

Thankfully I recently invested some time into learning more about Emacs's
offline help system, `Info-mode`, so -- putting that knowledge to work -- I ran
`info-apropos` and searched "magit commit". After ~5 minutes of reading I knew
the recommended way of configuring this was to modify `git-commit-setup-hook`.

How validating!
2020-10-04 14:57:23 +01:00
..
.emacs.d Disable company-mode during git commits 2020-10-04 14:57:23 +01:00
default.nix Drop glinux attribute from Emacs derivation 2020-09-07 23:29:20 +01:00
elisp-conventions.md Move Emacs documents to //emacs 2020-04-04 14:30:27 +01:00
keybindings.md Move Emacs documents to //emacs 2020-04-04 14:30:27 +01:00
README.md Tidy //emacs 2020-04-05 15:50:58 +01:00
snippets.md Move Emacs documents to //emacs 2020-04-04 14:30:27 +01:00

Emacs

Emacs is one of a handful software projects that I highly value. I consider it as central to my workflow as git and nix.

Installing

If you already have briefcase on your local file system, run the following from the top-level briefcase directory:

$ nix-build -f . -iA emacs.nixos