2
1
Fork
You've already forked mu4e-walk
0
Send email addresses in mu4e for a walk. https://codeberg.org/timmli/mu4e-walk
  • Emacs Lisp 100%
Find a file
2025年12月16日 21:15:22 +01:00
LICENSE Add license text 2025年09月15日 08:28:12 +02:00
mu4e-walk.el Make mu4e-walk-extend-key more restrictive 2025年12月16日 21:15:22 +01:00
README.org Update README.org 2025年11月28日 16:23:06 +01:00
screencast.gif README.org: Add screencast 2025年09月09日 17:26:46 +02:00

mu4e-walk: Send email addresses for a walk

https://melpa.org/packages/mu4e-walk-badge.svg

Move email addresses around when composing emails with mu4e in Emacs.

/timmli/mu4e-walk/media/branch/master/screencast.gif (The screencast shows the Monokai theme.)

This README uses Org mode.

Features

When composing an email with mu4e, one can move around email addresses in the header with just one key stroke:

  • Move email address "vertically" between address fields (identified with message-email-recipient-header-regexp)
  • Move email address "horizontally" within an address field
  • Also works with regions!
  • Switch "vertically" and "horizontally" between email addresses.
  • Delete an email address at point.

Installation

Dependencies

  • mu4e (mainly because it hooks into mu4e-compose-mode)

Installation with Melpa

Assuming use-package, just add the following to your init file:

(use-package mu4e-walk
 :after mu4e
 :ensure t
	:config
	(add-hook 'mu4e-compose-mode-hook 'mu4e-walk-add-keybindings-compose-mode) ; Optional
)

Installation from Github

Download mu4e-walk.el to your .emacs.d folder and add the following code to your init file:

(use-package mu4e-walk
 :after mu4e
 :load-path "relative/path/to/mu4e-walk.el")
	:config
	(add-hook 'mu4e-compose-mode-hook 'mu4e-walk-add-keybindings-compose-mode) ; Optional
)

Usage

The most important functions and keybindings are:

Function Keybinding
mu4e-walk-up M-<up>
mu4e-walk-down M-<down>
mu4e-walk-left M-<left>
mu4e-walk-right M-<right>
mu4e-walk-switch-up C-<up>
mu4e-walk-switch-down C-<down>
mu4e-walk-switch-left C-<left>
mu4e-walk-switch-right C-<right>
mu4e-walk-delete-email-address-at-point M-<delete> M-<delete>

Configuration

For customizing the keybindings, take a look at the function mu4e-walk-add-keybindings-compose-mode.

By default, it looks like this:

(defun mu4e-walk-add-keybindings-compose-mode ()
 "Function which is added to a mode hook."
 (use-local-map (copy-keymap mu4e-compose-mode-map))
 (mu4e-walk-extend-key "M-<up>" 'mu4e-walk-up)
 (mu4e-walk-extend-key "M-<down>" 'mu4e-walk-down)
 (mu4e-walk-extend-key "M-<left>" 'mu4e-walk-left)
 (mu4e-walk-extend-key "M-<right>" 'mu4e-walk-right))

One can change the keybindings by modifying the first argument of mu4e-walk-extend-key in the definition, for example:

(defun mu4e-walk-add-keybindings-compose-mode ()
 "Function which is added to a mode hook."
 (use-local-map (copy-keymap mu4e-compose-mode-map))
 (mu4e-walk-extend-key "C-<up>" 'mu4e-walk-up)
 (mu4e-walk-extend-key "C-<down>" 'mu4e-walk-down)
 (mu4e-walk-extend-key "C-<left>" 'mu4e-walk-left)
 (mu4e-walk-extend-key "C-<right>" 'mu4e-walk-right))

The reason for using mu4e-walk-add-keybindings-compose-mode is that the mu4e-walk keybindings should only be active in the header of a message. When the cursor is in the body, the global keybindings should be used. (In my case, this is move-text-up etc.)

Ideas & plans

As for my own needs, mu4e-walk is currently feature-complete.

Alternative and related Emacs packages

As far as I know, there are no similar packages.