A URI consists of several components, each having a different meaning. For example, the URI
https://www.gnu.org/software/emacs/
specifies the scheme component ‘https’, the hostname component ‘www.gnu.org’, and the path component ‘/software/emacs/’.
The format of URIs is specified by RFC 3986. The url
library
provides the Lisp function url-generic-parse-url
, a (mostly)
standard-compliant URI parser, as well as function
url-recreate-url
, which converts a parsed URI back into a URI
string.
This function returns a parsed version of the string uri-string.
Given a parsed URI, this function returns the corresponding URI string.
The return value of url-generic-parse-url
, and the argument
expected by url-recreate-url
, is a parsed URI: a CL
structure whose slots hold the various components of the URI.
See the CL Manual in GNU Emacs Common Lisp Emulation, for
details about CL structures. Most of the other functions in the
url
library act on parsed URIs.