Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

emacsorphanage/emamux

tmux manipulation from Emacs

emacsorphanage/emamux.json
{
"createdAt": "2012-07-11T14:59:40Z",
"defaultBranch": "master",
"description": "tmux manipulation from Emacs",
"fullName": "emacsorphanage/emamux",
"homepage": null,
"language": "Emacs Lisp",
"name": "emamux",
"pushedAt": "2021-11-18T00:10:07Z",
"stargazersCount": 269,
"topics": [],
"updatedAt": "2025-08-22T19:58:12Z",
"url": "https://github.com/emacsorphanage/emamux"
}

emamux.el [![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]

Section titled “emamux.el [![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]”

Interact with tmux from Emacs.

![emamux_run_command]!(image/run_command_screenshot.png)

emamux.el let emacs interact with tmux. emamux.el is inspired by tslime.vim and vimux.

emamux is available on MELPA and MELPA stable

You can install emamux with the following command.

M-x package-install [RET] emamux [RET]

  • Emacs 24 or higher.
  • tmux 1.5

Send command to specified target-session(session:window.pane).

Following is emamux:send-command demo with ido completion.

![send-command-demo]!(image/send-command-demo.gif)

target-session is set as default at first emamux:send-command called. You can change default target-session with C-u prefix.

Yank from tmux buffer.

Copy content of (car kill-ring) to tmux buffer

You can change buffer index with Numerical Prefix.

Following commands can be executed only within tmux

Run command in a small split pane(runner pane) where emacs is in.

Run last command in runner pane.

Zoom runner runner pane. This command requires tmux 1.8 or higher.

Move into the runner pane and enter the copy mode.

Close runner pane.

Close all other panes in current window.

Interrupt command which is running in runner-pane.

Clear tmux history in runner-pane

Completing read function type. You can choice from 'normal or 'ido, or 'helm.

Orientation of split pane, ‘vertical or ‘horizonal(Default is ‘vertical).

Height of runner-pane(Default is 20).

Use nearest pane as runner pane instead of splitting pane(Default is nil).

It is useful for using emamux to show session name, window index and pane index in tmux status bar.

# '#S' is session name, '#I' is window index, '#P' is pane index
set-option -g status-right '[#h###S:#I:#P]'

emamux defines default keymap. You can use it by following configuration.

;; Bind keymap prefix to Ctrl-z
(global-set-key (kbd "C-z") emamux:keymap)

Default keymap is as below.

KeyCommand
Prefix C-semamux:send-command
Prefix C-yemamux:yank-from-list-buffers
Prefix M-!emamux:run-command
Prefix M-remamux:run-last-command
Prefix M-semamux:run-region
Prefix C-iemamux:inspect-runner
Prefix C-kemamux:close-panes
Prefix C-cemamux:interrupt-runner
Prefix M-kemamux:clear-runner-history
Prefix cemamux:new-window
Prefix Cemamux:clone-current-frame
Prefix 2emamux:split-window
Prefix 3emamux:split-window-horizontally
(custom-set-variables
'(emamux:completing-read-type 'helm))

[melpa-link] !: https://melpa.org/#/emamux [melpa-stable-link] !: https://stable.melpa.org/#/emamux [melpa-badge] !: https://melpa.org/packages/emamux-badge.svg [melpa-stable-badge] !: https://stable.melpa.org/packages/emamux-badge.svg