Emacs: Misc Init Tips

By Xah Lee. Date: . Last updated: .

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)
)

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

(setq pop-up-frames t)