emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110826: More updates for the URL


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110826: More updates for the URL library manual.
Date: Fri, 09 Nov 2012 16:34:17 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110826
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-11-09 16:34:17 +0800
message:
  More updates for the URL library manual.
  
  * url.texi (Introduction): Move url-configuration-directory to
  Customization node.
  (Parsed URIs): Split into its own node.
  (URI Encoding): New node.
  (Defining New URLs): Remove empty chapter.
  (Retrieving URLs): Add an introduction.  Doc fix for url-retrieve.
  Improve docs for url-queue-*.
  (Supported URL Types): Copyedits.  Delete empty subnodes.
modified:
  doc/misc/ChangeLog
  doc/misc/url.texi
  etc/NEWS
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2012-11-08 19:03:49 +0000
+++ b/doc/misc/ChangeLog        2012-11-09 08:34:17 +0000
@@ -1,3 +1,14 @@
+2012-11-09  Chong Yidong  <address@hidden>
+
+       * url.texi (Introduction): Move url-configuration-directory to
+       Customization node.
+       (Parsed URIs): Split into its own node.
+       (URI Encoding): New node.
+       (Defining New URLs): Remove empty chapter.
+       (Retrieving URLs): Add an introduction.  Doc fix for url-retrieve.
+       Improve docs for url-queue-*.
+       (Supported URL Types): Copyedits.  Delete empty subnodes.
+
 2012-11-08  Chong Yidong  <address@hidden>
 
        * url.texi (Introduction): Rename from Getting Started.  Rewrite

=== modified file 'doc/misc/url.texi'
--- a/doc/misc/url.texi 2012-11-08 19:03:49 +0000
+++ b/doc/misc/url.texi 2012-11-09 08:34:17 +0000
@@ -18,7 +18,7 @@
 @end direntry
 
 @copying
-This file documents @code{url} Emacs Lisp library.
+This is the manual for the @code{url} Emacs Lisp library.
 
 Copyright @copyright{} 1993-1999, 2002, 2004-2012 Free Software Foundation, 
Inc.
 
@@ -61,7 +61,6 @@
 * URI Parsing::                 Parsing (and unparsing) URIs.
 * Retrieving URLs::             How to use this package to retrieve a URL.
 * Supported URL Types::         Descriptions of URL types currently supported.
-* Defining New URLs::           How to define a URL loader for a new protocol.
 * General Facilities::          URLs can be cached, accessed via a gateway
                                 and tracked in a history list.
 * Customization::               Variables you can alter.
@@ -79,12 +78,12 @@
 @cindex uniform resource locator
 
 A @dfn{Uniform Resource Identifier} (URI) is a specially-formatted
-name, such as an Internet address, which identifies some name or
+name, such as an Internet address, that identifies some name or
 resource.  The format of URIs is described in RFC 3986, which updates
 and replaces the earlier RFCs 2732, 2396, 1808, and 1738.  A
 @dfn{Uniform Resource Locator} (URL) is an older but still-common
-term, which basically refers to a URI corresponding to a resource
-which can be accessed over a network.
+term, which basically refers to a URI corresponding to a resource that
+can be accessed (usually over a network) in a specific way.
 
   Here are some examples of URIs (taken from RFC 3986):
 
@@ -101,22 +100,9 @@
 
   This manual describes the @code{url} library, an Emacs Lisp library
 for parsing URIs and retrieving the resources to which they refer.
-(The library is so-named due to historical reasons; nowadays, the
-``URI'' terminology is regarded as the more general one, and ``URL''
-is technically obsolete despite its widespread vernacular usage.)
-
address@hidden url-configuration-directory
address@hidden configuration files
-The value of this variable specifies the name of the directory in
-which the @code{url} library stores its various configuration files,
-cache files, etc.
-
-The default value specifies a subdirectory named @file{url/} in the
-standard Emacs user data directory specified by the variable
address@hidden (normally @file{~/.emacs.d}).  However,
-the old default was @file{~/.url}, and this directory is used instead
-if it exists.
address@hidden defvar
+(The library is so-named for historical reasons; nowadays, the ``URI''
+terminology is regarded as the more general one, and ``URL'' is
+technically obsolete despite its widespread vernacular usage.)
 
 @node URI Parsing
 @chapter URI Parsing
