Skip to content

Latest commit

 

History

History
78 lines (77 loc) · 4.66 KB

tips.org

File metadata and controls

78 lines (77 loc) · 4.66 KB

Emacs Tips and Useful links

Where to dowload latest Emacs binary?

How to build Emacs manually?

Clone Emacs source code from official repository

Build Emacs on macOS

  1. Install Xcode command line tools by xcode-select --install
  2. Install dependencies by brew install pkg-config gnutls (Hint: brew info emacs)
  3. ./configure --with-native-compilation
  4. make install -j$(nproc) NATIVE_FULL_AOT=1 (This step will assemble the app in nextstep/Emacs.app. See nextstep/INSTALL for more information.)
  5. Link or copy nextstep/Emacs.app to /Applications

Install Emacs Plus on macOS via homebrew

  1. Follow the instructions in https://github.com/d12frosted/homebrew-emacs-plus

Build Emacs on Debian-based GNU/Linux

  1. apt install build-essential and apt build-dep emacs. These commands install the necessary dependent packages.
  2. make (See INSTALL.REPO in the emacs repository for more information.)
  3. To use native elisp ahead-of-time compilation in Emacs 29, run ./autogen.sh && ./configure --with-native-compilation=aot && make -j$(nproc)
  4. After the build finished, emacs and emacsclient will be available under src and lib-src, respectively. Add them to the loading path of your preferred shell.

Emacs Lisp

Coding system

Packages

Eshell

Ivy

Hunspell

Org mode

  • C-c ': edit source code block.
  • C-c *: toggle the heading status
  • C-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 ^:{}

Server

Undo Tree

  • C-x u: undo-tree-visualize

magit

How to?

Find and replace a string in multiple files

Use wgrep, counsel-rg, ivy-occur

  1. Install wgrep.
  2. Use counsel-rg and type the search string.
  3. Press C-c C-o to convert to a `ivy-occur` buffer.
  4. Press C-x C-q or w to switch to edit mode.
  5. After editing the lines in buffers, press C-x C-s to save all.

Use dired

https://www.gnu.org/software/emacs/manual/html_node/efaq/Replacing-text-across-multiple-files.html

Enter Greek letters

Press C-u C-\ greek RET to switch to Greek input method. Leave by pressing C-\.