summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvend Sorensen <svend@ciffer.net>2012-06-10 15:02:09 -0700
committerSvend Sorensen <svend@ciffer.net>2012-06-10 15:02:09 -0700
commit663edf5a4de7595f9e2a480db608f6b1ad537245 (patch)
tree9d3a253cad473dbef24fd931530b37690baa7a04
parent83a515437bd76f4690fedd15d28a3b9fc224ce06 (diff)
Add notes on using gnus-alias with notmuch
-rw-r--r--emacstips.mdwn34
1 files changed, 34 insertions, 0 deletions
diff --git a/emacstips.mdwn b/emacstips.mdwn
index 18f1c66..074c593 100644
--- a/emacstips.mdwn
+++ b/emacstips.mdwn
@@ -459,3 +459,37 @@ part.
2011-02-02. Note that if you have the Debian package easypg
installed, it will shadow the fixed version of easypg included with
emacs.
+
+## Multiple identities using gnus-alias
+
+gnus-alias allows you to define multiple identities when using
+message-mode. You can specify the from address, organization, extra
+headers (including Bcc), extra body text, and signature for each
+identity. Identities are chosen based on a set of rules. When you are
+in message mode, you can switch identities using gnus-alias.
+
+Here is an example configuration.
+
+ ;; Define two identities, "home" and "work"
+ (setq gnus-alias-identity-alist
+ '(("home"
+ nil ;; Does not refer to any other identity
+ "John Doe <jdoe@example.net>"
+ nil ;; No organization header
+ nil ;; No extra headers
+ nil ;; No extra body text
+ "~/.signature")
+ ("work"
+ nil
+ "John Doe <john.doe@example.com>"
+ "Example Corp."
+ (("Bcc" . "john.doe@example.com"))
+ nil
+ "~/.signature.work")))
+ ;; Use "home" identity by default
+ (setq gnus-alias-default-identity "home")
+ ;; Define rules to match work identity
+ (setq gnus-alias-identity-rules
+ '(("work" ("any" "john.doe@\\(example\\.com\\|help\\.example.com\\)" both) "work"))
+ ;; Determine identity when message-mode loads
+ (add-hook 'message-setup-hook 'gnus-alias-determine-identity)