@@ -133,28 +119,38 @@
 @samp{www.gnu.org}, and the path component @samp{/software/emacs/}.
 
 @cindex parsed URIs
-  The URI format is specified by RFC 3986.  The @code{url} library
-provides the Lisp function @code{url-generic-parse-url}, a
-standard-compliant URI parser, as well as the unparser
address@hidden:
+  The format of URIs is specified by RFC 3986.  The @code{url} library
+provides the Lisp function @code{url-generic-parse-url}, a (mostly)
+standard-compliant URI parser, as well as function
address@hidden, which converts a parsed URI back into a URI
+string.
 
address@hidden url-generic-parse-url url
-This function returns a parsed version of the string @var{url}.
address@hidden url-generic-parse-url uri-string
+This function returns a parsed version of the string @var{uri-string}.
 @end defun
 
address@hidden url-recreate-url uri
address@hidden url-recreate-url uri-obj
 @cindex unparsing URLs
-Given a parsed URI, this function returns a corresponding URI string.
+Given a parsed URI, this function returns the corresponding URI string.
 @end defun
 
 @cindex parsed URI
   The return value of @code{url-generic-parse-url}, and the argument
-expected by @code{url-recreate-url}, is a @dfn{parsed URI}, in the
-form of a CL structure whose slots hold the various components of the
-URI.  @xref{top,the CL Manual,,cl,GNU Emacs Common Lisp Emulation},
-for details about CL structures.  Most of the other functions in the
address@hidden library act on parsed URIs.  Each parsed URI structure
-contains the following slots:
+expected by @code{url-recreate-url}, is a @dfn{parsed URI}: a CL
+structure whose slots hold the various components of the URI.
address@hidden,the CL Manual,,cl,GNU Emacs Common Lisp Emulation}, for
+details about CL structures.  Most of the other functions in the
address@hidden library act on parsed URIs.
+
address@hidden
+* Parsed URIs::           Format of parsed URI structures.
+* URI Encoding::          address@hidden characters in URIs.
address@hidden menu
+
address@hidden Parsed URIs
address@hidden Parsed URI structures
+
+  Each parsed URI structure contains the following slots:
 
 @table @code
 @item type
@@ -185,7 +181,7 @@
 string), or @code{nil}.  If the query component is present, it is the
 substring following the first @samp{?} character, and the path
 component is the substring before the @samp{?}.  The meaning of these
-components depends on the service; they do not necessarily refer to a
+components is scheme-dependent; they do not necessarily refer to a
 file on a disk.
 
 @item target
@@ -208,7 +204,7 @@
 @findex url-target
 @findex url-attributes
 @findex url-fullness
-The above slots have accessors named @address@hidden, where
+These slots have accessors named @address@hidden, where
 @var{part} is the slot name.  For example, the accessor for the
 @code{host} slot is the function @code{url-host}.  The @code{url-port}
 accessor returns the default port for the URI scheme if the parsed
@@ -220,40 +216,153 @@
 (setf (url-port url) 80)
 @end example
 
