Emacs 24.4 New Features (released 2014-10)

By Xah Lee. Date: . Last updated: .

This page is a on-going list of tips & tricks about Emacs 24.4. (released in )

If you are on linux and need to build it, see: How to Build Emacs on Linux

Editing Features

snake_case superword-mode

move cursor by jumping over _ ➢ for example: “snake_case”

See: Emacs: subword-mode, superword-mode, camelCase, snake_case

isearch-forward-symbol-at-point

new isearch-forward-symbol-at-point. See: Emacs 24.4: Search & Highlight Words

Auto Indentation

electric-indent-mode is on by default. Now, pressing Return ↩ also does indentation. To insert line-break without indent, press 【Ctrl+j】.

Or, turn off:

(electric-indent-mode 0) ; make return key not auto indent

indent-rigidlyCtrl+x Tab ↹】 changed. Call it, then press {【】, 【】} to adjust indentation, or press {【⇧ Shift+】, 【⇧ Shift+】} to adjust indentation by tab width.

By default, the selection is the beginning of current block up to current line.

Type any other key to exit.

Delete Duplicate Lines

delete-duplicate-lines will delete duplicated lines in current text selection. The lines need not be sorted. You can try it on this:

aaa
bb
cc
aaa
bb
aaa
bb

You can use linux shell tool to do the same. 〔➤see Emacs: Run Shell in Emacs〕. However, shell command have problems with Unicode, and does not work well on Microsoft Windows. 〔➤see Unix Shell Util uniq Unicode Bug

〔➤see Emacs: List/Delete/Highlight Matching Lines, Sort/Reverse Lines

rectangle-mark-mode

emacs 24.4 has a rectangle-mark-modeCtrl+x Space】.

Call rectangle-mark-mode, then move cursor to highlight a rectangular area. Press ⌦ Delete will delete text in that rectangle area.

This feature was part of cua-mode in emacs before.

Emacs: Edit Column Text, Rectangle Commands

Display “lambda” as λ

emacs pretty lambda 26110
emacs prettify-symbols-mode

Emacs: Display Lambda as λ

cycle-spacing

New command cycle-spacing. It's like a smart just-one-space. When called repeatedly, it cycles between: one space, no space, original spacing. (this is useless)

〔➤see Emacs Lisp: Shrink Whitespace Command

Bi-direction Text Arrow Key Direction

new variable: visual-order-cursor-movement. When true (t), 【】 always moves to the left, 【】 always moves to the right, disregarding the surrounding bidirectional context.

File Features

Unique Buffer Names

emacs 24.4, by default, buffer names are unique. This is done by:

;; uniquify buffer names
(require 'uniquify) ; bundled with GNU emacs 23.2.1 or before. On in 24.4
(setq uniquify-buffer-name-style 'post-forward-angle-brackets) ; emacs 24.4 style ➢ for example: cat.png<dirName>

call describe-variable then type uniquify-buffer-name-style to see examples of different style.

desktop-save-mode auto Save/Restore

With desktop-save-mode on, now it automatically save/restore opened files, windows config (number of windows, size, position), when quit & restart emacs.

Emacs: Save/Restore Opened Files, Windows Configuration: desktop-mode

Web Browser: Eww

emacs eww screenshot 2014-03-06
emacs eww browser

bundled web browser: Emacs: Using Eww Web Browser

Image Viewer New Feature

Emacs: View Image Files in Emacs

F11 Full Screen

call toggle-frame-fullscreenF11】 to go to full screen. 〔➤see Emacs's Keybinding Layout Diagram

Bookmark autosave

Bookmarks are automatically saved when emacs quit. This change may have happened before emacs 24.4. This change is not documented.

〔➤see Emacs: Using Bookmark Feature

Menu in Text Terminals

emacs menu in text terminal
emacs menu in text terminal (emacs 24.4)

Call menu-bar-openF10】 to open menu.

〔➤see Emacs: Command to Open Menu

Emacs Lisp Changes

New String Functions

Emacs Lisp: Trim String

Hash Table Functions

To use them, you need to first (require 'subr-x).

〔➤see Emacs Lisp: Hash Table

Reference

To read official list of new features, call view-emacs-news.

see also 〔Useful New Features in 24.4 By Artur Malabarba. @ http://endlessparentheses.com/useful-new-features-in-24-4.html

Like it? Buy Xah Emacs Tutorial. Thanks.