comparison man/w3.texi @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 9ee227acff29
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
34 @titlepage 34 @titlepage
35 @sp 6 35 @sp 6
36 @center @titlefont{Emacs-W3} 36 @center @titlefont{Emacs-W3}
37 @center @titlefont{User's Manual} 37 @center @titlefont{User's Manual}
38 @sp 4 38 @sp 4
39 @center Third Edition, Emacs-W3 Version 2.3.0 39 @center Third Edition, Emacs-W3 Version 3.0
40 @sp 1 40 @sp 1
41 @center February 1996 41 @center August 1996
42 @sp 5 42 @sp 5
43 @center William M. Perry 43 @center William M. Perry
44 @center @i{wmperry@@cs.indiana.edu} 44 @center @i{wmperry@@cs.indiana.edu}
45 @page 45 @page
46 @vskip 0pt plus 1filll 46 @vskip 0pt plus 1filll
58 This manual documents the Emacs-W3 World Wide Web browser, a Lisp program 58 This manual documents the Emacs-W3 World Wide Web browser, a Lisp program
59 which runs as a subsystem under Emacs. The manual is divided into the 59 which runs as a subsystem under Emacs. The manual is divided into the
60 following chapters. 60 following chapters.
61 61
62 @menu 62 @menu
63 * Introduction:: What exactly is Emacs-W3? 63 * Introduction:: Overview of Emacs-W3.
64 * Setting Up:: How to set up and install Emacs-W3. 64 * Starting Up:: What happens when you start Emacs-W3
65 * Basic Usage:: Basic movement and usage of Emacs-W3. 65 * Basic Usage:: Basic movement and usage of Emacs-W3.
66 * Compatibility:: Explanation of compatibility with 66 * Compatibility:: Explanation of compatibility with
67 other web browsers. 67 other web browsers.
68 * Controlling Formatting:: How to control HTML formatting 68 * Controlling Formatting:: How to control HTML formatting
69 * MIME Support:: Support for MIME 69 * MIME Support:: Support for MIME
73 OS's. 73 OS's.
74 * Advanced Features:: Some of the more arcane features. 74 * Advanced Features:: Some of the more arcane features.
75 * More Help:: How to get more help---mailing lists, 75 * More Help:: How to get more help---mailing lists,
76 newsgroups, etc. 76 newsgroups, etc.
77 * Future Directions:: Plans for future revisions 77 * Future Directions:: Plans for future revisions
78 * Programming Interface:: How to use Emacs-W3 from other emacs
79 programs.
80 78
81 Appendices: 79 Appendices:
82 * Reporting Bugs:: How to report a bug in Emacs-W3 80 * Reporting Bugs:: How to report a bug in Emacs-W3
83 * Installing SSL:: Turning on SSL support 81 * Installing SSL:: Turning on SSL support
84 * Using PGP/PEM:: Turning on PGP/PEM encryption support 82 * Using PGP/PEM:: Turning on PGP/PEM encryption support
88 * General Index:: General Index 86 * General Index:: General Index
89 * Key Index:: Menus of command keys and their references 87 * Key Index:: Menus of command keys and their references
90 @end menu 88 @end menu
91 @end ifinfo 89 @end ifinfo
92 90
93 @node Introduction, Setting Up, Top, Top 91 @node Introduction, Starting Up, Top, Top
94 @chapter Introduction 92 @chapter Introduction
95 @cindex World Wide Web 93 @cindex World Wide Web
96 Emacs-W3 is an Emacs subsystem that allows the user to browse the wonderful 94 Emacs-W3 is an Emacs subsystem that allows the user to browse the wonderful
97 World Wide Web (WWW). 95 World Wide Web (WWW).
98 96
223 @center ---------- 221 @center ----------
224 @center HTML 3.0 222 @center HTML 3.0
225 @center ---------- 223 @center ----------
226 @end ifinfo 224 @end ifinfo
227 @iftex 225 @iftex
228 @section HTML 3.0 226 @section HTML 3.2
229 @end iftex 227 @end iftex
230 @cindex HTML 3.0 228 @cindex HTML 3.2
231 The HTML 3.0 language is an extension of HTML, with a large degree of 229 The HTML 3.2 language is an extension of HTML, with a large degree of
232 backward compatibility with HTML 2.0. The idea of having one huge HTML 230 backward compatibility with HTML 2.0. This basically documents current
233 3.0 document has been dropped in favor of several smaller supplementatry 231 practice as of January, 1996.
234 RFCs. This will allow the standard to be upgraded much more quickly 232
235 than trying to agree on all the features at once.
236
237 As each new chunk of HTML 3.0 is proposed and agreed upon, Emacs-W3 will
238 support it.
239
240 :: WORK :: List currently supported chunks (embed, etc) ::
241 @itemize @bullet
242 @item Embed
243 Embedding of arbitrary objects into an HTML document. With the <embed>
244 tag, any type of document can be inserted. The most entertaining use of
245 this is with embedding MPEG movies into an emacs buffer. This requires
246 Lucid Emacs 19.10, or XEmacs 19.11, as well as a slightly patched
247 version of mpeg_play 2.0@footnote{The patch is available from
248 ftp://ftp.cs.indiana.edu/pub/elisp/w3/mpeg_patch}.
249
250 @end itemize
251 @ifinfo 233 @ifinfo
252 @center ---------- 234 @center ----------
253 @center Netscape-HTML 235 @center Netscape-HTML
254 @center ---------- 236 @center ----------
255 @end ifinfo 237 @end ifinfo
256 @iftex 238 @iftex
257 @section Netscape-HTML 239 @section Netscape-HTML
258 @end iftex 240 @end iftex
259 I hate to say it, but I broke down and actually included some of the 241 I hate to say it, but I broke down and actually included some of the
260 Netscape extensions into Emacs-W3. 242 Netscape extensions into Emacs-W3. The thing I hate to say even more,
243 is that most of the uglier things in Netscape-HTML are now in the HTML
244 3.2 specification. All hail the W3Cs lack of backbone.
261 245
262 @table @b 246 @table @b
263 @item <font>...</font>
264 Changes the font size. Valid values range from 0-7. The default
265 font size is 3. The value given can optionally have a '+' or '-'
266 character in front of it to specify that it is relative to the document
267 basefont. Stylesheets are recommended instead, as they allow much
268 greater control.@xref{Style Sheets}
269 @item <center>...</center> 247 @item <center>...</center>
270 This ugly, ill-thought-out alternative to the HTML 3.0 align attribute on 248 This ugly, ill-thought-out alternative to the HTML 3.0 align attribute on
271 headers and paragraphs was included for compatibility, and as an example 249 headers and paragraphs was included for compatibility, and as an example
272 of how @b{not} to do things. 250 of how @b{not} to do things.
273 @item <isindex> 251 @item <isindex>
274 The isindex tag can now take a prompt attribute, to get rid of the 252 The isindex tag can now take a prompt attribute, to get rid of the
275 default 'This is a searchable index' label. 253 default 'This is a searchable index' label.
276 @item <hr width=xx align=xx>
277 The width and alignment of a horizontal rule can now be controlled. The
278 WIDTH attribute specifies how wide the rule should be, as a percentage
279 of the window width.
280
281
282 The ALIGN attribute specifies where the horizontal rule is placed.
283 Valid values are left, right, center, and indent.
284 @item <body background=@var{URL} bgcolor=@var{RGB} TEXT=@var{RGB} LINK=@var{RGB} ALINK=@var{RGB} VLINK=@var{RGB}>
285 Various colors can now be set on a document wide basis. This is done
286 with various attributes on the BODY tag. Stylesheets are really a
287 better way to do this, and are recommended. This is just for
288 compatibility. @xref{Style Sheets}
289 @b{NOTE:} Netscape requires that all colors be specified in RGB values -
290 this is not very intuitive for the avergage author, so Emacs-W3 allows
291 you to use logical system colors (ie: @samp{"PaleGoldenrod"} instead of
292 @samp{"#eee8aa"}).
293 @table @b
294 @item BACKGROUND=@var{url}
295 Specifies a graphic to tile in the background of the document. This
296 only works in XEmacs 19.12 or later.
297 @item BGCOLOR=@var{color}
298 Specifies the background of the document, as a color instead of a
299 graphic.
300 @item TEXT=@var{color}
301 Specifies the color of text on the page.
302 @item LINK=@var{color}
303 Specifies the color of hypertext links on the page.
304 @item VLINK=@var{color}
305 Specifies the color of hypertext links that have been visited already.
306 @item ALINK=@var{color}
307 Specifies the color of active hypertext links (links that have been
308 clicked on, but not yet fully retrieved).
309 @end table
310 @end table 254 @end table
311 @ifinfo 255 @ifinfo
312 @center ---------- 256 @center ----------
313 @center SGML Features 257 @center SGML Features
314 @center ---------- 258 @center ----------
423 To be more in line with the other URL schemes, the hostname and port of 367 To be more in line with the other URL schemes, the hostname and port of
424 an NNTP server can be specified. URLs of the form 368 an NNTP server can be specified. URLs of the form
425 news://hostname:port/messageID work, but will not work in most other 369 news://hostname:port/messageID work, but will not work in most other
426 browsers. 370 browsers.
427 371
428
429 @item HTTP 372 @item HTTP
430 Supports both the HTTP/0.9 and HTTP/1.0 protocols. Fully MIME-compliant 373 Supports the HTTP/0.9, HTTP/1.0, and HTTP/1.1 protocols. Fully
431 with regards to HTTP/1.0. 374 MIME-compliant with regards to HTTP/1.0.
432 @item Gopher 375 @item Gopher
433 Support for all gopher types, including CSO queries. 376 Support for all gopher types, including CSO queries.
434 @item Gopher+ 377 @item Gopher+
435 Support for Gopher+ retrievals. Support for converting ASK blocks into 378 Support for Gopher+ retrievals. Support for converting ASK blocks into
436 HTML 3.0 FORMS and submitting them back to the server. 379 HTML 3.0 FORMS and submitting them back to the server.
467 from Enterprise Information Technologies. The specification for SHTTP 410 from Enterprise Information Technologies. The specification for SHTTP
468 can be found on EIT's web server at 411 can be found on EIT's web server at
469 http://www.commerce.net/information/standards/drafts/shttp.txt. 412 http://www.commerce.net/information/standards/drafts/shttp.txt.
470 @end table 413 @end table
471 414
472 @node Setting Up, Retrieving Emacs-W3, Introduction, Top 415 @node Starting Up, Basic Setup, Introduction, Top
473 @comment node-name, next, previous, up 416 @comment node-name, next, previous, up
474 @chapter Setting Up 417 @chapter Starting Up
475 @cindex Setting Up Emacs-W3 418 @cindex Starting Up Emacs-W3
476 @cindex Retrieving Emacs-W3
477 This section of the manual deals with getting, compiling, and 419 This section of the manual deals with getting, compiling, and
478 configuring @i{Emacs-W3}. 420 configuring @i{Emacs-W3}.
479 @ifinfo 421 @ifinfo
480 @menu 422 @menu
481 * Retrieving Emacs-W3:: Retrieving Emacs-W3 via anonymous ftp
482 * Compiling Emacs-W3:: Compiling Emacs-W3 and its associated files
483 * Basic Setup:: Basic setup that everyone needs to do 423 * Basic Setup:: Basic setup that everyone needs to do
484 * Firewalls:: How to set Emacs-W3 up to use a particular 424 * Firewalls:: How to set Emacs-W3 up to use a particular
485 firewall setup. 425 firewall setup.
486 * Proxy Gateways:: Using a proxy server 426 * Proxy Gateways:: Using a proxy server
487 @end menu 427 @end menu
488 @end ifinfo 428 @end ifinfo
489 @node Retrieving Emacs-W3, Compiling Emacs-W3, Setting Up, Setting Up 429
490 @comment node-name, next, previous, up 430 @node Basic Setup, Firewalls, Starting Up, Starting Up
491 @section Retrieving Emacs-W3
492
493 :: WORK :: Document that Emacs-W3 now requires the URL package as well
494
495 @node Compiling Emacs-W3, Basic Setup, Retrieving Emacs-W3, Setting Up
496 @comment node-name, next, previous, up
497 @section Compiling Emacs-W3
498 To install Emacs-W3, go into the @file{w3} subdirectory and edit the
499 @file{Makefile}. These variables might need to be changed:
500 @table @code
501 @item EMACS
502 This variable controls what version of Emacs is used to compile the
503 programs. It should be the full path to the Emacs executable on the
504 system. The default is to use GNU Emacs (@file{emacs}).
505 @item LISPDIR
506 This variable controls where the lisp code is copied to when it is
507 installed (with @code{make install}). This is usually the users
508 personal lisp code directory. The value is run through
509 @dfn{expand-file-name} and then added to the load-path. Default is
510 @file{~/lisp}.
511 @item DOTEMACS
512 This variable points to the Emacs customization file, default is
513 @file{~/.emacs}.
514 @item INFODIR
515 This variable points to the local info directory. This can be any valid
516 directory, as long as it is in @code{Info-default-directory-list} so
517 that info-mode can find it. Default is @file{/usr/local/info/}.
518
519 @item MAKEINFO
520 This variables controls how the info files are built. Possible values
521 are @code{makeinfo} or @code{emacs -batch -q -f
522 batch-texinfo-format}. Default is @code{makeinfo}.
523 @end table
524 Once the @file{Makefile} has been modified, several different targets
525 can be built.
526 @table @code
527 @item make w3
528 This compiles all the .el files into the much faster .elc files.
529 @item make install
530 Compiles all the .el files and copies .el and .elc files into the
531 directory specified by @code{LISPDIR}.
532 @item make emacs
533 Modifies the file specified by @code{DOTEMACS}. A statement modifying
534 the load-path variable and several autoload statements are added to the
535 end of the file.
536 @item make all
537 Compiles and installs the .el files, and also modify/create the
538 @code{DOTEMACS} file.
539 @item make w3.info
540 Creates the Emacs-readable info files. The info files are created in
541 the directory specified by @code{INFODIR}. The makefile variable
542 @code{MAKEINFO} determines how the info file is built.
543 @item make w3.dvi
544 Creates the printable documentation, using tex and texindex to properly
545 generate the indices. A @file{w3.dvi} file is left in the current
546 directory.
547 @end table
548 @node Basic Setup, Firewalls, Compiling Emacs-W3, Setting Up
549 @comment node-name, next, previous, up 431 @comment node-name, next, previous, up
550 @section Basic Setup 432 @section Basic Setup
551 There are a few variables that almost all people need to change. 433 There are a few variables that almost all people need to change.
552 434
553 @table @code 435 @table @code
642 string is passed through @code{format}, and should expect four strings: 524 string is passed through @code{format}, and should expect four strings:
643 the title of the window, the program name to execute, and the server and 525 the title of the window, the program name to execute, and the server and
644 port number. The default is for xterm, which is very UNIX and 526 port number. The default is for xterm, which is very UNIX and
645 XWindows-centric. 527 XWindows-centric.
646 @end table 528 @end table
647 @node Firewalls, Proxy Gateways, Basic Setup, Setting Up 529 @node Firewalls, Proxy Gateways, Basic Setup, Starting Up
648 @comment node-name, next, previous, up 530 @comment node-name, next, previous, up
649 @section Firewalls 531 @section Firewalls
650 @cindex Gateways 532 @cindex Gateways
651 There are several different reasons why the gateway support might be 533 There are several different reasons why the gateway support might be
652 required. 534 required.
661 Using TERM @footnote{TERM is a user-level protocol for emulating IP over 543 Using TERM @footnote{TERM is a user-level protocol for emulating IP over
662 a serial line. More information is available at 544 a serial line. More information is available at
663 ftp://sunsite.unc.edu/pub/Linux/apps/comm/term} for slip-like access to 545 ftp://sunsite.unc.edu/pub/Linux/apps/comm/term} for slip-like access to
664 the internet. 546 the internet.
665 547
666 548 NOTE: XEmacs and Emacs 19.22 or later have patches to enable native TERM
667 NOTE: Emacs 19.22 has patches to enable native TERM networking. To 549 networking. To enable it, #define TERM in the appropriate s/*.h file
668 enable it, #define TERM in the appropriate s/*.h file for the operating 550 for the operating system, then change the SYSTEM_LIBS define to include
669 system, then change the SYSTEM_LIBS define to include the @file{termnet} 551 the @file{termnet} library that comes with the latest versions of TERM.
670 library that comes with the latest versions of TERM.
671 552
672 @item 553 @item
673 @cindex Faulty hostname resolvers 554 @cindex Faulty hostname resolvers
674 @cindex Broken SUN libc 555 @cindex Broken SUN libc
675 @cindex Can't resolve hostnames 556 @cindex Can't resolve hostnames
679 linked statically, this means it won't be able to get to any machines 560 linked statically, this means it won't be able to get to any machines
680 off the local network. This is characterized by being able to reach 561 off the local network. This is characterized by being able to reach
681 someplace with a raw ip number, but not its hostname 562 someplace with a raw ip number, but not its hostname
682 (http://129.79.254.191/ works, but http://www.cs.indiana.edu/ doesn't). 563 (http://129.79.254.191/ works, but http://www.cs.indiana.edu/ doesn't).
683 564
684
685 If for some reason it is not feasible to recompile Emacs with the 565 If for some reason it is not feasible to recompile Emacs with the
686 @file{-lresolv} library or dynamic linking, it is just like being behind 566 @file{-lresolv} library or dynamic linking, it is just like being behind
687 a firewall. Another alternative is to set the variable 567 a firewall. Another alternative is to set the variable
688 @code{url-broken-resolution} - this will use the support in ange-ftp or 568 @code{url-broken-resolution} - this will use the support in ange-ftp or
689 EFS to use @file{nslookup} in a subprocess to do all hostname resolving. 569 EFS to use @file{nslookup} in a subprocess to do all hostname resolving.
690 See the variables @code{efs-nslookup-program}, 570 See the variables @code{efs-nslookup-program},
691 @code{efs-nslookup-on-connect}, and @code{efs-nslookup-threshold} if are 571 @code{efs-nslookup-on-connect}, and @code{efs-nslookup-threshold} if are
692 using EFS, or @code{ange-ftp-nslookup-program} if using Ange-FTP. 572 using EFS, or @code{ange-ftp-nslookup-program} if using Ange-FTP.
693
694 @cindex Connections hanging with XEmacs & solaris
695 @cindex Solaris networking problems
696 @cindex XEmacs & Solaris network problems
697 @item
698 Running XEmacs 19.x and Solaris 2.x (SunOS 5.x). For some reason,
699 network processes under Solaris and XEmacs never get a status of
700 @code{exit} or @code{closed}. This causes retrieval of HTTP and gopher
701 pages to hang indefinitely, with Emacs chewing up large amounts of CPU
702 time.
703 573
704 @end enumerate 574 @end enumerate
705 575
706 @vindex url-gateway-local-host-regexp 576 @vindex url-gateway-local-host-regexp
707 Emacs-W3 has support for using the gateway mechanism for certain 577 Emacs-W3 has support for using the gateway mechanism for certain
756 requests becausse it did not buffer its input before opening a 626 requests becausse it did not buffer its input before opening a
757 connection. This should be a regular expression to watch for that 627 connection. This should be a regular expression to watch for that
758 signifies the end of the setup of @code{url-gateway-telnet-program}. 628 signifies the end of the setup of @code{url-gateway-telnet-program}.
759 The default should work fine for telnet. 629 The default should work fine for telnet.
760 630
761
762 @cindex Host-based gateways 631 @cindex Host-based gateways
763 @cindex Hair-pulling gateway-headaches 632 @cindex Hair-pulling gateway-headaches
764 @vindex url-gateway-host 633 @vindex url-gateway-host
765 When using the @code{host}-based gatway method, things get a bit more 634 When using the @code{host}-based gatway method, things get a bit more
766 complicated. This is basically my attempt to do some of the basic stuff 635 complicated. This is basically my attempt to do some of the basic stuff
771 @vindex url-gateway-connect-program 640 @vindex url-gateway-connect-program
772 The variable @code{url-gateway-connect-program} controls how the host is 641 The variable @code{url-gateway-connect-program} controls how the host is
773 reached. The easiest way is to have a program that does not require a 642 reached. The easiest way is to have a program that does not require a
774 username and password to login. The most common of these is the 643 username and password to login. The most common of these is the
775 @dfn{rsh} command. 644 @dfn{rsh} command.
776
777 645
778 @vindex url-gateway-program-interactive 646 @vindex url-gateway-program-interactive
779 @vindex url-gateway-handholding-password-regexp 647 @vindex url-gateway-handholding-password-regexp
780 @vindex url-gateway-handholding-login-regexp 648 @vindex url-gateway-handholding-login-regexp
781 @vindex url-gateway-host-username 649 @vindex url-gateway-host-username
787 necessary to log into the gateway machine. The regular expressions in 655 necessary to log into the gateway machine. The regular expressions in
788 the variables @code{url-gateway-handholding-login-regexp} and 656 the variables @code{url-gateway-handholding-login-regexp} and
789 @code{url-gateway-handholding-password-regexp} should match the login 657 @code{url-gateway-handholding-password-regexp} should match the login
790 and password prompts on the gateway system respectively. For example: 658 and password prompts on the gateway system respectively. For example:
791 659
792
793 @example 660 @example
794 (setq url-gateway-connect-program "telnet" 661 (setq url-gateway-connect-program "telnet"
795 url-gateway-host-program "telnet" 662 url-gateway-host-program "telnet"
796 url-gateway-program-interactive t 663 url-gateway-program-interactive t
797 url-gateway-host-username "wmperry" 664 url-gateway-host-username "wmperry"
807 @code{url-gateway-host-prompt-pattern} should contain a regular 674 @code{url-gateway-host-prompt-pattern} should contain a regular
808 expression that matches the shell prompt on the remote machine. This 675 expression that matches the shell prompt on the remote machine. This
809 should appear @b{no where} in the login banner/setup, or things could 676 should appear @b{no where} in the login banner/setup, or things could
810 get very confused. 677 get very confused.
811 678
812
813 @vindex url-gateway-host-program-ready-regexp 679 @vindex url-gateway-host-program-ready-regexp
814 @vindex url-gateway-host-program 680 @vindex url-gateway-host-program
815 The variable @code{url-gateway-host-program-ready-regexp} should contain 681 The variable @code{url-gateway-host-program-ready-regexp} should contain
816 a regular expression that matches the end of the setup of 682 a regular expression that matches the end of the setup of
817 @code{url-gateway-host-program} when it tries to make a connection to an 683 @code{url-gateway-host-program} when it tries to make a connection to an
818 off-firewall machine. (Basically the same as 684 off-firewall machine. (Basically the same as
819 @code{url-gateway-telnet-ready-regexp}. 685 @code{url-gateway-telnet-ready-regexp}.
820 686
821
822 Emacs-W3 should now be able to get outside the local network. If none 687 Emacs-W3 should now be able to get outside the local network. If none
823 of this makes sense, its probably my fault. Please check with the 688 of this makes sense, its probably my fault. Please check with the
824 network administrators to see if they have a program that does most of 689 network administrators to see if they have a program that does most of
825 this already, since somebody somewhere at the company has probably been 690 this already, since somebody somewhere at the company has probably been
826 through something similar to this before, and would be much more 691 through something similar to this before, and would be much more
827 helpful/knowledgeable about the local setup than I would be. But feel 692 helpful/knowledgeable about the local setup than I would be. But feel
828 free to mail me as a last resort. 693 free to mail me as a last resort.
829 694
830 695 @node Proxy Gateways, Basic Usage, Firewalls, Starting Up
831 @node Proxy Gateways, Basic Usage, Firewalls, Setting Up
832 @comment node-name, next, previous, up 696 @comment node-name, next, previous, up
833 @section Proxy Gateways 697 @section Proxy Gateways
834 In late January 1993, Kevin Altis and Lou Montulli proposed and implemented a 698 @vindex url-proxy-services
835 new proxy service. This service requires the use of environment 699 @cindex Proxy Servers
836 variables to specify a gateway server/port # to send protocol requests 700 @cindex Proxies
837 to. Each protocol (HTTP, WAIS, gopher, FTP, etc.@:) can have a 701 @cindex Proxies, environment variables
838 different gateway server. The environment variables are 702 @cindex HTTP Proxy
839 @var{PROTOCOL}_proxy, where @var{PROTOCOL} is one of gopher, file, HTTP, 703 In late January 1993, Kevin Altis and Lou Montulli proposed and
840 FTP, or WAIS. 704 implemented a new proxy service. This service requires the use of
841 705 environment variables to specify a gateway server/port # to send
842 :: WORK :: 706 protocol requests to. Each protocol (HTTP, WAIS, gopher, FTP, etc.@:)
707 can have a different gateway server. The environment variables are
708 @var{PROTOCOL}_proxy, where @var{PROTOCOL} is one of the supported
709 network protocols (gopher, file, HTTP, FTP, etc.)
710
711 @cindex No Proxy
712 @cindex Proxies, exclusion lists
713 @vindex NO_PROXY
714 For companies with internal intranets, it will usually be helpful to
715 define a list of hosts that should be contacted directly, @b{not} sent
716 through the proxy. The @var{NO_PROXY} environment variable controls
717 what hosts are able to be contacted directly. This should be a comma
718 separated list of hostnames, domain names, or a mixture of both.
719 Asterisks can be used as a wildcard. For example:
720
721 @example
722 NO_PROXY=*.aventail.com,home.com,*.seanet.com
723 @end example
724
725 tells Emacs-W3 to contact all machines in the @b{aventail.com} and
726 @b{seanet.com} domains directly, as well as the machine named
727 @b{home.com}.
728
729 @vindex url-proxy-services
730 @cindex Proxies, setting from lisp
731 For those adventurous souls who enjoy writing regular expressions, all
732 the proxy settings can be manipulated from Emacs-Lisp. The variable
733 @code{url-proxy-services} controls this. This is an assoc list, keyed
734 on the protocol type (http, gopher, etc) in all lowercase. The
735 @code{cdr} of each entry should be the fully-specified URL of the proxy
736 server to contact, or, in the case of the special "no_proxy" entry, a
737 regular expression that matches any hostnames that should be contacted
738 directly.
739
740 @example
741 (setq url-proxy-services '(("http" . "http://proxy.aventail.com/")
742 ("no_proxy" . "^.*\\(aventail\\|seanet\\)\.com")))
743 @end example
843 744
844 @node Basic Usage, , Proxy Gateways, Top 745 @node Basic Usage, , Proxy Gateways, Top
845 @comment node-name, next, previous, up 746 @comment node-name, next, previous, up
846 @chapter Basic Usage 747 @chapter Basic Usage
847 Emacs-W3 is similar to the Info package all Emacs users hold near and dear to 748 Emacs-W3 is similar to the Info package all Emacs users hold near and dear to
1926 @ifinfo 1827 @ifinfo
1927 @menu 1828 @menu
1928 * VMS:: The wonderful world of VAX|AXP-VMS! 1829 * VMS:: The wonderful world of VAX|AXP-VMS!
1929 * OS/2:: The next-best thing to Unix. 1830 * OS/2:: The next-best thing to Unix.
1930 * MS-DOS:: The wonderful world of MS-DOG! 1831 * MS-DOS:: The wonderful world of MS-DOG!
1931 * 16-Bit Windows:: Windows 3.1, 3.11, and WFW 3.11.
1932 * 32-Bit Windows:: Windows NT, Chicago/Windows 95. 1832 * 32-Bit Windows:: Windows NT, Chicago/Windows 95.
1933 * Amiga:: The Amiga, for those who still love them. 1833 * Amiga:: The Amiga, for those who still love them.
1934 @end menu 1834 @end menu
1935 @end ifinfo 1835 @end ifinfo
1936 1836
1946 @section OS/2 1846 @section OS/2
1947 @cindex OS/2 1847 @cindex OS/2
1948 @cindex Warp 1848 @cindex Warp
1949 :: WORK :: OS/2 Specific instructions 1849 :: WORK :: OS/2 Specific instructions
1950 1850
1951 @node MS-DOS, 16-Bit Windows, OS/2, Non-Unix Operating Systems 1851 @node MS-DOS, 32-Bit Windows, OS/2, Non-Unix Operating Systems
1952 @section MS-DOS 1852 @section MS-DOS
1953 @cindex MS-DOS 1853 @cindex MS-DOS
1954 @cindex Microsloth 1854 @cindex Microsloth
1955 @cindex DOS 1855 @cindex DOS
1956 @cindex MS-DOG 1856 @cindex MS-DOG
1957 :: WORK :: DOS Specific instructions 1857 :: WORK :: DOS Specific instructions
1958 1858
1959 @node 16-Bit Windows, 32-Bit Windows, MS-DOS, Non-Unix Operating Systems 1859 @node 32-Bit Windows, Amiga, MS-DOS, Non-Unix Operating Systems
1960 @section 16-Bit Windows
1961 @cindex 16-Bit Windows
1962 @cindex Microsloth
1963 @cindex Windows (16-Bit)
1964 @cindex Windows For Workgroups
1965 :: WORK :: 16bit Windows Specific instructions
1966
1967 @node 32-Bit Windows, Amiga, 16-Bit Windows, Non-Unix Operating Systems
1968 @section 32-Bit Windows 1860 @section 32-Bit Windows
1969 @cindex Chicago
1970 @cindex Windows (32-Bit) 1861 @cindex Windows (32-Bit)
1971 @cindex 32-Bit Windows 1862 @cindex 32-Bit Windows
1972 @cindex Microsloth 1863 @cindex Microsloth
1973 @cindex Windows '95 1864 @cindex Windows '95
1974 :: WORK :: 32bit Windows Specific instructions 1865 :: WORK :: 32bit Windows Specific instructions
2017 unreadable. 1908 unreadable.
2018 1909
2019 @example 1910 @example
2020 <style notation="css"> 1911 <style notation="css">
2021 /* This is a comment 1912 /* This is a comment
2022 ** These will be ignored, up to the terminating end-of-line 1913 ** These will be ignored, up to the terminating */
2023 # 1914
2024 h1 @{ align: center, 1915 h1 @{ align: center,
2025 color: yellow, 1916 color: yellow,
2026 background: red, 1917 background: red,
2027 font-size: 24pt 1918 font-size: 24pt
2028 @} 1919 @}
2112 @cindex Alternate caching method 2003 @cindex Alternate caching method
2113 Emacs-W3 caches files under the temporary directory specified by 2004 Emacs-W3 caches files under the temporary directory specified by
2114 @code{url-temporary-directory}, in a user-specific subdirectory 2005 @code{url-temporary-directory}, in a user-specific subdirectory
2115 (determined by the @code{user-real-login-name} function). The cache 2006 (determined by the @code{user-real-login-name} function). The cache
2116 files are stored under their original names, so a URL like: 2007 files are stored under their original names, so a URL like:
2117 http://www.spry.com/foo/bar/baz.html would be stored in a cache file 2008 http://www.aventail.com/foo/bar/baz.html would be stored in a cache file
2118 named: /tmp/wmperry/com/spry/www/foo/bar/baz.html. Sometimes, espcially 2009 named: /tmp/wmperry/com/aventail/www/foo/bar/baz.html. Sometimes,
2119 with gopher links, there will be name conflicts, and an error will be 2010 espcially with gopher links, there will be name conflicts, and an error
2120 signalled. This cannot be avoided, and still have reasonable 2011 will be signalled. This cannot be avoided, and still have reasonable
2121 performance at startup time (reading in an index file of all the cached 2012 performance at startup time (reading in an index file of all the cached
2122 pages can take a long time on slow machines, or even fast machines with 2013 pages can take a long time on slow machines, or even fast machines with
2123 large caches). When running XEmacs 19.12 or later, a different naming 2014 large caches). When running XEmacs 19.12 or later, a different naming
2124 scheme can be used. This avoids name conflicts, but loses the human 2015 scheme can be used. This avoids name conflicts, but loses the human
2125 readability of the cache file names. The cache files will look like: 2016 readability of the cache file names. The cache files will look like:
2142 @section Interfacing to Mail/News 2033 @section Interfacing to Mail/News
2143 @cindex Interfacing to Mail/News 2034 @cindex Interfacing to Mail/News
2144 @cindex VM 2035 @cindex VM
2145 @cindex Using Emacs-W3 with VM 2036 @cindex Using Emacs-W3 with VM
2146 @cindex GNUS 2037 @cindex GNUS
2147 @cindex Using Emacs-W3 with GNUS 2038 @cindex Using Emacs-W3 with Gnus
2148 @cindex RMAIL 2039 @cindex RMAIL
2149 @cindex Using Emacs-W3 with RMAIL 2040 @cindex Using Emacs-W3 with RMAIL
2150 More and more people are including URLs in their signatures, and within 2041 More and more people are including URLs in their signatures, and within
2151 the body of mail messages. It can get quite tedious to type these into 2042 the body of mail messages. It can get quite tedious to type these into
2152 the minibuffer to follow one. 2043 the minibuffer to follow one.
2153 2044
2154 With the latest versions of VM (the 5.9x series of betas), URLs are 2045 @vindex browse-url-browser-function
2155 highlighted, and can be followed with the mouse or the return 2046 With the latest versions of VM (the 5.9x series of betas) and Gnus
2156 key. 2047 (5.x), URLs are automatically highlighted, and can be followed with the
2048 mouse or the return key. How the URLs are viewed is determined by the
2049 variable @code{browse-url-browser-function}, and it should be set to the
2050 symbol @code{browse-url-w3}.
2157 2051
2158 To access URLs from within RMAIL, the following hook should do the 2052 To access URLs from within RMAIL, the following hook should do the
2159 trick. 2053 trick.
2160 @example 2054 @example
2161 (add-hook 'rmail-mode-hook 2055 (add-hook 'rmail-mode-hook
2162 (function 2056 (function
2163 (lambda () 2057 (lambda ()
2164 (define-key rmail-mode-map [mouse-2] 'w3-maybe-follow-link-mouse) 2058 (define-key rmail-mode-map [mouse-2] 'w3-maybe-follow-link-mouse)
2165 (define-key rmail-mode-map "\r" 'w3-maybe-follow-link)))) 2059 (define-key rmail-mode-map "\r" 'w3-maybe-follow-link))))
2166 @end example
2167
2168 To access URLs from within GNUS, the following hook should do the
2169 trick.
2170 @example
2171 (add-hook 'gnus-article-mode-hook
2172 (function
2173 (lambda ()
2174 (define-key gnus-article-mode-map [mouse-2]
2175 'w3-maybe-follow-link-mouse)
2176 (define-key gnus-article-mode-map "\r"
2177 'w3-maybe-follow-link))))
2178 @end example 2060 @end example
2179 2061
2180 @node Debugging HTML, Native WAIS Support, Interfacing to Mail/News, Advanced Features 2062 @node Debugging HTML, Native WAIS Support, Interfacing to Mail/News, Advanced Features
2181 @section Debugging HTML 2063 @section Debugging HTML
2182 @cindex Debugging 2064 @cindex Debugging
2298 @vindex url-confirmation-func 2180 @vindex url-confirmation-func
2299 What function to use for asking yes or no functions. Possible values 2181 What function to use for asking yes or no functions. Possible values
2300 are @code{'yes-or-no-p} or @code{'y-or-n-p}, or any function that takes 2182 are @code{'yes-or-no-p} or @code{'y-or-n-p}, or any function that takes
2301 a single argument (the prompt), and returns @code{t} only if a positive 2183 a single argument (the prompt), and returns @code{t} only if a positive
2302 answer is gotten. Defaults to @code{'yes-or-no-p}. 2184 answer is gotten. Defaults to @code{'yes-or-no-p}.
2303 @item w3-delimit-links
2304 @vindex w3-delimit-links
2305 :: WORK :: This is going away, and should be specified with stylesheets instead
2306 @item w3-delimit-emphasis
2307 @vindex w3-delimit-emphasis
2308 :: WORK :: This is going away, and should be specified with stylesheets instead
2309 @item w3-default-action 2185 @item w3-default-action
2310 @vindex w3-default-action 2186 @vindex w3-default-action
2311 A lisp symbol specifying what action to take for files with extensions 2187 A lisp symbol specifying what action to take for files with extensions
2312 that are not in the @code{mm-mime-extensions} assoc list. This is 2188 that are not in the @code{mm-mime-extensions} assoc list. This is
2313 useful in case Emacs-W3 ever run across files with weird extensions 2189 useful in case Emacs-W3 ever run across files with weird extensions
2441 changes, new servers, new software, etc. 2317 changes, new servers, new software, etc.
2442 @end itemize 2318 @end itemize
2443 2319
2444 As a last resort, mail me. I'll try to answer as quickly as I can. 2320 As a last resort, mail me. I'll try to answer as quickly as I can.
2445 2321
2446 @node Future Directions, Programming Interface, More Help, Top 2322 @node Future Directions, Reporting Bugs, More Help, Top
2447 @chapter Future Directions 2323 @chapter Future Directions
2448 Changes are constantly being made to the Emacs browser (hopefully all 2324 Changes are constantly being made to the Emacs browser (hopefully all
2449 for the better). This is a list of the things that are being worked on 2325 for the better). This is a list of the things that are being worked on
2450 right now. 2326 right now.
2451 2327
2452 :: WORK :: Revamp the todo list 2328 :: WORK :: Revamp the todo list
2453 @node Programming Interface, Generalized ZONES, Future Directions, Top 2329
2454 @comment node-name, next, previous, up 2330 @node Reporting Bugs, Installing SSL, Future Directions, Top
2455 @chapter Internals of Emacs-W3
2456 @cindex Internals of Emacs-W3
2457 @cindex Using Emacs-W3 from other programs
2458 This chapter attempts to explain some of the internal workings of
2459 Emacs-W3 and various data structures that are used. It also details
2460 some functions that are useful for using some of the Emacs-W3
2461 functionality from within other programs, or extending the current
2462 capabilities of Emacs-W3.
2463
2464 @ifinfo
2465 @menu
2466 * Generalized ZONES:: A generic interface to 'zones' of text
2467 that can contain information.
2468 * Global Variables:: Global variables used throughout Emacs-W3
2469 * Data Structures:: The various data structures used in Emacs-W3
2470 * Miscellaneous Functions:: Miscellaneous functions to interface
2471 with w3 and access its data structures
2472 * MIME functions:: MIME functions---parsing messages,
2473 mailcap files, and more.
2474 @end menu
2475 @end ifinfo
2476 @node Generalized ZONES, Global Variables,Programming Interface, Programming Interface, Programming Interface
2477 @comment node-name, next, previous, up
2478 @section Generalized ZONES
2479 Due to the many different @i{flavors} of Emacs in existence, the
2480 addition of data and font information to arbitrary regions of text has
2481 been generalized. The following functions are defined for
2482 using/manipulating these @dfn{zones} of data.
2483
2484 @table @code
2485 @findex w3-add-zone
2486 @item w3-add-zone (start end style data &optional highlight)
2487 Creates a zone between buffer positions start and end, with font
2488 information specified by style, and a data segment of data. If the
2489 optional argument highlight is non-@code{nil}, then the region
2490 highlights when the mouse moves over it.
2491
2492
2493 @findex w3-zone-at
2494 @item w3-zone-at (point)
2495 Returns the zone at @var{point}. Preference is given to hypertext
2496 links, then to form entry areas, then to inlined images. So if an
2497 inlined image was part of a hypertext link, this would always return the
2498 hypertext link.
2499
2500 @findex w3-zone-data
2501 @item w3-zone-data (zone)
2502 Returns the zone's data segment. The data structures used in Emacs-W3 are
2503 relatively simple. They are just list structures that follow a certain
2504 format. The two main data types are @dfn{form objects}, @dfn{link
2505 objects},and @dfn{inlined images}. All the information for these types
2506 of links are stored as lists.
2507
2508 @findex w3-zone-hidden-p
2509 @item w3-zone-hidden-p (zone)
2510 Returns @code{t} if and only if a zone is currently invisible.
2511 @findex w3-hide-zone
2512 @item w3-hide-zone (start end)
2513 Makes a region of text from @code{start} to @code{end} invisible.
2514 @findex w3-unhide-zone
2515 @item w3-unhide-zone (start end)
2516 Makes a region of text from @code{start} to @code{end} visible
2517 again.
2518 @findex w3-zone-start
2519 @item w3-zone-start (zone)
2520 Returns an integer that is the start of zone, as a buffer position. In
2521 Emacs 18.xx, this returns a marker instead of an integer, but it can be
2522 used just like an integer.
2523 @findex w3-zone-end
2524 @item w3-zone-end (zone)
2525 Returns an integer that is the end of zone, as a buffer position. In
2526 Emacs 18.xx, this returns a marker instead of an integer, but it can be
2527 used just like an integer.
2528 @findex w3-zone-eq
2529 @item w3-zone-eq (zone1 zone2)
2530 Returns @code{t} if and only if zone1 and zone2 represent the same
2531 region of text in the same buffer, with the same properties and
2532 data.
2533 @findex w3-delete-zone
2534 @item w3-delete-zone (zone)
2535 Removes zone from its buffer (or current buffer). The return value is
2536 irrelevant, and varies for each version of Emacs.
2537 @findex w3-all-zones
2538 @item w3-all-zones ()
2539 Returns a list of all the zones contained in the current buffer. Useful
2540 for extracting information about hypertext links or form entry
2541 areas. Programs should not rely on this list being sorted, as the order
2542 varies with each version of Emacs.
2543 @item w3-zone-at (pt)
2544 Returns the zone at character position PT in the current buffer that is
2545 either a link or a forms entry area. Returns @code{nil} if no link at
2546 point.
2547
2548 @end table
2549 @findex w3-zone-data
2550 These data structures are what is generally returned by
2551 @code{w3-zone-data}.
2552
2553 @node Global Variables, Data Structures , Generalized ZONES, Programming Interface
2554 @comment node-name, next, previous, up
2555 @section Global variables
2556 There are also some variables that may be useful when writing a program
2557 or function that interacts with Emacs-W3. All of the
2558 @code{w3-current-*} variables are local to each buffer.
2559
2560
2561 @table @code
2562 @vindex url-current-mime-headers
2563 @item url-current-mime-headers
2564 An assoc list of all the MIME headers for the current document. Keyed
2565 on the lowercase MIME header (e.g., @samp{content-type} or
2566 @samp{content-encoding}.
2567 @vindex url-current-server
2568 @item url-current-server
2569 Server that the current document was retrieved from.
2570 @vindex url-current-file
2571 @item url-current-file
2572 Filename of the current document
2573 @vindex url-current-type
2574 @item url-current-type
2575 A string representing what network protocol was used to retrieve the
2576 current buffer's document. Can be one of http, gopher, file, ftp, news,
2577 or mailto.
2578 @vindex url-current-port
2579 @item url-current-port
2580 Port # of the current document.
2581 @vindex w3-current-last-buffer
2582 @item w3-current-last-buffer
2583 The last buffer seen before this one.
2584 @vindex w3-running-FSF19
2585 @item w3-running-FSF19
2586 This is @code{t} if and only if we are running in FSF Emacs 19.
2587 @vindex w3-running-xemacs
2588 @item w3-running-xemacs
2589 This is @code{t} if and only if we are running in Lucid Emacs, WinEmacs, or
2590 XEmacs.
2591 @end table
2592
2593 @node Data Structures, Miscellaneous Functions, Global Variables, Programming Interface
2594 @comment node-name, next, previous, up
2595 @section Data Structures
2596 Form objects are used to store information about a FORM data entry area.
2597 @enumerate
2598 @item
2599 @code{'w3form}
2600 @item
2601 A cons pair of (METHOD . URL), where METHOD specifies what method to use
2602 to retrieve the form when it is submitted (e.g., @samp{GET}) and URL is a
2603 fully specified URL pointing at where to submit the FORM data to.
2604 @item
2605 The type of input area this is. (e.g., @samp{CHECKBOX} or
2606 @samp{RADIO})
2607 @item
2608 The name of the input tag. This is used when sending the form to the
2609 server, so that the server can tell what data is what.
2610 @item
2611 The default value of the input area. Gotten from the INPUT tag at
2612 creation time.
2613 @item
2614 The current value of the input area.
2615 @item
2616 Whether the item is checked or not. Only used for RADIO or CHECKBOX
2617 items.
2618 @item
2619 The size (in characters) of the input area. Not used for CHECKBOX,
2620 RADIO, or TEXTAREA input areas.
2621 @item
2622 The maximum length of the input. Only used for TEXT or PASSWORD input
2623 areas.
2624 @item
2625 The form that this input area belongs to. Each form in the same buffer
2626 has a unique identifier assigned when the document is parsed. It is
2627 used when the form is submitted to get only the data for the correct
2628 form.
2629 @item
2630 A list of strings that represent the choices for this input area. Only
2631 used for SELECT tags.
2632 @item
2633 A string or @code{nil}, specifying the ID attribute on this input
2634 tag.
2635 @end enumerate
2636
2637 A new development in the World Wide Web is the concept of collapsible
2638 areas of text. If a zone controls one of these regions, it is marked
2639 with the @b{w3expandlist} property. The format of this structure
2640 is:
2641
2642 @enumerate
2643 @item
2644 @code{'w3expandlist}
2645 @item
2646 A marker representing the start of the hidden text as a buffer position.
2647 @item
2648 A marker representing the end of the hidden text as a buffer position.
2649 @end enumerate
2650
2651 A zone with the @b{w3graphic} property is a link to an inlined image's
2652 source file.
2653 @enumerate
2654 @item
2655 @code{'w3graphic}
2656 @item
2657 @findex w3-follow-inlined-image
2658 The full URL of the inlined image. This is only ever returned if the
2659 inlined image is the only extent under point, or
2660 @code{w3-follow-inlined-image} is invoked.
2661 @end enumerate
2662
2663 A zone with the @b{w3} property is a full-fledged hypertext link to
2664 another document.
2665 @enumerate
2666 @item
2667 @code{'w3}
2668 @item
2669 The ID attribute of this link. Used for resolving references to
2670 specific points within a document (e.g., @samp{file.html#sectionA}.
2671 @item
2672 The HREF attribute of this link. This is a fully specified URL pointing
2673 at a network resource. All relative directory references should have
2674 been removed before being stored in this structure.
2675 @item
2676 The text between the <A> and </A> tags. This is used to build menus or
2677 to get the text of a link without doing a buffer-substring.
2678 @item
2679 The URN attribute of this link. Currently not used for anything,
2680 waiting for the URN specification to be hammered out.
2681 @item
2682 The REL attribute of this link. Specifies the links relevance to the
2683 current document.
2684 @item
2685 The REV attribute of this link. Specifies the current documents
2686 relevance to the link.
2687 @item
2688 The METHODS attribute, which tells what methods can be used on this
2689 link. (e.g., @samp{GET, HEAD, PUT}.
2690 @end enumerate
2691 @node Miscellaneous Functions, MIME functions, Data Structures, Programming Interface
2692 @comment node-name, next, previous, up
2693 @section Miscellaneous Functions
2694 I have done quite a bit of work trying to make a clean interface to the
2695 internals of Emacs-W3.
2696
2697 @table @code
2698 @findex url-clear-tmp-buffer
2699 @vindex url-working-buffer
2700 @item url-clear-tmp-buffer
2701 Sets the current buffer to be @code{url-working-buffer}, creating it if
2702 necessary, and erase it. This should usually be called before
2703 retrieving URLs.
2704
2705 @findex w3-convert-html-to-latex
2706 @item w3-convert-html-to-latex
2707 Takes a buffer of HTML markup (which should be in
2708 @code{w3-working-buffer}), and convert it into LaTeX. This is an
2709 adaptation of the simple sed scripts from Cern. Does as good a job as
2710 the html2latex program, and I usually prefer its formatting over
2711 html2latex's.
2712
2713 @findex w3-fetch
2714 @item w3-fetch
2715 Takes a URL as its only argument. It then attempts to retrieve the URL.
2716 For example: @samp{(w3-fetch "http://cs.indiana.edu/")} would retrieve
2717 the Indiana University CS home page and parse it as HTML.
2718
2719
2720 @findex url-generate-new-buffer-name
2721 @item url-generate-new-buffer-name
2722 Takes a string, and returns the first unique buffer name using that
2723 string as a base. For example @samp{(url-generate-new-buffer-name
2724 "new-buff")} would return @samp{"new-buff<1>"} if buffer @code{new-buff}
2725 already existed.
2726
2727
2728 @findex url-generate-unique-filename
2729 @item url-generate-unique-filename
2730 Returns a string that represents a unique filename in the /tmp
2731 directory. For example, @samp{(url-generate-unique-filename)} would
2732 return @samp{"/tmp/url-tmp129440"}. The filename is arrived at by using
2733 a unique prefix (url-tmp), the uid of the current user (12944 in my
2734 case), and a number that is incremented if a file already exists.
2735
2736
2737 @findex url-buffer-visiting
2738 @item url-buffer-visiting (url)
2739 Returns the name of a buffer (if any) that is visiting URL.
2740
2741 @findex url-create-mime-request
2742 @vindex url-request-extra-headers
2743 @vindex url-request-data
2744 @vindex url-request-method
2745 @vindex url-mime-accept-string
2746 @vindex url-current-server
2747 @cindex Creating an HTTP request
2748 @item url-create-mime-request (fname ref-url)
2749 Creates a MIME request for the file fname. The Referer: field of the
2750 HTTP/1.0 request is set to the value of ref-url if necessary. Returns a
2751 string that can be sent to an HTTP server. The request uses several
2752 variables that control how the request looks.
2753
2754
2755 If the value of @code{url-request-extra-headers} is non-@code{nil}, then
2756 it is used as extra MIME headers when an HTTP/1.0 request is
2757 created.
2758
2759 @findex url-get-url-at-point
2760 @item url-get-url-at-point
2761 Returns the url at a point specified by an optional argument. If no
2762 argument is given to the function, the current buffer position is used.
2763 Tries to find the URL closest to that point, but does not change the
2764 users position in the buffer. Has a preference for looking backward
2765 when not directly on a URL.
2766
2767
2768 @findex url-hexify-string
2769 @item url-hexify-string
2770 Takes a string and replaces any characters that are not acceptable in a
2771 URL with the "escaped" encoding that is standard for URLs (replaces the
2772 character with a % followed by the hexadecimal representation of the
2773 ASCII value of the character). For example, @samp{(url-hexify-string
2774 "this is a test")} would return @samp{"this%20is%20a%20test"}.
2775
2776
2777 @findex url-open-stream
2778 @item url-open-stream
2779 Takes the same parameters as @code{open-network-stream}, and functions
2780 similarly. It takes a process name, a buffer name, a host name, and a
2781 port number or server name. It attempts to open a network connection to
2782 the remote host on the specified port/service name, with output going to
2783 the buffer. It returns the process object that is the network
2784 connection.
2785
2786
2787 @findex url-retrieve
2788 @item url-retrieve
2789 :: WORK :: Need to describe the url-request-* variables and the no-cache and
2790 expected-md5 arguments to url-retrieve ::
2791
2792
2793 @findex url-unhex-string
2794 @item url-unhex-string
2795 This is the opposite of @code{url-hexify-string}. It removes any %XXX
2796 encoded characters in a string. For example @samp{(url-unhex-string
2797 "this%20is%20a%20test")} would return @samp{"this is a test"}.
2798
2799 @findex w3-view-this-url
2800 @item w3-view-this-url
2801 Returns the URL of the hyperlink under point (if no hyperlink is under
2802 point, then it returns @code{nil}). If the optional argument is
2803 @code{nil}, then the URL is also displayed in the minibuffer.
2804
2805
2806 @findex url-view-url
2807 @item url-view-url
2808 Returns the URL of current document. If the optional argument is
2809 @code{nil}, then the URL is also displayed in the minibuffer.
2810
2811 @end table
2812
2813 @node MIME functions, Reporting Bugs, Miscellaneous Functions, Programming Interface
2814 @section MIME Functions
2815 @table @code
2816 @item mm-compose-type(TYPE)
2817 Composes a body section of MIME-type TYPE. This uses the compose field
2818 of a mailcap entry to generate the data, and returns a string that
2819 contains the data, with a correct content-type header.
2820
2821 @item mm-extension-to-mime(EXTN)
2822 Returns the MIME content-type of the file extension EXTN.
2823 @item mm-mime-info(ST ND REQUEST)
2824 Returns the mime viewer command for a specific MIME type. If ST is a
2825 number, then the MIME type is the @code{buffer-substring} between ST and
2826 ND, otherwise ST should be a string specifying the MIME type and
2827 associated data. Returns @code{nil} if the specified type is not found.
2828
2829
2830 Expects a complete content-type header line as its argument. This can
2831 be simple like text/html, or complex like text/plain; charset=blah; foo=bar
2832
2833
2834 Third argument REQUEST specifies what information to return. If it is
2835 @code{nil} or the empty string, the viewer (second field of the mailcap
2836 entry) is returned. If it is a string, then the mailcap field
2837 corresponding to that string is returned (print, description, whatever).
2838 If a number, then all the information for this specific viewer is
2839 returned.
2840 @item mm-parse-mailcap(FILE)
2841 Parses the mailcap file specified by FILE.
2842 @item mm-parse-mailcaps(PATH)
2843 Parses the default mailcap files. Optional argument PATH specifies a
2844 UNIX-style path of where to find the mailcap files. This function must
2845 be run before the rest of the mm-* functions.
2846 @item mm-parse-mimetype-file(FILE)
2847 Parses out a mime-types file specified by FILE.
2848 @item mm-parse-mimetypes(PATH)
2849 Parses the default mimetypes files. Optional argument PATH specifies a
2850 UNIX-style path of where to find the mimetypes files.
2851 @end table
2852
2853 @node Reporting Bugs, Installing SSL, MIME functions, Top
2854 @appendix Reporting Bugs 2331 @appendix Reporting Bugs
2855 @cindex Reporting Bugs 2332 @cindex Reporting Bugs
2856 @cindex Bugs 2333 @cindex Bugs
2857 @cindex Contacting the author 2334 @cindex Contacting the author
2858 2335