address@hidden URI Encoding
address@hidden URI Encoding
+
address@hidden percent encoding
+  The @code{url-generic-parse-url} parser does not obey RFC 3986 in
+one respect: it allows address@hidden characters in URI strings.
+
+  Strictly speaking, RFC 3986 compatible URIs may only consist of
address@hidden characters; address@hidden characters are
+represented by converting them to UTF-8 byte sequences, and performing
address@hidden encoding} on the bytes.  For example, the o-umlaut
+character is converted to the UTF-8 byte sequence @samp{\xD3\xA7},
+then percent encoded to @samp{%D3%A7}.  (Certain ``reserved''
address@hidden characters must also be percent encoded when they
+appear in URI components.)
+
+  The function @code{url-encode-url} can be used to convert a URI
+string containing arbitrary characters to one that is properly
+percent-encoded in accordance with RFC 3986.
+
address@hidden url-encode-url url-string
+This function return a properly URI-encoded version of
address@hidden  It also performs @dfn{URI normalization},
+e.g.@: converting the scheme component to lowercase if it was
+previously uppercase.
address@hidden defun
+
+  To convert between a string containing arbitrary characters and a
+percent-encoded address@hidden string, use the functions
address@hidden and @code{url-unhex-string}:
+
address@hidden url-hexify-string string &optional allowed-chars
+This function performs percent-encoding on @var{string}, and returns
+the result.
+
+If @var{string} is multibyte, it is first converted to a UTF-8 byte
+string.  Each byte corresponding to an allowed character is left
+as-is, while all other bytes are converted to a three-character
+sequence: @samp{%} followed by two upper-case hex digits.
+
address@hidden url-unreserved-chars
address@hidden unreserved characters
+The allowed characters are specified by @var{allowed-chars}.  If this
+argument is @code{nil}, the allowed characters are those specified as
address@hidden characters} by RFC 3986 (see the variable
address@hidden).  Otherwise, @var{allowed-chars} should
+be a vector whose @var{n}-th element is address@hidden if character
address@hidden is allowed.
address@hidden defun
+
address@hidden url-unhex-string string &optional allow-newlines
+This function replaces percent-encoding sequences in @var{string} with
+their character equivalents, and returns the resulting string.
+
+If @var{allow-newlines} is address@hidden, it allows the decoding of
+carriage returns and line feeds, which are normally forbidden in URIs.
address@hidden defun
+
 @node Retrieving URLs
 @chapter Retrieving URLs
 
+  The @code{url} library defines the following three functions for
+retrieving the data specified by a URL.  The actual retrieval protocol
+depends on the URL's URI scheme, and is performed by lower-level
+scheme-specific functions.  (Those lower-level functions are not
+documented here, and generally should not be called directly.)
+
+  In each of these functions, the @var{url} argument can be either a
+string or a parsed URL structure.  If it is a string, that string is
+passed through @code{url-encode-url} before using it, to ensure that
+it is properly URI-encoded (@pxref{URI Encoding}).
+
 @defun url-retrieve-synchronously url
-Retrieve @var{url} synchronously and return a buffer containing the
-data.  @var{url} is either a string or a parsed URL structure.  Return
address@hidden if there are no data associated with it (the case for dired,
-info, or mailto URLs that need no further processing).
+This function synchronously retrieves the data specified by @var{url},
+and returns a buffer containing the data.  The return value is
address@hidden if there is no data associated with the URL (as is the case
+for @code{dired}, @code{info}, and @code{mailto} URLs).
 @end defun
 
 @defun url-retrieve url callback &optional cbargs silent no-cookies
