Emacs: Misc Init Tips

By Xah Lee. Date: . Last updated: .

make mode line compact (emacs 28)

(setq mode-line-compact t)

Type y/n instead of yes/no

(if (version< emacs-version "28.1")
    (defalias 'yes-or-no-p 'y-or-n-p)
  (setq use-short-answers t))

disable warnings

Emacs by default will warn you when you use some commands for the first time. You have to answer yes or no. They are annoying.

(progn
  ;; stop warning prompt for some commands. There's always undo.
  (put 'narrow-to-region 'disabled nil)
  (put 'narrow-to-page 'disabled nil)
  (put 'upcase-region 'disabled nil)
  (put 'downcase-region 'disabled nil)
  (put 'erase-buffer 'disabled nil)
  (put 'scroll-left 'disabled nil)
  (put 'dired-find-alternate-file 'disabled nil)
)

set minibuffer height

;; big minibuffer height, for fido or ido to show choices vertically
(setq max-mini-window-height 0.5)

misc

stop cursor blinking

;; make cursor not blink
(blink-cursor-mode 0)

set cursor to i-beam

(modify-all-frames-parameters (list (cons 'cursor-type 'bar)))

Note: this will not work if you run emacs in terminal.

set up emacs so that each file opens in a new window

Put this in your Emacs Init File:

(setq pop-up-frames t)

Emacs Init

Init Basics

Keys

Font

Text Editing

Completion

File

Restore Things

Backup/AutoSave

Line

Appearance

Misc

Advanced Init Tips

packages