diff options
| author | Miles Bader | 2009-02-16 09:32:19 +0000 |
|---|---|---|
| committer | Miles Bader | 2009-02-16 09:32:19 +0000 |
| commit | 9eb59592ad279953ffc852e23704341aa6c7bde5 (patch) | |
| tree | 9b2ac689a56c174e20b3d174dbbd8e1e43a6d4e6 | |
| parent | 554fda1a964a4ed4ee790e48542e392ba1a9b8e2 (diff) | |
| download | emacs-9eb59592ad279953ffc852e23704341aa6c7bde5.tar.gz emacs-9eb59592ad279953ffc852e23704341aa6c7bde5.zip | |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1548
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/misc/auth.texi | 203 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 6 |
4 files changed, 216 insertions, 1 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 98d4035cc8a..6a068799faf 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-02-13 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * auth.texi: New file documenting auth-source. | ||
| 4 | |||
| 1 | 2009-02-13 Carsten Dominik <dominik@science.uva.nl> | 5 | 2009-02-13 Carsten Dominik <dominik@science.uva.nl> |
| 2 | 6 | ||
| 3 | * org.texi (Org Plot): Fix link. | 7 | * org.texi (Org Plot): Fix link. |
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi new file mode 100644 index 00000000000..7a9031a0c1a --- /dev/null +++ b/doc/misc/auth.texi | |||
| @@ -0,0 +1,203 @@ | |||
| 1 | \input texinfo @c -*-texinfo-*- | ||
| 2 | |||
| 3 | @setfilename auth.info | ||
| 4 | |||
| 5 | @set VERSION 0.1 | ||
| 6 | |||
| 7 | @dircategory Emacs | ||
| 8 | @direntry | ||
| 9 | * auth-source: (auth). The Emacs auth-source library. | ||
| 10 | @end direntry | ||
| 11 | |||
| 12 | @settitle Emacs auth-source Library @value{VERSION} | ||
| 13 | |||
| 14 | @copying | ||
| 15 | This file describes the Emacs auth-source library. | ||
| 16 | |||
| 17 | Copyright @copyright{} 2008, 2009 | ||
| 18 | Free Software Foundation, Inc. | ||
| 19 | |||
| 20 | @quotation | ||
| 21 | Permission is granted to copy, distribute and/or modify this document | ||
| 22 | under the terms of the GNU Free Documentation License, Version 1.3 or | ||
| 23 | any later version published by the Free Software Foundation; with no | ||
| 24 | Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' | ||
| 25 | and with the Back-Cover Texts as in (a) below. A copy of the license | ||
| 26 | is included in the section entitled ``GNU Free Documentation License'' | ||
| 27 | in the Emacs manual. | ||
| 28 | |||
| 29 | (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and | ||
| 30 | modify this GNU manual. Buying copies from the FSF supports it in | ||
| 31 | developing GNU and promoting software freedom.'' | ||
| 32 | |||
| 33 | This document is part of a collection distributed under the GNU Free | ||
| 34 | Documentation License. If you want to distribute this document | ||
| 35 | separately from the collection, you can do so by adding a copy of the | ||
| 36 | license to the document, as described in section 6 of the license. | ||
| 37 | @end quotation | ||
| 38 | @end copying | ||
| 39 | |||
| 40 | @tex | ||
| 41 | |||
| 42 | @titlepage | ||
| 43 | @title Emacs auth-source Library | ||
| 44 | |||
| 45 | @author by Ted Zlatanov | ||
| 46 | @page | ||
| 47 | |||
| 48 | @vskip 0pt plus 1filll | ||
| 49 | @insertcopying | ||
| 50 | @end titlepage | ||
| 51 | @page | ||
| 52 | |||
| 53 | @end tex | ||
| 54 | |||
| 55 | @node Top | ||
| 56 | @top Emacs auth-source | ||
| 57 | This manual describes the Emacs auth-source library. | ||
| 58 | |||
| 59 | It is a way for multiple applications to share a single configuration | ||
| 60 | (in Emacs and in files) for user convenience. | ||
| 61 | |||
| 62 | @menu | ||
| 63 | * Overview:: Overview of the auth-source library. | ||
| 64 | * Help for users:: | ||
| 65 | * Help for developers:: | ||
| 66 | * Index:: | ||
| 67 | * Function Index:: | ||
| 68 | * Variable Index:: | ||
| 69 | @end menu | ||
| 70 | |||
| 71 | @node Overview | ||
| 72 | @chapter Overview | ||
| 73 | |||
| 74 | To be done. | ||
| 75 | |||
| 76 | @node Help for users | ||
| 77 | @chapter Help for users | ||
| 78 | |||
| 79 | If you have problems with the port, turn up @code{gnus-verbose} and | ||
| 80 | see what port the library is checking. Ditto for any other | ||
| 81 | problems, your first step is to see what's being checked. | ||
| 82 | |||
| 83 | Setup: | ||
| 84 | |||
| 85 | @lisp | ||
| 86 | (require 'auth-source) | ||
| 87 | (customize-variable 'auth-sources) ;; optional, do it once | ||
| 88 | @end lisp | ||
| 89 | |||
| 90 | @defvar auth-sources | ||
| 91 | |||
| 92 | The @var{auth-sources} variable tells the auth-source library where | ||
| 93 | your netrc files live for a particular host and protocol. While you | ||
| 94 | can get fancy, the default and simplest configuration is: | ||
| 95 | |||
| 96 | @lisp | ||
| 97 | (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))) | ||
| 98 | @end lisp | ||
| 99 | |||
| 100 | By adding multiple entries to that list with a particular host or | ||
| 101 | protocol, you can have specific netrc files for that host or protocol. | ||
| 102 | |||
| 103 | @end defvar | ||
| 104 | |||
| 105 | |||
| 106 | ``Netrc'' files are a de facto standard. They look like this: | ||
| 107 | @example | ||
| 108 | machine mymachine login myloginname password mypassword port myport | ||
| 109 | @end example | ||
| 110 | |||
| 111 | The port is optional. If it's missing, auth-source will assume any | ||
| 112 | port is OK. Actually the port is a protocol name or a port number so | ||
| 113 | you can have separate entries for port 143 and for protocol ``imap'' | ||
| 114 | if you fancy that. | ||
| 115 | |||
| 116 | If you don't customize @var{auth-sources}, you'll have to live with | ||
| 117 | the defaults: any host and any port are looked up in the netrc | ||
| 118 | file @code{~/.authinfo.gpg}. This is an encrypted file if and only if | ||
| 119 | you set up EPA, which is strongly recommended. | ||
| 120 | |||
| 121 | @lisp | ||
| 122 | (require 'epa-file) | ||
| 123 | (epa-file-enable) | ||
| 124 | (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; VERY important | ||
| 125 | @end lisp | ||
| 126 | |||
| 127 | For url-auth authentication (HTTP/HTTPS), you need to put this in your | ||
| 128 | netrc file: | ||
| 129 | |||
| 130 | @example | ||
| 131 | machine yourmachine.com:80 port http login testuser password testpass | ||
| 132 | @end example | ||
| 133 | |||
| 134 | This will match any realm and authentication method (basic or | ||
| 135 | digest). If you want finer controls, explore the url-auth source | ||
| 136 | code and variables. | ||
| 137 | |||
| 138 | For Tramp authentication, use: | ||
| 139 | |||
| 140 | @example | ||
| 141 | machine yourmachine.com port scp login testuser password testpass | ||
| 142 | @end example | ||
| 143 | |||
| 144 | Note that the port denotes the Tramp connection method. When you | ||
| 145 | don't use a port entry, you match any Tramp method, as explained | ||
| 146 | earlier. | ||
| 147 | |||
| 148 | @node Help for developers | ||
| 149 | @chapter Help for developers | ||
| 150 | |||
| 151 | The auth-source library only has one function for external use. | ||
| 152 | |||
| 153 | @defun auth-source-user-or-password mode host port | ||
| 154 | |||
| 155 | Retrieve appropriate authentication tokens, determined by @var{mode}, | ||
| 156 | for host @var{host} and @var{port}. If @code{gnus-verbose} is 9 or | ||
| 157 | higher, debugging messages will be printed. | ||
| 158 | |||
| 159 | If @var{mode} is a list of strings, the function will return a list of | ||
| 160 | strings or @code{nil} objects. If it's a string, the function will | ||
| 161 | return a string or a @code{nil} object. Currently only the modes | ||
| 162 | ``login'' and ``password'' are recognized but more may be added in the | ||
| 163 | future. | ||
| 164 | |||
| 165 | @var{host} is a string containing the host name. | ||
| 166 | |||
| 167 | @var{port} contains the protocol name (e.g. ``imap'') or | ||
| 168 | a port number. It must be a string, corresponding to the port in the | ||
| 169 | users' netrc files. | ||
| 170 | |||
| 171 | @example | ||
| 172 | ;; IMAP example | ||
| 173 | (setq auth (auth-source-user-or-password | ||
| 174 | '("login" "password") | ||
| 175 | "anyhostnamehere" | ||
| 176 | "imap")) | ||
| 177 | (nth 0 auth) ; the login name | ||
| 178 | (nth 1 auth) ; the password | ||
| 179 | @end example | ||
| 180 | |||
| 181 | @end defun | ||
| 182 | |||
| 183 | @node Index | ||
| 184 | @chapter Index | ||
| 185 | @printindex cp | ||
| 186 | |||
| 187 | @node Function Index | ||
| 188 | @chapter Function Index | ||
| 189 | @printindex fn | ||
| 190 | |||
| 191 | @node Variable Index | ||
| 192 | @chapter Variable Index | ||
| 193 | @printindex vr | ||
| 194 | |||
| 195 | @summarycontents | ||
| 196 | @contents | ||
| 197 | @bye | ||
| 198 | |||
| 199 | @c End: | ||
| 200 | |||
| 201 | @ignore | ||
| 202 | arch-tag: 7b835fd3-473f-40fc-9776-1c4e49d26c94 | ||
| 203 | @end ignore | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 61f1c16f364..0488b23ae6b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-02-15 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus-art.el (gnus-button-alist): Recognize Konqueror info links. | ||
| 4 | |||
| 1 | 2009-02-15 Glenn Morris <rgm@gnu.org> | 5 | 2009-02-15 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * gnus-util.el (rmail-insert-rmail-file-header) | 7 | * gnus-util.el (rmail-insert-rmail-file-header) |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index d7ef0136c93..91fccf7a435 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -7412,7 +7412,11 @@ positives are possible." | |||
| 7412 | gnus-button-ctan-directory-regexp | 7412 | gnus-button-ctan-directory-regexp |
| 7413 | "/[-_.a-z0-9]+/[-_./a-z0-9]+[/a-z0-9]\\)") | 7413 | "/[-_.a-z0-9]+/[-_./a-z0-9]+[/a-z0-9]\\)") |
| 7414 | 1 (>= gnus-button-tex-level 8) gnus-button-handle-ctan 1) | 7414 | 1 (>= gnus-button-tex-level 8) gnus-button-handle-ctan 1) |
| 7415 | ;; This is info (home-grown style) <info://foo/bar+baz> | 7415 | ;; Info Konqueror style <info:/foo/bar baz>. |
| 7416 | ;; Must come before " Gnus home-grown style". | ||
| 7417 | ("\\binfo://?\\([^'\">\n\t]+\\)" | ||
| 7418 | 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1) | ||
| 7419 | ;; Info, Gnus home-grown style (deprecated) <info://foo/bar+baz> | ||
| 7416 | ("\\binfo://\\([^'\">\n\t ]+\\)" | 7420 | ("\\binfo://\\([^'\">\n\t ]+\\)" |
| 7417 | 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1) | 7421 | 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1) |
| 7418 | ;; Info GNOME style <info:foo#bar_baz> | 7422 | ;; Info GNOME style <info:foo#bar_baz> |