-Retrieve @var{url} asynchronously and call @var{callback} with args
address@hidden when finished.  The callback is called when the object
-has been completely retrieved, with the current buffer containing the
-object and any MIME headers associated with it.  @var{url} is either a
-string or a parsed URL structure.  Returns the buffer @var{url} will
-load into, or @code{nil} if the process has already completed.
-If the optional argument @var{silent} is address@hidden, suppress
-progress messages.  If the optional argument @var{no-cookies} is
address@hidden, do not store or send cookies.
+This function retrieves @var{url} asynchronously, calling the function
address@hidden when the object has been completely retrieved.  The
+return value is the buffer into which the data will be inserted, or
address@hidden if the process has already completed.
+
+The callback function is called this way:
+
address@hidden
+(apply @var{callback} @var{status} @var{cbargs})
address@hidden example
+
address@hidden
+where @var{status} is a plist representing what happened during the
+retrieval, with most recent events first, or an empty list if no
+events have occurred.  Each pair in the plist is one of:
+
address@hidden @code
address@hidden (:redirect @var{redirected-to})
+This means that the request was redirected to the URL
address@hidden
+
address@hidden (:error (@var{error-symbol} . @var{data}))
+This means that an error occurred.  If so desired, the error can be
+signaled with @code{(signal @var{error-symbol} @var{data})}.
address@hidden table
+
+When the callback function is called, the current buffer is the one
+containing the retrieved data (if any).  The buffer also contains any
+MIME headers associated with the data retrieval.
+
+If the optional argument @var{silent} is address@hidden, progress
+messages are suppressed.  If the optional argument @var{no-cookies} is
address@hidden, cookies are not stored or sent.
address@hidden defun
+
address@hidden url-queue-retrieve url callback &optional cbargs silent 
no-cookies
+This function acts like @code{url-retrieve}, but with limits on the
+number of concurrently-running network processes.  The option
address@hidden controls the number of concurrent
+processes, and the option @code{url-queue-timeout} sets a timeout in
+seconds.
+
+To use this function, you must @code{(require 'url-queue)}.
 @end defun
 
 @vindex url-queue-parallel-processes
address@hidden url-queue-parallel-processes
+The value of this option is an integer specifying the maximum number
+of concurrent @code{url-queue-retrieve} network processes.  If the
+number of @code{url-queue-retrieve} calls is larger than this number,
+later ones are queued until ealier ones are finished.
address@hidden defopt
+
 @vindex url-queue-timeout
address@hidden url-queue-retrieve url callback &optional cbargs silent 
no-cookies
-This acts like the @code{url-retrieve} function, but with limits on
-the degree of parallelism.  The option @code{url-queue-parallel-processes}
-controls the number of concurrent processes, and the option
address@hidden sets a timeout in seconds.
address@hidden defun
address@hidden url-queue-timeout
+The value of this option is a number specifying the maximum lifetime
+of a @code{url-queue-retrieve} network process, once it is started.
+If a process is not finished by then, it is killed and removed from
+the queue.
address@hidden defopt
 
 @node Supported URL Types
 @chapter Supported URL Types
 
+This chapter describes functions and variables affecting URL retrieval
+for specific schemes.
+
 @menu
 * http/https::                  Hypertext Transfer Protocol.
 * file/ftp::                    Local files and FTP archives.
@@ -264,48 +373,31 @@
 * irc::                         Internet Relay Chat.
 * data::                        Embedded data URLs.
 * nfs::                         Networked File System
address@hidden * finger::
address@hidden * gopher::
address@hidden * netrek::
address@hidden * prospero::
-* cid::                         Content-ID.
-* about::
 * ldap::                        Lightweight Directory Access Protocol
-* imap::                        IMAP mailboxes.
 * man::                         Unix man pages.
 @end menu
 
 @node http/https
 @section @code{http} and @code{https}
 
-The scheme @code{http} is Hypertext Transfer Protocol.  The library
-supports version 1.1, specified in RFC 2616.  (This supersedes 1.0,
-defined in RFC 1945) HTTP URLs have the following form, where most of
-the parts are optional:
address@hidden
-http://@var{user}:@var{password}@@@var{host}:@var{port}/@address@hidden@var{fragment}
address@hidden example
address@hidden The @code{:@var{port}} part is optional, and @var{port} defaults 
to
address@hidden 80.  The @code{/@var{path}} part, if present, is a 
slash-separated
address@hidden series elements.  The @address@hidden, if present, is the
address@hidden query for a search or the content of a form submission.  The
address@hidden @code{#fragment} part, if present, is a location in the document.
+The @code{http} scheme refers to the Hypertext Transfer Protocol.  The
address@hidden library supports HTTP version 1.1, specified in RFC 2616.
+Its default port is 80.
 
-The scheme @code{https} is a secure version of @code{http}, with
-transmission via SSL.  It is defined in RFC 2069.  Its default port is
-443.  This scheme depends on SSL support in Emacs via the
address@hidden library and is actually implemented by forcing the
address@hidden gateway method to be used.  @xref{Gateways in general}.
+  The @code{https} scheme is a secure version of @code{http}, with
+transmission via SSL.  It is defined in RFC 2069, and its default port
+is 443.  When using @code{https}, the @code{url} library performs SSL
+encryption via the @code{ssl} library, by forcing the @code{ssl}
+gateway method to be used.  @xref{Gateways in general}.
 
 @defopt url-honor-refresh-requests
-This controls honoring of HTTP @samp{Refresh} headers by which
-servers can direct clients to reload documents from the same URL or a
-or different one.  @code{nil} means they will not be honored,
address@hidden (the default) means they will always be honored, and
-otherwise the user will be asked on each request.
+If this option is address@hidden (the default), the @code{url} library
+honors the HTTP @samp{Refresh} header, which is used by servers to
+direct clients to reload documents from the same URL or a or different
+one.  If the value is @code{nil}, the @samp{Refresh} header is
+ignored; any other value means to ask the user on each request.
 @end defopt
 
-
 @menu
 * Cookies::
 * HTTP language/coding::
@@ -437,26 +529,32 @@
 @cindex compressed files
 @cindex dired
 
+The @code{ftp} and @code{file} schemes are defined in RFC 1808.  The
address@hidden library treats @samp{ftp:} and @samp{file:} as synonymous.
+Such URLs have the form
+
 @example
 ftp://@var{user}:@var{password}@@@var{host}:@var{port}/@var{file}
 file://@var{user}:@var{password}@@@var{host}:@var{port}/@var{file}
 @end example
 
-These schemes are defined in RFC 1808.
address@hidden:} and @samp{file:} are synonymous in this library.  They
-allow reading arbitrary files from hosts.  Either @samp{ange-ftp}
-(Emacs) or @samp{efs} (XEmacs) is used to retrieve them from remote
-hosts.  Local files are accessed directly.
address@hidden
+If the URL specifies a local file, it is retrieved by reading the file
+contents in the usual way.  If it specifies a remote file, it is
+retrieved using the Ange-FTP package.  @xref{Remote Files,,, emacs,
+The GNU Emacs Manual}.
 
-Compressed files are handled, but support is hard-coded so that
address@hidden and so on have no affect.
-Suffixes recognized are @samp{.z}, @samp{.gz}, @samp{.Z} and
address@hidden
+  When retrieving a compressed file, it is automatically uncompressed
+if it has the file suffix @file{.z}, @file{.gz}, @file{.Z},
address@hidden, or @file{.xz}.  (The list of supported suffixes is
+hard-coded, and cannot be altered by customizing
address@hidden)
 
 @defopt url-directory-index-file
-The filename to look for when indexing a directory, default
address@hidden"index.html"}.  If this file exists, and is readable, then it
-will be viewed instead of using @code{dired} to view the directory.
+This option specifies the filename to look for when a @code{file} or
address@hidden URL specifies a directory.  The default is
address@hidden  If this file exists and is readable, it is viewed.
+Otherwise, Emacs visits the directory using Dired.
 @end defopt
 
 @node info
@@ -465,47 +563,53 @@
 @cindex Texinfo
 @findex Info-goto-node
 
+The @code{info} scheme is non-standard.  Such URLs have the form
+
 @example
 info:@address@hidden
 @end example
 
-Info URLs are not officially defined.  They invoke
address@hidden with argument @samp{(@var{file})@var{node}}.
address@hidden@var{node}} is optional, defaulting to @samp{Top}.
address@hidden
+and are retrieved by invoking @code{Info-goto-node} with argument
address@hidden(@var{file})@var{node}}.  If @address@hidden is omitted, the
address@hidden node is opened.
 
 @node mailto
 @section mailto
 
 @cindex mailto
 @cindex email
