1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
|
<html lang="en">
<head>
<title>Identities - The MH-E Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="The MH-E Manual">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Aliases.html#Aliases" title="Aliases">
<link rel="next" href="Speedbar.html#Speedbar" title="Speedbar">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This is version 8.0.3 of `The MH-E
Manual', last updated 2006-11-12.
Copyright (C) 1995, 2001, 2002, 2003, 2005, 2006 Free
Software Foundation, Inc.
The MH-E manual is free documentation; you can redistribute it
and/or modify it under the terms of either:
a. the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
b. the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option)
any later version.
The MH-E manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License or GNU Free Documentation License for more
details.
The GNU General Public License and the GNU Free Documentation
License appear as appendices to this document. You may also
request copies by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Identities"></a>
Next: <a rel="next" accesskey="n" href="Speedbar.html#Speedbar">Speedbar</a>,
Previous: <a rel="previous" accesskey="p" href="Aliases.html#Aliases">Aliases</a>,
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">11 Identities</h2>
<p><a name="index-identities-1554"></a><a name="index-multiple-personalities-1555"></a>
MH-E supports the concept of multiple personalities or identities.
This means that you can easily have a different header and signature
at home and at work.
<p><a name="index-g_t_0040samp_007bIdentity_007d-menu-1556"></a><a name="index-menu_002c-_0040samp_007bIdentity_007d-1557"></a>
A couple of commands are used to insert identities in MH-Letter mode
which are also found in the `<samp><span class="samp">Identity</span></samp>' menu.
<a name="index-C_002dc-C_002dd-1558"></a>
<a name="index-mh_002dinsert_002didentity-1559"></a>
<dl><dt><kbd>C-c C-d</kbd><dd>Insert fields specified by given identity (<code>mh-insert-identity</code>).
<!-- -->
<a name="index-g_t_0040samp_007bIdentity-_003e-Insert-Auto-Fields_007d-menu-item-1560"></a><a name="index-menu-item_002c-_0040samp_007bIdentity-_003e-Insert-Auto-Fields_007d-1561"></a><a name="index-C_002dc-M_002dd-1562"></a><a name="index-mh_002dinsert_002dauto_002dfields-1563"></a><br><dt><kbd>C-c M-d</kbd><dd>Insert custom fields if recipient found in <code>mh-auto-fields-list</code>
(<code>mh-insert-auto-fields</code>).
</dl>
<p><a name="index-g_t_0040samp_007bmh_002didentity_007d-customization-group-1564"></a><a name="index-customization-group_002c-_0040samp_007bmh_002didentity_007d-1565"></a>
The `<samp><span class="samp">mh-identity</span></samp>' customization group contains the following
options.
<dl>
<dt><code>mh-auto-fields-list</code><a name="index-mh_002dauto_002dfields_002dlist-1566"></a><dd>List of recipients for which header lines are automatically inserted
(default: <code>nil</code>).
<!-- -->
<br><dt><code>mh-auto-fields-prompt-flag</code><a name="index-mh_002dauto_002dfields_002dprompt_002dflag-1567"></a><dd>On means to prompt before sending if fields inserted (default:
`<samp><span class="samp">on</span></samp>')
<!-- -->
<br><dt><code>mh-identity-default</code><a name="index-mh_002didentity_002ddefault-1568"></a><dd>Default identity to use when <code>mh-letter-mode</code> is called (default:
`<samp><span class="samp">None</span></samp>').
<!-- -->
<br><dt><code>mh-identity-handlers</code><a name="index-mh_002didentity_002dhandlers-1569"></a><dd>Handler functions for fields in <code>mh-identity-list</code>.
<!-- -->
<br><dt><code>mh-identity-list</code><a name="index-mh_002didentity_002dlist-1570"></a><dd>List of identities (default: <code>nil</code>).
</dl>
<p>Some of the common header fields that people change depending on the
context are the `<samp><span class="samp">From:</span></samp>' and `<samp><span class="samp">Organization:</span></samp>' fields, as well
as the signature.
<p><a name="index-mh_002didentity_002dlist-1571"></a>
This is done by customizing the option <code>mh-identity-list</code>. In the
customization buffer for this option, click on the `<samp><span class="samp">INS</span></samp>' button
and enter a label such as `<samp><span class="samp">Home</span></samp>' or `<samp><span class="samp">Work</span></samp>'. Then click on
the `<samp><span class="samp">INS</span></samp>' button with the label `<samp><span class="samp">Add at least one item
below</span></samp>'. The `<samp><span class="samp">Value Menu</span></samp>' has the following menu items:
<a name="index-header-field_002c-_0040samp_007bFrom_003a_007d-1572"></a>
<a name="index-g_t_0040samp_007bFrom_003a_007d-header-field-1573"></a>
<dl><dt>`<samp><span class="samp">From Field</span></samp>'<dd>Specify an alternate `<samp><span class="samp">From:</span></samp>' header field. You must include a
valid email address. A standard format is `<samp><span class="samp">First Last
<login@host.domain></span></samp>'. If you use an initial with a period, then you
must quote your name as in `<samp><span class="samp">"First I. Last"
<login@host.domain></span></samp>'.
<!-- -->
<a name="index-header-field_002c-_0040samp_007bOrganization_003a_007d-1574"></a><a name="index-g_t_0040samp_007bOrganization_003a_007d-header-field-1575"></a><br><dt>`<samp><span class="samp">Organization Field</span></samp>'<dd>People usually list the name of the company where they work here.
<!-- -->
<br><dt>`<samp><span class="samp">Other Field</span></samp>'<dd>Set any arbitrary header field and value here. Unless the header field
is a standard one, precede the name of your field's label with
`<samp><span class="samp">X-</span></samp>', as in `<samp><span class="samp">X-Fruit-of-the-Day:</span></samp>'.
<!-- -->
<br><dt>`<samp><span class="samp">Attribution Verb</span></samp>'<dd>This value overrides the setting of
<code>mh-extract-from-attribution-verb</code>. See <a href="Inserting-Letter.html#Inserting-Letter">Inserting Letter</a>.
<!-- -->
<a name="index-signature-1576"></a><a name="index-mh_002dsignature_002dfile_002dname-1577"></a><br><dt>`<samp><span class="samp">Signature</span></samp>'<dd>Set your signature with this item. You can specify the contents of
<code>mh-signature-file-name</code>, a file, or a function.
See <a href="Signature.html#Signature">Signature</a>.
<!-- -->
<br><dt>`<samp><span class="samp">GPG Key ID</span></samp>'<dd>Specify a different key to sign or encrypt messages.
</dl>
<p><a name="index-Identity-menu-1578"></a><a name="index-menu_002c-Identity-1579"></a><a name="index-mh_002dinsert_002didentity-1580"></a><a name="index-C_002dc-C_002dd-1581"></a>
You can select the identities you have added via the menu called
`<samp><span class="samp">Identity</span></samp>' in the MH-Letter buffer. You can also use <kbd>C-c
C-d</kbd> (<code>mh-insert-identity</code>). To clear the fields and signature
added by the identity, select the `<samp><span class="samp">None</span></samp>' identity.
<p><a name="index-menu-item_002c-_0040samp_007bIdentity-_003e-Customize-Identities_007d-1582"></a><a name="index-menu-item_002c-_0040samp_007bIdentity-_003e-Save-as-Default_007d-1583"></a><a name="index-menu-item_002c-_0040samp_007bIdentity-_003e-Set-Default-for-Session_007d-1584"></a><a name="index-g_t_0040samp_007bIdentity-_003e-Customize-Identities_007d-menu-item-1585"></a><a name="index-g_t_0040samp_007bIdentity-_003e-Save-as-Default_007d-menu-item-1586"></a><a name="index-g_t_0040samp_007bIdentity-_003e-Set-Default-for-Session_007d-menu-item-1587"></a><a name="index-mh_002didentity_002ddefault-1588"></a>
The `<samp><span class="samp">Identity</span></samp>' menu contains two other items to save you from
having to set the identity on every message. The menu item `<samp><span class="samp">Set
Default for Session</span></samp>' can be used to set the default identity to the
current identity until you exit Emacs. The menu item `<samp><span class="samp">Save as
Default</span></samp>' sets the option <code>mh-identity-default</code> to the current
identity setting. You can also customize the option
<code>mh-identity-default</code> in the usual fashion. If you find that you
need to add another identity, the menu item `<samp><span class="samp">Customize
Identities</span></samp>' is available for your convenience.
<p><a name="index-regular-expressions_002c-_0040code_007bmh_002dauto_002dfields_002dlist_007d-1589"></a><a name="index-mh_002dauto_002dfields_002dlist-1590"></a>
The option <code>mh-auto-fields-list</code> can also be used to set the
identity depending on the recipient to provide even more control. To
customize <code>mh-auto-fields-list</code>, click on the `<samp><span class="samp">INS</span></samp>' button
and enter a regular expression for the recipient's address
(see the section
<a href="http://www.gnu.org/software/emacs/manual/html_node/Regexps.html">Syntax of Regular Expressions</a> in
<cite>The GNU Emacs Manual</cite>).
Click on the `<samp><span class="samp">INS</span></samp>' button with the `<samp><span class="samp">Add at least one item
below</span></samp>' label. The `<samp><span class="samp">Value Menu</span></samp>' contains the following menu items:
<dl>
<dt>`<samp><span class="samp">Identity</span></samp>'<dd>Select an identity from those configured in <code>mh-identity-list</code>.
All of the information for that identity will be added if the
recipient matches.
<!-- -->
<a name="index-g_t_0040samp_007bFcc_003a_007d-header-field-1591"></a><a name="index-header-field_002c-_0040samp_007bFcc_003a_007d-1592"></a><br><dt>`<samp><span class="samp">Fcc Field</span></samp>'<dd>Insert an `<samp><span class="samp">Fcc:</span></samp>' header field with the folder you provide. When
you send the message, MH will put a copy of your message in this
folder.
<!-- -->
<a name="index-g_t_0040samp_007bMail_002dFollowup_002dTo_003a_007d-header-field-1593"></a><a name="index-header-field_002c-_0040samp_007bMail_002dFollowup_002dTo_003a_007d-1594"></a><br><dt>`<samp><span class="samp">Mail-Followup-To Field</span></samp>'<dd>Insert an `<samp><span class="samp">Mail-Followup-To:</span></samp>' header field with the recipients
you provide. If the recipient's mail user agent supports this header
field<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>, then
their replies will go to the addresses listed. This is useful if their
replies go both to the list and to you and you don't have a mechanism
to suppress duplicates. If you reply to someone not on the list, you
must either remove the `<samp><span class="samp">Mail-Followup-To:</span></samp>' field, or ensure the
recipient is also listed there so that he receives replies to your
reply.
<!-- -->
<br><dt>`<samp><span class="samp">Other Field</span></samp>'<dd>Other header fields may be added using this menu item.
</dl>
<p><a name="index-mh_002dinsert_002dauto_002dfields-1595"></a><a name="index-C_002dc-M_002dd-1596"></a><a name="index-mh_002dauto_002dfields_002dprompt_002dflag-1597"></a>
These fields can only be added after the recipient is known. Because
you can continue to add recipients as you edit the draft, MH-E waits
until the message is sent to perform the auto-insertions. This seems
strange at first, but you'll get used to it. There are two ways to
help you feel that the desired fields are added. The first is the
action when the message is sent: if any fields are added
automatically, you are given a chance to see and to confirm these
fields before the message is actually sent. You can do away with this
confirmation by turning off the option
<code>mh-auto-fields-prompt-flag</code>. The second method is manual: once
the header contains one or more recipients, you may run the command
<kbd>C-c M-d</kbd> (<code>mh-insert-auto-fields</code>) or choose the
`<samp><span class="samp">Identity -> Insert Auto Fields</span></samp>' menu item to insert these fields
manually. However, if you use this command, the automatic insertion
when the message is sent is disabled.
<p><a name="index-mh_002dauto_002dfields_002dlist-1598"></a><a name="index-mh_002didentity_002dlist-1599"></a>
You should avoid using the same header field in
<code>mh-auto-fields-list</code> and <code>mh-identity-list</code> definitions
that may apply to the same message as the result is undefined.
<p><a name="index-mh_002didentity_002dhandlers-1600"></a><a name="index-mh_002didentity_002dlist-1601"></a>
The option <code>mh-identity-handlers</code> is used to change the way that
fields, signatures, and attributions in <code>mh-identity-list</code> are
added. To customize <code>mh-identity-handlers</code>, replace the name of
an existing handler function associated with the field you want to
change with the name of a function you have written. You can also
click on an `<samp><span class="samp">INS</span></samp>' button and insert a field of your choice and
the name of the function you have written to handle it.
<p><a name="index-mh_002didentity_002dlist-1602"></a>
The `<samp><span class="samp">Field</span></samp>' field can be any field that you've used in your
<code>mh-identity-list</code>. The special fields `<samp><span class="samp">:attribution-verb</span></samp>',
`<samp><span class="samp">:signature</span></samp>', or `<samp><span class="samp">:pgg-default-user-id</span></samp>' are used for the
<code>mh-identity-list</code> choices `<samp><span class="samp">Attribution Verb</span></samp>',
`<samp><span class="samp">Signature</span></samp>', and `<samp><span class="samp">GPG Key ID</span></samp>' respectively.
<p>The handler associated with the `<samp><span class="samp">:default</span></samp>' field is used when no
other field matches.
<p>The handler functions are passed two or three arguments: the field
itself (for example, `<samp><span class="samp">From</span></samp>'), or one of the special fields (for
example, `<samp><span class="samp">:signature</span></samp>'), and the action `<samp><span class="samp">'remove</span></samp>' or
`<samp><span class="samp">'add</span></samp>'. If the action is `<samp><span class="samp">'add</span></samp>', an additional argument
containing the value for the field is given.
<div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> `<samp><span class="samp">Mail-Followup-To:</span></samp>' is supported by nmh.</p>
<p><hr></div>
</body></html>
|