comparison lisp/browse-url.el @ 22507:f189183483a2

(browse-url-netscape): Encode `)' too.
author Dave Love <fx@gnu.org>
date Fri, 19 Jun 1998 16:01:08 +0000
parents b235f1b173f3
children 86a92272892c
comparison
equal deleted inserted replaced
22506:2107e25fa56f 22507:f189183483a2
44 ;; browse-url-lynx-* Lynx 0 44 ;; browse-url-lynx-* Lynx 0
45 ;; browse-url-grail Grail 0.3b1 45 ;; browse-url-grail Grail 0.3b1
46 ;; browse-url-mmm MMM ? 46 ;; browse-url-mmm MMM ?
47 ;; browse-url-generic arbitrary 47 ;; browse-url-generic arbitrary
48 48
49 ;; [The Netscape browser is now free software
50 ;; <URL:http://www.mozilla.org/>, albeit not GPLed, so it is
51 ;; reasonable to keep it as the default.]
52
49 ;; Note that versions of Netscape before 1.1b1 did not have remote 53 ;; Note that versions of Netscape before 1.1b1 did not have remote
50 ;; control. <URL:http://www.netscape.com/newsref/std/x-remote.html>. 54 ;; control. <URL:http://www.netscape.com/newsref/std/x-remote.html>.
51 55
52 ;; Netscape can cache Web pages so it may be necessary to tell it to 56 ;; Browsers can cache Web pages so it may be necessary to tell them to
53 ;; reload the current page if it has changed (e.g. if you have edited 57 ;; reload the current page if it has changed (e.g. if you have edited
54 ;; it). There is currently no perfect automatic solution to this. 58 ;; it). There is currently no perfect automatic solution to this.
55 59
56 ;; Netscape allows you to specify the id of the window you want to 60 ;; Netscape allows you to specify the id of the window you want to
57 ;; control but which window DO you want to control and how do you 61 ;; control but which window DO you want to control and how do you
96 ;; <URL:ftp://ftp.w3.org/pub/amaya>. mMosaic 100 ;; <URL:ftp://ftp.w3.org/pub/amaya>. mMosaic
97 ;; <URL:ftp://sig.enst.fr/pub/multicast/mMosaic/> (with development 101 ;; <URL:ftp://sig.enst.fr/pub/multicast/mMosaic/> (with development
98 ;; support for Java applets and multicast) can be used like Mosaic by 102 ;; support for Java applets and multicast) can be used like Mosaic by
99 ;; setting `browse-url-mosaic-program' appropriately. 103 ;; setting `browse-url-mosaic-program' appropriately.
100 104
101 ;; I [Denis Howe] recommend Nelson Minar <nelson@santafe.edu>'s excellent 105 ;; I [Denis Howe, not Dave Love] recommend Nelson Minar
102 ;; html-helper-mode.el for editing HTML and thank Nelson for 106 ;; <nelson@santafe.edu>'s excellent html-helper-mode.el for editing
103 ;; his many useful comments on this code. 107 ;; HTML and thank Nelson for his many useful comments on this code.
104 ;; <URL:http://www.santafe.edu/%7Enelson/hhm-beta/> 108 ;; <URL:http://www.santafe.edu/%7Enelson/hhm-beta/>
105 109
106 ;; See also hm--html-menus <URL:http://www.tnt.uni-hannover.de/%7Emuenkel/ 110 ;; See also hm--html-menus <URL:http://www.tnt.uni-hannover.de/%7Emuenkel/
107 ;; software/own/hm--html-menus/>. For composing correct HTML see also 111 ;; software/own/hm--html-menus/>. For composing correct HTML see also
108 ;; PSGML the general SGML structure editor package 112 ;; PSGML the general SGML structure editor package
690 the effect of `browse-url-new-window-p'. 694 the effect of `browse-url-new-window-p'.
691 695
692 When called non-interactively, optional second argument NEW-WINDOW is 696 When called non-interactively, optional second argument NEW-WINDOW is
693 used instead of `browse-url-new-window-p'." 697 used instead of `browse-url-new-window-p'."
694 (interactive (browse-url-interactive-arg "Netscape URL: ")) 698 (interactive (browse-url-interactive-arg "Netscape URL: "))
695 ;; URL encode any commas in the URL 699 ;; URL encode any `confusing' characters in the URL. This needs to
696 (while (string-match "," url) 700 ;; include at least commas; presumably also close parens.
697 (setq url (replace-match "%2C" t t url))) 701 (while (string-match "[,)]" url)
702 (setq url (replace-match
703 (format "%x" (string-to-char (match-string 0 url))) t t url)))
698 (let* ((process-environment (browse-url-process-environment)) 704 (let* ((process-environment (browse-url-process-environment))
699 (process (apply 'start-process 705 (process (apply 'start-process
700 (concat "netscape " url) nil 706 (concat "netscape " url) nil
701 browse-url-netscape-program 707 browse-url-netscape-program
702 (append browse-url-netscape-arguments 708 (append browse-url-netscape-arguments