-A mailto URL will send an email message to the address in the
-URL, for example @samp{mailto:foo@@bar.com} would compose a
-message to @samp{foo@@bar.com}.
+A @code{mailto} URL specifies an email message to be sent to a given
+email address.  For example, @samp{mailto:foo@@bar.com} specifies
+sending a message to @samp{foo@@bar.com}.  The ``retrieval method''
+for such URLs is to open a mail composition buffer in which the
+appropriate content (e.g.@: the recipient address) has been filled in.
+
+  As defined in RFC 2368, a @code{mailto} URL has the form
+
address@hidden
address@hidden:@address@hidden@var{contents}[&@address@hidden
address@hidden example
+
address@hidden
+where an arbitrary number of @var{header}s can be added.  If the
address@hidden is @samp{body}, then @var{contents} is put in the message
+body; otherwise, a @var{header} header field is created with
address@hidden as its contents.  Note that the @code{url} library does
+not perform any checking of @var{header} or @var{contents}, so you
+should check them before sending the message.
 
 @defopt url-mail-command
 @vindex mail-user-agent
-The function called whenever url needs to send mail.  This should
-normally be left to default from @var{mail-user-agent}.  @xref{Mail
-Methods, , Mail-Composition Methods, emacs, The GNU Emacs Manual}.
+The value of this variable is the function called whenever url needs
+to send mail.  This should normally be left its default, which is the
+standard mail-composition command @code{compose-mail}.  @xref{Sending
+Mail,,, emacs, The GNU Emacs Manual}.
 @end defopt
 
-An @samp{X-Url-From} header field containing the URL of the document
-that contained the mailto URL is added if that URL is known.
-
-RFC 2368 extends the definition of mailto URLs in RFC 1738.
-The form of a mailto URL is
address@hidden
address@hidden:@address@hidden@var{contents}[&@address@hidden
address@hidden example
address@hidden where an arbitrary number of @var{header}s can be added.  If the
address@hidden is @samp{body}, then @var{contents} is put in the body
-otherwise a @var{header} header field is created with @var{contents}
-as its contents.  Note that the URL library does not consider any
-headers ``dangerous'' so you should check them before sending the
-message.
-
address@hidden Fixme: update
-Email messages are defined in @sc{rfc}822.
+  If the document containing the @code{mailto} URL itself possessed a
+known URL, Emacs automatically inserts an @samp{X-Url-From} header
+field into the mail buffer, specifying that URL.
 
 @node news/nntp/snews
 @section @code{news}, @code{nntp} and @code{snews}
@@ -515,11 +619,13 @@
 @cindex NNTP
 @cindex snews
 
address@hidden draft-gilman-news-url-01
-The network news URL scheme take the following forms following RFC
-1738 except that for compatibility with other clients, host and port
-fields may be included in news URLs though they are properly only
-allowed for nntp an snews.
+The @code{news}, @code{nntp}, and @code{snews} schemes, defined in RFC
+1738, are used for reading Usenet newsgroups.  For compatibility with
+non-standard-compliant news clients, the @code{url} library allows
+host and port fields to be included in @code{news} URLs, even though
+they are properly only allowed for @code{nntp} and @code{snews}.
+
+  @code{news} and @code{nntp} URLs have the following form:
 
 @table @samp
 @item news:@var{newsgroup}
@@ -534,24 +640,22 @@
 Similar to the @samp{news} versions.
 @end table
 
address@hidden:@var{port}} is optional and defaults to :119.
-
address@hidden is the same as @samp{nntp} except that the default port
-is :563.
address@hidden SSL
-(It is tunneled through SSL.)
-
-An @samp{nntp} URL is the same as a news URL, except that the URL may
-specify an article by its number.
-
address@hidden url-news-server
-This variable can be used to override the default news server.
-Usually this will be set by the Gnus package, which is used to fetch
-news.
+  The default port for @code{nntp} (and @code{news}) is 119.  The
+difference between an @code{nntp} URL and a @code{news} URL is that an
address@hidden URL may specify an article by its number.  The
address@hidden scheme is the same as @samp{nntp}, except that it is
+tunneled through SSL and has default port 563.
+
+  These URLs are retrieved via the Gnus package.
+
 @cindex environment variable
 @vindex NNTPSERVER
-It may be set from the conventional environment variable
address@hidden
address@hidden url-news-server
+This variable specifies the default news server from which to fetch
+news, if no server was specified in the URL.  The default value,
address@hidden, means to use the server specified by the standard
+environment variable @samp{NNTPSERVER}, or @samp{news} if that
+environment variable is unset.
 @end defopt
 
 @node rlogin/telnet/tn3270
@@ -562,12 +666,15 @@
 @cindex terminal emulation
 @findex terminal-emulator
 
-These URL schemes from RFC 1738 for logon via a terminal emulator have
-the form
+These URL schemes are defined in RFC 1738, and are used for logging in
+via a terminal emulator.  They have the form
+
 @example
 telnet://@var{user}:@var{password}@@@var{host}:@var{port}
 @end example
-but the @code{:@var{password}} component is ignored.
+
address@hidden
+but the @var{password} component is ignored.
 
 To handle rlogin, telnet and tn3270 URLs, a @code{rlogin},
 @code{telnet} or @code{tn3270} (the program names and arguments are
@@ -581,39 +688,43 @@
 @cindex ZEN IRC
 @cindex ERC
 @cindex rcirc
address@hidden Fixme: reference (was 
http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt)
address@hidden Relay Chat} (IRC) is handled by handing off the @sc{irc}
-session to a function named in @code{url-irc-function}.
+
+  The @code{irc} scheme is defined in the Internet Draft at
address@hidden://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt} (which
+was never approved as an RFC).  Such URLs have the form
+
address@hidden
+irc://@var{host}:@var{port}/@var{target},@var{needpass}
address@hidden example
+
address@hidden
+and are retrieved by opening an @acronym{IRC} session using the
+function specified by @code{url-irc-function}.
 
 @defopt url-irc-function
-A function to actually open an IRC connection.
-This function
-must take five arguments, @var{host}, @var{port}, @var{channel},
address@hidden and @var{password}.  The @var{channel} argument specifies the
-channel to join immediately, this can be @code{nil}.  By default this is
address@hidden
+The value of this option is a function, which is called to open an IRC
+connection for @code{irc} URLs.  This function must take five
+arguments, @var{host}, @var{port}, @var{channel}, @var{user} and
address@hidden  The @var{channel} argument specifies the channel to
+join immediately, and may be @code{nil}.
+
+The default is @code{url-irc-rcirc}, which uses the Rcirc package.
+Other options are @code{url-irc-erc} (which uses ERC) and
address@hidden (which uses ZenIRC).
 @end defopt
address@hidden url-irc-rcirc host port channel user password
-Processes the arguments and lets @code{rcirc} handle the session.
address@hidden defun
address@hidden url-irc-erc host port channel user password
-Processes the arguments and lets @code{ERC} handle the session.
address@hidden defun
address@hidden url-irc-zenirc host port channel user password
-Processes the arguments and lets @code{zenirc} handle the session.
address@hidden defun
 
 @node data
 @section data
 @cindex data URLs
 
+  The @code{data} scheme, defined in RFC 2397, contains MIME data in
+the URL itself.  Such URLs have the form
+
 @example
 data:@address@hidden@address@hidden;@address@hidden,@var{data}
 @end example
 
