b872e8c7f6099d79a71f16c39ba47fba3507a919
[elisp/gnus-doc-ja.git] / auth-ja.texi
1 \input texinfo                  @c -*-texinfo-*-
2 @setfilename auth-ja
3 @settitle Emacs auth-source Library @value{VERSION}
4
5 @set VERSION 0.2
6
7 @copying
8 \e$B$3$N%U%!%$%k$O\e(B Emacs auth-source \e$B%i%$%V%i%j!<$r@bL@$7$^$9!#\e(B
9
10 Copyright @copyright{} 2008, 2009, 2010 Free Software Foundation, Inc.
11
12 @quotation
13 Permission is granted to copy, distribute and/or modify this document
14 under the terms of the GNU Free Documentation License, Version 1.3 or
15 any later version published by the Free Software Foundation; with no
16 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
17 and with the Back-Cover Texts as in (a) below.  A copy of the license
18 is included in the section entitled ``GNU Free Documentation License''
19 in the Emacs manual.
20
21 \e$B$3$NJ8=q$r!"%U%j!<%=%U%H%&%'%":bCDH/9T$N\e(B GNU \e$B%U%j!<J8=qMxMQ5vBz7@Ls=q\e(B
22 \e$BBh\e(B 1.3 \e$BHG$^$?$O$=$l0J9_$NHG$,Dj$a$k>r7o$N2<$GJ#@=!"G[I[!"$"$k$$$OJQ99$9\e(B
23 \e$B$k$3$H$r5v2D$7$^$9!#JQ99IT2DItJ,$O;XDj$7$^$;$s!#!H\e(BA GNU Manual\e$B!I$OI=I=;f\e(B
24 \e$B%F%-%9%H!"0J2<$N\e(B (a) \e$B$ON"I=;f%F%-%9%H$G$9!#$3$NMxMQ5vBz7@Ls=q$NJ#<L\e(B
25 \e$B$O\e(B Emacs \e$B%^%K%e%"%k$N!V\e(BGNU \e$B%U%j!<J8=qMxMQ5vBz7@Ls=q!W$H$$$&>O$K4^$^$l$F\e(B
26 \e$B$$$^$9!#\e(B
27
28 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
29 modify this GNU manual.  Buying copies from the FSF supports it in
30 developing GNU and promoting software freedom.''
31
32 (a) FSF \e$B$NN"I=;f%F%-%9%H\e(B:\e$B!V$"$J$?$K$O$3$N\e(B GNU Manual \e$B$rJ#@=$7$?$jJQ99$9\e(B
33 \e$B$k<+M3$,$"$j$^$9!#\e(BFSF \e$B$+$i$NJ#<L$N9XF~$O\e(B GNU \e$B$N3+H/$H%=%U%H%&%'%"$N<+M3\e(B
34 \e$B$NB%?J$r;Y1g$7$^$9!#!W\e(B
35
36 This document is part of a collection distributed under the GNU Free
37 Documentation License.  If you want to distribute this document
38 separately from the collection, you can do so by adding a copy of the
39 license to the document, as described in section 6 of the license.
40
41 \e$B$3$NJ8=q$O!V\e(BGNU \e$B%U%j!<J8=qMxMQ5vBz7@Ls=q!W$K4p$E$$$FG[I[$5$l$?<}=8Cx:nJ*\e(B
42 \e$B$N0lIt$G$9!#$b$7$"$J$?$,$3$NJ8=q$r<}=8Cx:nJ*$+$iJ,N%$7$FG[I[$7$?$$$H$-$O!"\e(B
43 \e$B7@Ls=q$NBh\e(B 6 \e$B9`$K5-=R$5$l$F$$$k$h$&$K!"J8=q$K7@Ls=q$NJ#<L$rIU2C$9$k$3$H\e(B
44 \e$B$K$h$C$F!"9T$J$&$3$H$,$G$-$^$9!#\e(B
45 @end quotation
46 @end copying
47
48 @dircategory Emacs
49 @direntry
50 * Auth-source-ja: (auth-ja).    The Emacs auth-source library (Japanese).
51 @end direntry
52
53 @titlepage
54 @title Emacs auth-source Library
55 @author by Ted Zlatanov
56 @page
57 @vskip 0pt plus 1filll
58 @insertcopying
59 @end titlepage
60
61 @contents
62
63 @ifnottex
64 @node Top
65 @top Emacs auth-source
66 \e$B$3$N%^%K%e%"%k$O\e(B Emacs auth-source \e$B%i%$%V%i%j!<$r@bL@$7$^$9!#\e(B
67
68 \e$BMxMQ<T$NJX59$N$?$a$K!"J#?t$N%"%W%j%1!<%7%g%s$G!"\e(B(Emacs \e$B$^$?$O%U%!%$%k$K\e(B
69 \e$B$"$k\e(B) \e$B0l$D$N@_Dj$r6&M-$9$k$?$a$N<jCJ$G$9!#\e(B
70
71 @insertcopying
72
73 @menu
74 * Overview::                    auth-source \e$B%i%$%V%i%j!<$N35MW\e(B
75 * Help for users::
76 * Secret Service API::
77 * Help for developers::
78 * GnuPG and EasyPG Assistant Configuration::
79 * Index::
80 * Function Index::
81 * Variable Index::
82 @end menu
83 @end ifnottex
84
85 @node Overview
86 @chapter \e$B35MW\e(B
87
88 auth-source \e$B%i%$%V%i%j!<$O!"!V%5!<%P!<L>$H%]!<%H$O$o$+$C$F$k$s$@$1$I!"%f!<\e(B
89 \e$B%6!<L>$H%Q%9%o!<%I$O2?$@$C$1\e(B?\e$B!W$H$$$&@N$J$,$i$NG.Nu$JLd$$$KEz$($k$?$a$N!"\e(B
90 Emacs \e$B$H\e(B Gnus \e$BMQ$N?t$"$kC1=c$J<jCJ$N0l$D$G$9!#\e(B
91
92 \e$B<B:]$K$O\e(B auth-source \e$B%i%$%V%i%j!<$OC1$J$k%f!<%6!<L>\e(B (\e$B$$$o$f$k\e(B login) \e$B$d\e(B
93 \e$B%Q%9%o!<%I0J30$N$b$N$b07$&$3$H$,$G$-$^$9$,!":#F|$N\e(B Emacs \e$B$H\e(B Gnus \e$B$G$O$=\e(B
94 \e$B$l$i\e(B 2\e$B$D$@$1$,;H$o$l$F$$$^$9!#F1MM$K\e(B auth-source \e$B%i%$%V%i%j!<$OB?$/$N5-\e(B
95 \e$BO?7A<0!"8=:_$OEAE}E*$J\e(B ``netrc'' \e$B7A<0\e(B (\e$B$3$NJ8=q$N8e$NJ}$K$"$j$^$9\e(B) \e$B$^$?\e(B
96 \e$B$O%7!<%/%l%C%H%5!<%S%9\e(B API \e$B$r%5%]!<%H$7$^$9!#\e(B
97
98 @node Help for users
99 @chapter \e$BMxMQ<T$N$?$a$N%X%k%W\e(B
100
101 ``Netrc'' \e$B%U%!%$%k$O;v<B>e$NI8=`$G$9!#$=$l$i$O$3$N$h$&$K$J$C$F$$$^$9\e(B:
102 @example
103 machine @var{mymachine} login @var{myloginname} password @var{mypassword} port @var{myport}
104 @end example
105
106 machine \e$B$O%5!<%P!<$G$9\e(B (DNS \e$BL>$^$?$O\e(B IP \e$B%"%I%l%9\e(B)\e$B!#\e(B
107
108 \e$B%]!<%H$N;XDj$OL5$/$F$b9=$$$^$;$s!#L5$$>l9g!"\e(Bauth-source \e$B$O$I$s$J%]!<%H\e(B
109 \e$B$b\e(B OK \e$B$J$N$@$H2r<a$7$^$9!#<B:]$N$H$3$m!"%]!<%H$O%W%m%H%3%k$NL>A0$+%]!<%H\e(B
110 \e$BHV9f$N$I$A$i$G$bNI$$$N$G!"$b$7$=$&$7$?$$$N$J$i$P!"%]!<%H\e(B @var{143} \e$B$H%W\e(B
111 \e$B%m%H%3%k\e(B @code{imap} \e$B$N$?$a$N9`L\$rJL!9$K;}$D$3$H$,$G$-$^$9!#$H$b$"$l!"\e(B
112 \e$B$b$7%]!<%H$N;XDj$,MW$i$J$$>l9g$O>JN,$7$F$b9=$$$^$;$s!#\e(B
113
114 login \e$B$H\e(B password \e$B$O!"%5!<%P!<$KBP$7$F4J7i$K$"$J$?$N%m%0%$%s;q3J$r>ZL@$9\e(B
115 \e$B$k$?$a$N$b$N$G$9!#\e(B
116
117 ``Netrc'' \e$B%U%!%$%k$ODL>o\e(B @code{.authinfo} \e$B$^$?$O\e(B @code{.netrc} \e$B$H8F$P$l\e(B
118 \e$B$^$9!#:#$G$O\e(B @code{.authinfo} \e$B$NJ}$,Ia5Z$7$F$$$k$h$&$J$N$G!"8e$G$o$+$k$h\e(B
119 \e$B$&$K\e(B auth-source \e$B%i%$%V%i%j!<$O$=$l$r%G%#%U%)%k%H$K$9$k$3$H$K$h$C$F!"$3\e(B
120 \e$B$N:.Mp$r=uD9$7$F$$$^$9!#\e(B
121
122 \e$B$b$7%]!<%H$GLdBj$,$"$k$N$J$i\e(B @code{auth-source-debug} \e$B$r\e(B @code{t} \e$B$K@_Dj\e(B
123 \e$B$7$F!"%i%$%V%i%j!<$,$I$N%]!<%H$r%A%'%C%/$7$F$$$k$+\e(B
124 \e$B$r\e(B @code{*Messages*} \e$B%P%C%U%!!<$G8+$F$/$@$5$$!#F1MM$KB>$N$I$s$JLdBj$K$D\e(B
125 \e$B$$$F$b!"2?$,%A%'%C%/$5$l$F$$$k$+$rD4$Y$k$N$,!"$"$J$?$NBh0lJb$G$9!#BhFs$N\e(B
126 \e$B%9%F%C%W$O$b$A$m$s$=$l$K$D$$$F$N\e(B blog \e$B$r=q$$$F!"%3%a%s%H$G2sEz$rBT$D$3$H\e(B
127 \e$B$G$9!#\e(B
128
129 \e$BJQ?t\e(B @code{auth-sources} \e$B$r%+%9%?%^%$%:$9$k$3$H$,$G$-$^$9!#$b$78E$$%P!<\e(B
130 \e$B%8%g%s$N\e(B Emacs \e$B$r;H$C$F$$$k$+!"2?$+$NM}M3$N$?$a$K\e(B auth-source \e$B%i%$%V%i%j!<\e(B
131 \e$B$,FI$_9~$^$l$J$$>l9g!"<!$N$b$N$,I,MW$K$J$k$G$7$g$&!#\e(B
132
133 @lisp
134 (require 'auth-source)             ;; \e$B$*$=$i$/ITMW\e(B
135 (customize-variable 'auth-sources) ;; \e$BG$0U!"0l2s$@$19T$J$C$F$/$@$5$$\e(B
136 @end lisp
137
138 @defvar auth-sources
139 @code{auth-sources} \e$BJQ?t$O!"8D!9$N%[%9%H$H%W%m%H%3%k$N$?$a$N\e(B netrc \e$B%U%!\e(B
140 \e$B%$%k$^$?$O%7!<%/%l%C%H%5!<%S%9\e(B API \e$B$N<}=8J*$,$I$3$K:_$k$+\e(B
141 \e$B$r\e(B auth-source \e$B%i%$%V%i%j!<$KCN$i$;$^$9!#9%$_$K1~$8$F$I$&$K$G$b$G$-$^$9\e(B
142 \e$B$,!"%G%#%U%)%k%H$N:G$b4J7i$J@_Dj$O<!$NDL$j$G$9\e(B:
143
144 @lisp
145 ;;; \e$B5l%G%#%U%)%k%H\e(B: :host \e$B$H\e(B :protocol \e$B$,I,MW$@$C$?$,!"$b$O$dITMW!#\e(B
146 (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t)))
147 ;;; \e$B$[$\Ey2A$@$,!"$h$jC;$$\e(B (\e$B8e=R$N\e(B fallback \e$B$K$D$$$F$N5-=R$r;2>H\e(B)\e$B!#\e(B
148 (setq auth-sources '((:source "~/.authinfo.gpg")))
149 @end lisp
150
151 \e$B$3$l$O!V$I$s$J%[%9%H$N$I$N%]!<%H$G$b!"$3$NC10l$N%U%!%$%k$r;H$&!W$H$$$&0U\e(B
152 \e$BL#$G$9!#AG@2$i$7$/4JC1$G$7$g$&!#<B:]$K$O8e<T$,$9$G$K%G%#%U%)%k%H$K$J$C$F\e(B
153 \e$B$$$k$N$G!"$=$N%U%!%$%k$,$"$l$P!"$3$l$O5!G=$7$^$9!#$=$l$,$"$k$3$H$r3N$+$a\e(B
154 \e$B$F$/$@$5$$!#\e(B
155
156 \e$BFCDj$N%[%9%H$+%W%m%H%3%k$N%(%s%H%j!<$rJ#?t\e(B @code{auth-sources} \e$B$KDI2C$9\e(B
157 \e$B$k$3$H$K$h$C$F!"$=$N%[%9%H$+%W%m%H%3%k$KFC2=$7$?\e(B netrc \e$B%U%!%$%k$r;}$D$3\e(B
158 \e$B$H$,$G$-$^$9!#IaDL$3$l$OI,MW$"$j$^$;$s$,!"\e(Bnetrc \e$B%U%!%$%k$r6&M-$7$?$jJQ$o$C\e(B
159 \e$B$?@_Dj$,$"$k>l9g$O0UL#$,$"$k$+$b$7$l$^$;$s\e(B (90% \e$B$N\e(B Emacs \e$B%f!<%6!<$OJQ$J\e(B
160 \e$B@_Dj$r;}$C$F$$$F!";D$j$N\e(B 10% \e$B$O\e(B @emph{\e$BK\Ev$K\e(B} \e$BJQ$o$C$F$$$^$9\e(B)\e$B!#\e(B
161
162 \e$B$3$l$O!"$9$Y$F$N;2>H$K%7!<%/%l%C%H%5!<%S%9\e(B API \e$B$r;H$&Nc$G$9!#%G%U%)%k%H\e(B
163 \e$B$N<}=8J*$r;H$$$^$9\e(B:
164
165 @lisp
166 (setq auth-sources '((:source (:secrets default))))
167 @end lisp
168
169 \e$B$=$7$F$3$l$O!":.:_$9$k\e(B 2\e$B$D$N%=!<%9$r;H$&Nc$G$9\e(B:
170
171 @lisp
172 (setq auth-sources '((:source (:secrets default) :host "myserver" :user "joe")
173                      (:source "~/.authinfo.gpg")))
174 @end lisp
175
176 \e$B:GA1$N9gCW$O!"=i2s$NAv::$@$1$G\e(B (\e$B2<$+$i;O$^$k\e(B) \e$B=g=x$K$h$C$F7hDj$5$l$^\e(B
177 \e$B$9\e(B (\e$B3FMWAG$O87L)$K>H9g$5$l$^$9\e(B)\e$B!#>e$NNc$G$O!"=i2s$NAv::$G%[%9\e(B
178 \e$B%H\e(B @code{myserver} \e$B$X$NC10l$N9gCW$r8+$D$1$k$G$7$g$&!#\e(BNetrc \e$BA*Br$G$O!"$=\e(B
179 \e$B$l$,$I$s$J%[%9%H$d%W%m%H%3%k$K$b0E$K\e(B (@emph{fallback} \e$B$H$7$F\e(B) \e$B9gCW$7$F$7\e(B
180 \e$B$^$&$N$G!"<:GT$9$k$G$7$g$&!#\e(B@code{auth-sources} \e$B$K$*$1\e(B
181 \e$B$k\e(B @code{:host t} \e$B$N@_DjCM$O!"\e(B@code{:host} \e$B$,L5$$>l9g$H0c$C$F!"=i2s$NAv\e(B
182 \e$B::$K$*$1$k9gCW$rL\O@$s$@$b$N$G$"$k$H9MN8$5$l$^$9!#\e(B
183
184 \e$B$5$F!"$b$7\e(B ``\e$BL$@_Dj\e(B'' \e$B$N%[%9%H$rC5$=$&$H$9$k$H!"$=$l$O$I$s$J%=!<%9$K$bL@\e(B
185 \e$B$i$+$J9gCW$O$7$J$$$G$7$g$&!#\e(B2\e$B2sL\$NAv::\e(B (@emph{fallback} \e$B%Q%9\e(B) \e$B$G$O!"$9\e(B
186 \e$B$Y$F$N0EL[$N9gCW$rD4$Y$F!"$=$l$i$r<}=8$7$^$9!#$=$l$i$O%9%3%"IU$1$5$l!"%9\e(B
187 \e$B%3%"$K$h$C$FJB$YJQ$($i$l$^$9!#%9%3%"$O!"9gCW$9$kL@<(E*$J%Q%i%a!<%?!<$N?t\e(B
188 \e$BCM$K4p$E$$$F$$$^$9!#>\:Y$O\e(B @code{auth-pick} \e$B4X?t$r;2>H$7$F$/$@$5$$!#\e(B
189
190 \e$BLuCm\e(B fallback: \e$B$"$kMWAG$,;XDj$5$l$F$$$J$$$?$a$K87L)$J9gCW$,5/$3$i$J$/$F\e(B
191 \e$B$b!"$"$k5,B'$K$h$C$FA*Br$9$kL\E*J*!"$"$k$$$OA*Br$9$k$3$H!#\e(B
192 @end defvar
193
194 \e$B$b$7\e(B @code{auth-sources} \e$B$r%+%9%?%^%$%:$7$J$$$H!"%G%#%U%)%k%H$G@83h$9$k\e(B
195 \e$B$3$H$K$J$k$G$7$g$&!#$=$N%G%#%U%)%k%H$H$O!"$I$s$J%[%9%H$b%]!<%H$K$D$$$F\e(B
196 \e$B$b\e(B netrc \e$B%U%!%$%k\e(B @code{~/.authinfo.gpg} \e$B$r;2>H$9$k$H$$$&$3$H$G$9!#$3$l\e(B
197 \e$B$O\e(B GnuPG \e$B$G0E9f2=$5$l$?%U%!%$%k$G$9!#\e(B@xref{GnuPG and EasyPG Assistant
198 Configuration}.
199
200 \e$B<B:]$K;H$($k:G$b4JC1$J\e(B netrc \e$B9T$NNc$O!"%]!<%H$,L5$$$b$N$G$9!#\e(B
201
202 @example
203 machine YOURMACHINE login YOU password YOURPASSWORD
204 @end example
205
206 \e$B$3$l$O$I$NG'>Z%]!<%H$K$bBP1~$7$^$9!#4JC1$G$7$g$&\e(B?  \e$B$G$b\e(B SMTP \e$B%5!<%P!<\e(B
207 \e$B$,\e(B IMAP \e$B%5!<%P!<$H0[$J$k%Q%9%o!<%I$rI,MW$H$9$k$=$N%^%7%s$N%]!<%H\e(B 433 \e$B$K\e(B
208 \e$B$"$k$J$i$P!"$I$&$G$9$+!)\e(B
209
210 @example
211 machine YOURMACHINE login YOU password SMTPPASSWORD port 433
212 machine YOURMACHINE login YOU password GENERALPASSWORD
213 @end example
214
215 url-auth \e$BG'>Z\e(B (HTTP/HTTPS) \e$B$N$?$a$K$O!"$3$l$r\e(B netrc \e$B%U%!%$%k$KCV$$$F$*$/\e(B
216 \e$BI,MW$,$"$j$^$9\e(B:
217
218 @example
219 machine yourmachine.com:80 port http login testuser password testpass
220 @end example
221
222 \e$B$3$l$O\e(B HTTP \e$B$G@\B3$9$k$I$s$J3&LL$HG'>ZJ}<0\e(B (basic \e$B$^$?$O\e(B digest) \e$B$K$bBP\e(B
223 \e$B1~$7$^$9!#\e(BHTTPS \e$B$bF1MM$K@_Dj$7$^$9!#$b$C$H$-$a:Y$+$$@)8f$,I,MW$J$i!"\e(B
224 url-auth \e$B$N%=!<%9%3!<%I$HJQ?t$rD4$Y$F$/$@$5$$!#\e(B
225
226 Tramp \e$B$NG'>Z$K$O$3$l$r;H$C$F$/$@$5$$\e(B:
227
228 @example
229 machine yourmachine.com port scp login testuser password testpass
230 @end example
231
232 \e$B%]!<%H$O\e(B Tramp \e$B$N@\B3J}K!$r0UL#$9$k$3$H$KCm0U$7$F$/$@$5$$!#$b$7%]!<%H$N\e(B
233 \e$B9`$r;H$o$J$1$l$P!":G=i$NJ}$G@bL@$7$?$h$&$K!"$9$Y$F$N\e(B Tramp \e$B$NJ}<0$K9gCW\e(B
234 \e$B$7$^$9!#\e(BTramp \e$B$K$O\e(B 88 \e$B<oN`$N@\B3J}K!$,$"$k$N$G!"JQ$o$C$?@_Dj$,$"$k>l9g$O\e(B
235 \e$B$3$l$,I,MW$+$b$7$l$^$;$s\e(B (\e$B$=$l$i$K$D$$$F$N0JA0$N%3%a%s%H$r8+$F$/$@$5$$\e(B)\e$B!#\e(B
236
237 @node Secret Service API
238 @chapter \e$B%7!<%/%l%C%H%5!<%S%9\e(B API
239
240 TODO: \e$B$I$&F/$/$+$r0lHLE*$K!"\e(Bsecrets.el \e$B$O$I$&$d$k$+!"$$$/$D$+$NNc!#\e(B
241
242 @node Help for developers
243 @chapter \e$B3+H/<T$N$?$a$N%X%k%W\e(B
244
245 auth-source \e$B%i%$%V%i%j!<$K$O!"30It$G;H$&$?$a$N4X?t$O0l$D$7$+$"$j$^$;$s!#\e(B
246
247 @defun auth-source-user-or-password mode host port &optional username
248 \e$B%[%9%H\e(B @var{host} \e$B$*$h$S%]!<%H\e(B @var{port} \e$B$N$?$a$N\e(B @var{mode} \e$B$G7h$^$kE,\e(B
249 \e$B@Z$JG'>Z%H!<%/%s$r<h$j9~$_$^$9!#$b$7\e(B @var{username} \e$B$,M?$($i$l$l$P!"F1MM\e(B
250 \e$B$K>H9g$5$l$^$9!#\e(B@code{auth-source-debug} \e$B$,\e(B @code{t} \e$B$@$C$?$i%G%P%C%0$N\e(B
251 \e$B$?$a$N%a%C%;!<%8$rI=<($7$^$9!#%m%0$r:N$k$?$a$N4X?t$r;H$&$K$O!"\e(B
252 @code{auth-source-debug} \e$B$r$=$N4X?t$K@_Dj$7$F$/$@$5$$!#EO$5$l$k%Q%i%a!<\e(B
253 \e$B%?!<$O\e(B @code{message} \e$B4X?t$,<u$1<h$k$b$N$HF1$8$G$9!#$D$^$jMM<0;HMQ$NJ8;z\e(B
254 \e$BNs$HG$0U$N%Q%i%a!<%?!<$G$9!#\e(B
255
256 \e$B$b$7\e(B @var{mode} \e$B$,J8;zNs$N%j%9%H$J$i$P!"4X?t$OJ8;zNs$N%j%9%H\e(B
257 \e$B$+\e(B @code{nil} \e$B$rJV$7$^$9\e(B (\e$B$=$N$?$a!"$b$&\e(B 1\e$B2s\e(B netrc \e$B%U%!%$%k$r2r@O$;$:$K!"\e(B
258 \e$B$^$?$O%7!<%/%l%C%H%5!<%S%9\e(B API \e$B$r>H9g$;$:$K:Q$_$^$9\e(B)\e$B!#:#$N$H$3\e(B
259 \e$B$m\e(B ``login'' \e$B$H\e(B ``password'' \e$B$@$1$,G'$a$i$l$F$$$^$9$,!">-Mh$O$b$C$HB?$/\e(B
260 \e$B$N$b$N$,DI2C$5$l$k$G$7$g$&!#\e(B
261
262 @var{host} \e$B$O%[%9%HL>$NJ8;zNs$G$9!#\e(B
263
264 @var{port} \e$B$O%W%m%H%3%kL>\e(B (\e$BNc$($P\e(B ``imap'') \e$B$^$?$O%]!<%HHV9f$G$9!#%f!<%6!<\e(B
265 \e$B$N\e(B netrc \e$B%U%!%$%k$K$"$k%]!<%H$KBP1~$9$kJ8;zNs$G$J$1$l$P$J$j$^$;$s!#\e(B
266
267 @var{username} \e$B$O%f!<%6!<L>$NJ8;zNs\e(B (\e$BNc$($P\e(B ``joe'') \e$B$G$9!#\e(B
268
269 @example
270 ;; IMAP example
271 (setq auth (auth-source-user-or-password
272             '("login" "password")
273             "anyhostnamehere"
274             "imap"))
275 (nth 0 auth) ; \e$B%m%0%$%sL>\e(B
276 (nth 1 auth) ; \e$B%Q%9%o!<%I\e(B
277 @end example
278 @end defun
279
280 @c TRANSLATEME
281 @node GnuPG and EasyPG Assistant Configuration
282 @appendix GnuPG and EasyPG Assistant Configuration
283
284 In Emacs 23 or later there is an option @code{auto-encryption-mode} to
285 automatically decrypt @code{*.gpg} files and it is enabled by default
286 so there is no setting is needed.  If you are using earlier versions
287 of Emacs for some reason, you will need:
288
289 @lisp
290 (require 'epa-file)
291 (epa-file-enable)
292 @end lisp
293
294 If you want your GnuPG passwords to be cached, setup @code{gpg-agent}
295 or EasyPG Assitant
296 @pxref{Caching Passphrases, , Caching Passphrases, epa}
297
298 For those who are using older vesions of Emacs, here are some portion
299 copied from the EasyPG Assitant manual:
300
301 Here are some questions:
302
303 @enumerate
304 @item Do you use GnuPG version 2 instead of GnuPG version 1?
305 @item Do you use symmetric encryption rather than public key encryption?
306 @item Do you want to use gpg-agent?
307 @end enumerate
308
309 Here are configurations depending on your answers:
310
311 @multitable {111} {222} {333} {configuration configuration configuration}
312 @item @b{1} @tab @b{2} @tab @b{3} @tab Configuration
313 @item Yes @tab Yes @tab Yes @tab Nothing to do.
314 @item Yes @tab Yes @tab No @tab You can't, without gpg-agent.
315 @item Yes @tab No @tab Yes @tab Nothing to do.
316 @item Yes @tab No @tab No @tab You can't, without gpg-agent.
317 @item No @tab Yes @tab Yes @tab Set up elisp passphrase cache.
318 @item No @tab Yes @tab No @tab Set up elisp passphrase cache.
319 @item No @tab No @tab Yes @tab Nothing to do.
320 @item No @tab No @tab No @tab You can't, without gpg-agent.
321 @end multitable
322
323 To setup gpg-agent, follow the instruction in GnuPG manual.
324 @pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}.
325
326 To set up elisp passphrase cache, set
327 @code{epa-file-cache-passphrase-for-symmetric-encryption}.
328
329 @node Index
330 @chapter Index
331 @printindex cp
332
333 @node Function Index
334 @chapter Function Index
335 @printindex fn
336
337 @node Variable Index
338 @chapter Variable Index
339 @printindex vr
340
341 @bye
342
343 @c Local Variables:
344 @c coding: iso-2022-7bit
345 @c fill-column: 72
346 @c mode: texinfo
347 @c use-kuten-for-period: t
348 @c use-touten-for-comma: t
349 @c End: