- GNU Official Windows Binaries
- Mac Universal Binaries (
brew cask install emacs
) - Emacs Mac Port
Clone Emacs source code from official repository
- Install Xcode command line tools by
xcode-select --install
- Install dependencies by
brew install pkg-config gnutls
(Hint:brew info emacs
) ./configure --with-native-compilation
make install -j$(nproc) NATIVE_FULL_AOT=1
(This step will assemble the app innextstep/Emacs.app
. Seenextstep/INSTALL
for more information.)- Link or copy
nextstep/Emacs.app
to/Applications
- Follow the instructions in https://github.com/d12frosted/homebrew-emacs-plus
apt install build-essential
andapt build-dep emacs
. These commands install the necessary dependent packages.make
(SeeINSTALL.REPO
in the emacs repository for more information.)- To use native elisp ahead-of-time compilation in Emacs 29, run
./autogen.sh && ./configure --with-native-compilation=aot && make -j$(nproc)
- After the build finished,
emacs
andemacsclient
will be available undersrc
andlib-src
, respectively. Add them to the loading path of your preferred shell.
- “Wrong type argument: commandp” error
- eval-after-load vs. mode hook
- Call function with prefix argument programmatically
- Directory name and its name as a file
- Prefix Command Arguments
- File variables
- Use
trace-function
to see the callstack of a given function.
- Use
describe-coding-system
to show current coding system. - Use
set-buffer-file-coding-system
(orC-x RET f
) to convert the current buffer to a coding system. - http://www.masteringemacs.org/articles/2012/08/09/working-coding-systems-unicode-emacs/
- http://www.reai.us/windows-emacs-encoding
- During selecting a candidate, press
M-o
to select an action to perform. https://oremacs.com/swiper/#how-can-different-actions-be-called
- Check installed dictionaries:
hunspell -D
- Download en_US dictionary
- On Mac OS, dictionaries can be installed under
~/Library/Spelling/
- Hunspell executable for Windows
C-c '
: edit source code block.C-c *
: toggle the heading statusC-c -
: toggle the items in plain list.C-c ^
: sort the plain list.C-c C-e b
: export the file to HTML and show it in browser.C-c C-l
: insert a link.C-c C-x C-f
: insert or change emphasis.C-u C-c C-l
: insert a file link.- Adjust exported headline levels
- Support languages in source code block
org-export-with-sub-superscripts
: Interpret “_” and “^” for export. Set^:{}
C-x u
: undo-tree-visualize
M-x magit-toggle-verbose-refresh
to debug magit performance issue https://magit.vc/manual/magit/Performance.html https://jakemccrary.com/blog/2020/11/14/speeding-up-magit/
- Install
wgrep
. - Use
counsel-rg
and type the search string. - Press
C-c C-o
to convert to a `ivy-occur` buffer. - Press
C-x C-q
orw
to switch to edit mode. - After editing the lines in buffers, press
C-x C-s
to save all.
https://www.gnu.org/software/emacs/manual/html_node/efaq/Replacing-text-across-multiple-files.html
Press C-u C-\ greek RET
to switch to Greek input method. Leave by pressing C-\
.