-Data URLs contain MIME data in the URL itself.  They are defined in
-RFC 2397.
-
address@hidden
 @var{media-type} is a MIME @samp{Content-Type} string, possibly
 including parameters.  It defaults to
 @samp{text/plain;charset=US-ASCII}.  The @samp{text/plain} can be
@@ -626,14 +737,14 @@
 @cindex Network File System
 @cindex automounter
 
+The @code{nfs} scheme, defined in RFC 2224, is similar to @code{ftp}
+except that it points to a file on a remote host that is handled by an
+NFS automounter on the local host.  Such URLs have the form
+
 @example
 nfs://@var{user}:@var{password}@@@var{host}:@var{port}/@var{file}
 @end example
 
-The @samp{nfs:} scheme is defined in RFC 2224.  It is similar to
address@hidden:} except that it points to a file on a remote host that is
-handled by the automounter on the local host.
-
 @defvar url-nfs-automounter-directory-spec
 @end defvar
 A string saying how to invoke the NFS automounter.  Certain @samp{%}
@@ -656,15 +767,6 @@
 
 Each can be used any number of times.
 
address@hidden cid
address@hidden cid
address@hidden Content-ID
-
-RFC 2111
-
address@hidden about
address@hidden about
-
 @node ldap
 @section ldap
 @cindex LDAP
