-
Notifications
You must be signed in to change notification settings - Fork 96
Emacs Integration
Gaute Hope edited this page Sep 29, 2015
·
3 revisions
To configure Sup to use Emacs as an editor, set :editor: in
~/.sup/config.yaml to the emacs
command. Alternatively, use emacs -nw
to run Emacs in text mode.
Excerpt from ~/.sup/config.yaml:
:editor: emacs -nw
To configure emacs for writing mail, enable message-mode on files matching the regex "/sup.*eml$". Add this to your ~/.emacs:
(add-to-list 'auto-mode-alist '("/sup.*eml$" . message-mode))
If you want to enable some minor modes for convenience (e.g. auto-fill-mode, flyspell-mode) use a message-mode hook:
(add-hook 'message-mode-hook (lambda ()
(auto-fill-mode 1)
(flyspell-mode 1)))
To move the cursor down to the first empty line, add to the hook like this:
(add-hook 'message-mode-hook (lambda ()
(auto-fill-mode 1)
(flyspell-mode 1)
(search-forward-regexp "^$")))