[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-devel] Emacs Integration wiki page



Emacs!

The following changes since commit 96c7fdd5fb4d9bc99e70a050eba72c31e445:

  Template (2014-04-24 01:01:53 -0700)

are available in the git repository at:

  https://linux.ucla.edu/~sankeytm/repos/sup.wiki.git master

for you to fetch changes up to a61957168fb14fc45926c8e4ac78ea9e35b36aa0:

  added page for Emacs Integration (2014-05-19 21:57:21 -0700)

----------------------------------------------------------------
Troy Sankey (1):
      added page for Emacs Integration

 Emacs-Integration.md | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Emacs-Integration.md

diff --git a/Emacs-Integration.md b/Emacs-Integration.md
new file mode 100644
index 0000000..ecfcc59
--- /dev/null
+++ b/Emacs-Integration.md
@@ -0,0 +1,37 @@
+# Emacs Integration
+
+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_:
+
+```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_:
+
+```elisp
+(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:
+
+```elisp
+(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:
+
+```elisp
+(add-hook 'message-mode-hook (lambda ()
+  (auto-fill-mode 1)
+  (flyspell-mode 1)
+  (search-forward-regexp "^$")))
+```

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel