Following should work for any "configuration" of emacs, although I have only
tried these with doom.
Emacs in a terminal
Lately, I've started using emacs in a terminal using
But I came across a problem that
M-x key won't work. i.e. emacs never receives this keystroke.
Turns out this has to do with how the terminal handles keystrokes.
But at least I found a workaround. If I type Esc followed by FWIW, it worked only once. 🤷️
Find path to a binary
In terminal, one uses
which <binaryfile> to find the path of the binary (in
case shell picks wrong path, or if binary is not found)
The emacs equivalent is
M-; (executable-find "binary-file-name")
I've found this helpful when troubleshooting.
Thanks to doom-emacs discord channel*
M-! which <binaryfile> also works, it essentially calls
Do you like emacs so much that you wish you could use it in any edit field on any site on the internet ?
Now you can.
Try Emacs everywhere
I tried it with Doom emacs - works well.
Push branch using
M-x magit-push-matching seems closest to
git push origin HEAD
There are other
magit-push-.. commands that provide better control over where you want to push.
Read the Magit Manual for details.
Split hunk using magit
git add -p functionality from the terminal, I use
s i.e. split
hunk functionality a lot. But
magit apparently does not have it "out of the
One can achieve the same using emacs' "select lines"
magit-status buffer, navigate to the line/s you want to commit. Then using
C-@, select the line/s. Stage only those lines using s.
Rename a file
M-x rename-file (Works in Emacs 26+)
Change Doom logo
- Copy a logo file to some folder like say
- Add this to your
config.el. Save and restart via
SPC q r
(setq fancy-splash-image (concat doom-private-dir "misc/logo.png"))
(Found this via Doom Emacs Telegram channel)
Delete branches using
Doom has different keybindings, hence this section is under Doom emacs
- Go to the
LSP mode for elixir
elixir-ls locally :
git clone https://github.com/elixir-lsp/elixir-ls.git cd elixir-ls mix deps.get mix elixir_ls.release
This will create a
.bat for windows) file that
you will need for the Emacs integration, so note down this path (referred to
(Above instructions from elixir forum)
Then in your
config.el Add the following two lines:
(add-hook 'elixir-mode-hook #'lsp!) (add-to-list 'exec-path "path-to-elixir-ls/release")
(Above instructions from doom discord channel. Now may be outdated. Depending on when you read this)