]> git.cworth.org Git - notmuch-wiki/commitdiff
some more pointers & tips for gnus-alias...
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 13 Jun 2012 20:34:49 +0000 (23:34 +0300)
committerTomi Ollila <tomi.ollila@iki.fi>
Wed, 13 Jun 2012 20:34:49 +0000 (23:34 +0300)
emacstips.mdwn

index 074c593dfa27286c12a67b67f553bbe69a6f509f..a5b724712a3169a04e61ad11fdb440cb2072f442 100644 (file)
@@ -462,30 +462,46 @@ part.
 
 ## 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.
+[gnus-alias](http://www.emacswiki.org/emacs/GnusAlias) 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.
+
+### "Installation"
+
+- put `gnus-alias.el` on your load Emacs-Lisp load path (add new directory
+  to load path by writing `(add-to-list 'load-path "/some/load/path")` into
+  your `.emacs`.
+
+- Add the following to your `.emacs`
+
+        (autoload 'gnus-alias-determine-identity "gnus-alias" "" t)
+        (add-hook 'message-setup-hook 'gnus-alias-determine-identity)
+
+Looking into `gnus-alias.el` gives a bit more information...
+
+### Example Configuration 
 
 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")))
+                 nil ;; Does not refer to any other identity
+                 "John Doe <jdoe@example.net>" ;; Sender address
+                 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
@@ -493,3 +509,20 @@ Here is an example configuration.
               '(("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)
+
+When `gnus-alias` has been loaded (using autoload, require, *M-x load-library*
+or *M-x load-file* (load-file takes file path -- therefore it can be used
+without any `.emacs` changes)) the following commands can be used to get(/set)
+more information (some of these have "extensive docvumentation"):
+
+        M-x describe-variable RET gnus-alias-identity-alist
+        M-x describe-variable RET gnus-alias-identity-rules
+        M-x describe-variable RET gnus-alias-default-identity
+
+        M-x customize-group RET gnus-alias RET
+          or 
+        M-x gnus-alias-customize RET
+
+The last two do the same thing.
+
+See also the **Usage:** section in `gnus-alias.el`.