@@ -672,50 +774,21 @@
 
 The LDAP scheme is defined in RFC 2255.
 
address@hidden imap
address@hidden imap
address@hidden IMAP
-
-RFC 2192
-
 @node man
 @section man
 @cindex @command{man}
 @cindex Unix man pages
 @findex man
 
+The @code{man} scheme is a non-standard one.  Such URLs have the form
+
 @example
 @samp{man:@var{page-spec}}
 @end example
 
-This is a non-standard scheme.  @var{page-spec} is passed directly to
-the Lisp @code{man} function.
-
address@hidden Defining New URLs
address@hidden Defining New URLs
-
address@hidden
-* Naming conventions::
-* Required functions::
-* Optional functions::
-* Asynchronous fetching::
-* Supporting file-name-handlers::
address@hidden menu
-
address@hidden Naming conventions
address@hidden Naming conventions
-
address@hidden Required functions
address@hidden Required functions
-
address@hidden Optional functions
address@hidden Optional functions
-
address@hidden Asynchronous fetching
address@hidden Asynchronous fetching
-
address@hidden Supporting file-name-handlers
address@hidden Supporting file-name-handlers
address@hidden
+and are retrieved by passing @var{page-spec} to the Lisp function
address@hidden
 
 @node General Facilities
 @chapter General Facilities
@@ -1136,11 +1209,9 @@
 @node Customization
 @chapter Customization
 
address@hidden Environment Variables
-
 @cindex environment variables
-The following environment variables affect the library's operation at
-startup.
+  The following environment variables affect the @code{url} library's
+operation at startup.
 
 @table @code
 @item TMPDIR
@@ -1150,10 +1221,21 @@
 it.
 @end table
 
address@hidden General User Options
-
-The following user options, settable with Customize, affect the
-general operation of the package.
+  The following user options affect the general operation of
address@hidden library.
+
address@hidden url-configuration-directory
address@hidden configuration files
+The value of this variable specifies the name of the directory where
+the @code{url} library stores its various configuration files, cache
+files, etc.
+
+The default value specifies a subdirectory named @file{url/} in the
+standard Emacs user data directory specified by the variable
address@hidden (normally @file{~/.emacs.d}).  However,
+the old default was @file{~/.url}, and this directory is used instead
+if it exists.
address@hidden defopt
 
 @defopt url-debug
 @cindex debugging

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-11-09 08:30:48 +0000
+++ b/etc/NEWS  2012-11-09 08:34:17 +0000
@@ -602,7 +602,7 @@
 appended to some imap URLs, but this is not compatible with RFC 3986.
 So now the `filename' slot stores the entire path and query components
 and the `attributes' slot is always nil.
-
++++
 *** New function `url-encode-url' for encoding a URI string.
 The `url-retrieve' function now uses this to encode its URL argument,
 in case that is not properly encoded.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]