diff options
| author | Richard M. Stallman | 1997-06-08 21:13:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-08 21:13:21 +0000 |
| commit | e9f527a0ce960ebd79eb30fc56b349464a156572 (patch) | |
| tree | 4514a12fa71db22b1798e88bfbd7015713620e7d | |
| parent | 94955307b698421b7de187078b48fdb17ff24896 (diff) | |
| download | emacs-e9f527a0ce960ebd79eb30fc56b349464a156572.tar.gz emacs-e9f527a0ce960ebd79eb30fc56b349464a156572.zip | |
(webjump-sample-sites): Change the hot list.
(webjump): Doc change.
| -rw-r--r-- | lisp/webjump.el | 194 |
1 files changed, 100 insertions, 94 deletions
diff --git a/lisp/webjump.el b/lisp/webjump.el index a2548da47e6..3273a5bbecc 100644 --- a/lisp/webjump.el +++ b/lisp/webjump.el | |||
| @@ -1,11 +1,10 @@ | |||
| 1 | ;;; webjump.el --- programmable Web hotlist | 1 | ;;; webjump.el --- programmable Web hotlist |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996 Free Software Foundation | 3 | ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Neil W. Van Dyke <nwv@acm.org> | 5 | ;; Author: Neil W. Van Dyke <nwv@acm.org> |
| 6 | ;; Created: Fri 09 Aug 1996 | 6 | ;; Created: 09-Aug-1996 |
| 7 | ;; Keywords: comm www | 7 | ;; Keywords: comm www |
| 8 | ;; X-URL: http://www.cs.brown.edu/people/nwv/ | ||
| 9 | 8 | ||
| 10 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 11 | 10 | ||
| @@ -43,7 +42,7 @@ | |||
| 43 | 42 | ||
| 44 | ;; You may wish to add something like the following to your `.emacs' file: | 43 | ;; You may wish to add something like the following to your `.emacs' file: |
| 45 | ;; | 44 | ;; |
| 46 | ;; (load "webjump") | 45 | ;; (require 'webjump) |
| 47 | ;; (global-set-key "\C-cj" 'webjump) | 46 | ;; (global-set-key "\C-cj" 'webjump) |
| 48 | ;; (setq webjump-sites | 47 | ;; (setq webjump-sites |
| 49 | ;; (append '( | 48 | ;; (append '( |
| @@ -52,25 +51,16 @@ | |||
| 52 | ;; ) | 51 | ;; ) |
| 53 | ;; webjump-sample-sites)) | 52 | ;; webjump-sample-sites)) |
| 54 | ;; | 53 | ;; |
| 55 | ;; The above loads this package, binds `C-c j' to invoke WebJump, and adds | 54 | ;; The above loads this package, binds `C-c j' to invoke WebJump, and adds your |
| 56 | ;; your personal favorite sites to the hotlist. | 55 | ;; personal favorite sites to the hotlist. |
| 57 | 56 | ||
| 58 | ;; The `webjump-sample-sites' constant mostly contains sites that are expected | 57 | ;; The `webjump-sample-sites' variable mostly contains some site entries that |
| 59 | ;; to be generally useful to Emacs users or that have some sort of query which | 58 | ;; are expected to be generally relevant to many users, but excluding |
| 60 | ;; can be coded in WebJump. There are two main goals of this sample site list: | 59 | ;; those that the GNU project would not want to recommend. |
| 61 | ;; (1) demonstrate WebJump capabilities and usage; (2) provide definitions for | ||
| 62 | ;; many popular sites so that people don't have to reinvent the wheel. A few | ||
| 63 | ;; assorted other sites have been thrown in on a whim. No commercial sites are | ||
| 64 | ;; included unless they provide a free, generally-useful service. Inclusion of | ||
| 65 | ;; a site does not represent an endorsement. Please contact the maintainer | ||
| 66 | ;; with change requests. | ||
| 67 | 60 | ||
| 68 | ;; The `browse-url' package is used to submit URLs to the browser, so any | 61 | ;; The `browse-url' package is used to submit URLs to the browser, so any |
| 69 | ;; browser-specific configuration should be done there. | 62 | ;; browser-specific configuration should be done there. |
| 70 | 63 | ||
| 71 | ;; WebJump inherits a small amount code from my `altavista.el' package, and is | ||
| 72 | ;; intended to obsolete that package. | ||
| 73 | |||
| 74 | ;;; Code: | 64 | ;;; Code: |
| 75 | 65 | ||
| 76 | ;;-------------------------------------------------------- Package Dependencies | 66 | ;;-------------------------------------------------------- Package Dependencies |
| @@ -80,92 +70,109 @@ | |||
| 80 | ;;------------------------------------------------------------------- Constants | 70 | ;;------------------------------------------------------------------- Constants |
| 81 | 71 | ||
| 82 | (defvar webjump-sample-sites | 72 | (defvar webjump-sample-sites |
| 83 | '(("AltaVista" . | 73 | '( |
| 74 | |||
| 75 | ;; FSF, not including Emacs-specific. | ||
| 76 | ("GNU Project FTP Archive" . | ||
| 77 | [mirrors "ftp://prep.ai.mit.edu/pub/gnu/" | ||
| 78 | ;; ASIA: | ||
| 79 | "ftp://ftp.cs.titech.ac.jp" | ||
| 80 | "ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep" | ||
| 81 | "ftp://cair-archive.kaist.ac.kr/pub/gnu" | ||
| 82 | "ftp://ftp.nectec.or.th/pub/mirrors/gnu" | ||
| 83 | ;; AUSTRALIA: | ||
| 84 | "ftp://archie.au/gnu" | ||
| 85 | "ftp://archie.oz/gnu" | ||
| 86 | "ftp://archie.oz.au/gnu" | ||
| 87 | ;; AFRICA: | ||
| 88 | "ftp://ftp.sun.ac.za/pub/gnu" | ||
| 89 | ;; MIDDLE-EAST: | ||
| 90 | "ftp://ftp.technion.ac.il/pub/unsupported/gnu" | ||
| 91 | ;; EUROPE: | ||
| 92 | "ftp://irisa.irisa.fr/pub/gnu" | ||
| 93 | "ftp://ftp.univ-lyon1.fr/pub/gnu" | ||
| 94 | "ftp://ftp.mcc.ac.uk" | ||
| 95 | "ftp://unix.hensa.ac.uk/mirrors/uunet/systems/gnu" | ||
| 96 | "ftp://src.doc.ic.ac.uk/gnu" | ||
| 97 | "ftp://ftp.ieunet.ie/pub/gnu" | ||
| 98 | "ftp://ftp.eunet.ch" | ||
| 99 | "ftp://nic.switch.ch/mirror/gnu" | ||
| 100 | "ftp://ftp.informatik.rwth-aachen.de/pub/gnu" | ||
| 101 | "ftp://ftp.informatik.tu-muenchen.de" | ||
| 102 | "ftp://ftp.win.tue.nl/pub/gnu" | ||
| 103 | "ftp://ftp.nl.net" | ||
| 104 | "ftp://ftp.etsimo.uniovi.es/pub/gnu" | ||
| 105 | "ftp://ftp.funet.fi/pub/gnu" | ||
| 106 | "ftp://ftp.denet.dk" | ||
| 107 | "ftp://ftp.stacken.kth.se" | ||
| 108 | "ftp://isy.liu.se" | ||
| 109 | "ftp://ftp.luth.se/pub/unix/gnu" | ||
| 110 | "ftp://ftp.sunet.se/pub/gnu" | ||
| 111 | "ftp://archive.eu.net" | ||
| 112 | ;; SOUTH AMERICA: | ||
| 113 | "ftp://ftp.inf.utfsm.cl/pub/gnu" | ||
| 114 | "ftp://ftp.unicamp.br/pub/gnu" | ||
| 115 | ;; WESTERN CANADA: | ||
| 116 | "ftp://ftp.cs.ubc.ca/mirror2/gnu" | ||
| 117 | ;; USA: | ||
| 118 | "ftp://wuarchive.wustl.edu/systems/gnu" | ||
| 119 | "ftp://labrea.stanford.edu" | ||
| 120 | "ftp://ftp.digex.net/pub/gnu" | ||
| 121 | "ftp://ftp.kpc.com/pub/mirror/gnu" | ||
| 122 | "ftp://f.ms.uky.edu/pub3/gnu" | ||
| 123 | "ftp://jaguar.utah.edu/gnustuff" | ||
| 124 | "ftp://ftp.hawaii.edu/mirrors/gnu" | ||
| 125 | "ftp://uiarchive.cso.uiuc.edu/pub/gnu" | ||
| 126 | "ftp://ftp.cs.columbia.edu/archives/gnu/prep" | ||
| 127 | "ftp://gatekeeper.dec.com/pub/GNU" | ||
| 128 | "ftp://ftp.uu.net/systems/gnu"]) | ||
| 129 | ("GNU Project Home Page" . "www.gnu.ai.mit.edu") | ||
| 130 | |||
| 131 | ;; Emacs. | ||
| 132 | ("Emacs Lisp Archive" . | ||
| 133 | "ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/") | ||
| 134 | |||
| 135 | ;; Internet search engines. | ||
| 136 | ("AltaVista" . | ||
| 84 | [simple-query | 137 | [simple-query |
| 85 | "www.altavista.digital.com" | 138 | "www.altavista.digital.com" |
| 86 | "www.altavista.digital.com/cgi-bin/query?pg=aq&what=web&fmt=.&q=" | 139 | "www.altavista.digital.com/cgi-bin/query?pg=aq&what=web&fmt=.&q=" |
| 87 | "&r=&d0=&d1="]) | 140 | "&r=&d0=&d1="]) |
| 88 | ("Archie" . | 141 | ("Archie" . |
| 89 | [simple-query "http://hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl" | 142 | [simple-query "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl" |
| 90 | "http://hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl?query=" ""]) | 143 | "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl?query=" ""]) |
| 91 | ("Bastard Operator from Hell" . "www.replay.com/bofh/") | ||
| 92 | ("Computer Professionals for Social Responsibility" . "www.cpsr.org/dox/") | ||
| 93 | ("Electronic Frontier Foundation" . "www.eff.org") | ||
| 94 | ("Emacs Lisp Archive" . | ||
| 95 | "ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/") | ||
| 96 | ("GNU Project" . "www.gnu.ai.mit.edu") | ||
| 97 | ("GNU FTP Archive". [mirrors | ||
| 98 | "ftp://prep.ai.mit.edu/pub/gnu/" | ||
| 99 | ;; ASIA: | ||
| 100 | "ftp://ftp.cs.titech.ac.jp" | ||
| 101 | "ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep" | ||
| 102 | "ftp://cair-archive.kaist.ac.kr/pub/gnu" | ||
| 103 | "ftp://ftp.nectec.or.th/pub/mirrors/gnu" | ||
| 104 | ;; AUSTRALIA: | ||
| 105 | "ftp://archie.au/gnu" | ||
| 106 | "ftp://archie.oz/gnu" | ||
| 107 | "ftp://archie.oz.au/gnu" | ||
| 108 | ;; AFRICA: | ||
| 109 | "ftp://ftp.sun.ac.za/pub/gnu" | ||
| 110 | ;; MIDDLE-EAST: | ||
| 111 | "ftp://ftp.technion.ac.il/pub/unsupported/gnu" | ||
| 112 | ;; EUROPE: | ||
| 113 | "ftp://irisa.irisa.fr/pub/gnu" | ||
| 114 | "ftp://ftp.univ-lyon1.fr/pub/gnu" | ||
| 115 | "ftp://ftp.mcc.ac.uk" | ||
| 116 | "ftp://unix.hensa.ac.uk/mirrors/uunet/systems/gnu" | ||
| 117 | "ftp://src.doc.ic.ac.uk/gnu" | ||
| 118 | "ftp://ftp.ieunet.ie/pub/gnu" | ||
| 119 | "ftp://ftp.eunet.ch" | ||
| 120 | "ftp://nic.switch.ch/mirror/gnu" | ||
| 121 | "ftp://ftp.informatik.rwth-aachen.de/pub/gnu" | ||
| 122 | "ftp://ftp.informatik.tu-muenchen.de" | ||
| 123 | "ftp://ftp.win.tue.nl/pub/gnu" | ||
| 124 | "ftp://ftp.nl.net" | ||
| 125 | "ftp://ftp.etsimo.uniovi.es/pub/gnu" | ||
| 126 | "ftp://ftp.funet.fi/pub/gnu" | ||
| 127 | "ftp://ftp.denet.dk" | ||
| 128 | "ftp://ftp.stacken.kth.se" | ||
| 129 | "ftp://isy.liu.se" | ||
| 130 | "ftp://ftp.luth.se/pub/unix/gnu" | ||
| 131 | "ftp://ftp.sunet.se/pub/gnu" | ||
| 132 | "ftp://archive.eu.net" | ||
| 133 | ;; SOUTH AMERICA: | ||
| 134 | "ftp://ftp.inf.utfsm.cl/pub/gnu" | ||
| 135 | "ftp://ftp.unicamp.br/pub/gnu" | ||
| 136 | ;; WESTERN CANADA: | ||
| 137 | "ftp://ftp.cs.ubc.ca/mirror2/gnu" | ||
| 138 | ;; USA: | ||
| 139 | "ftp://wuarchive.wustl.edu/systems/gnu" | ||
| 140 | "ftp://labrea.stanford.edu" | ||
| 141 | "ftp://ftp.digex.net/pub/gnu" | ||
| 142 | "ftp://ftp.kpc.com/pub/mirror/gnu" | ||
| 143 | "ftp://f.ms.uky.edu/pub3/gnu" | ||
| 144 | "ftp://jaguar.utah.edu/gnustuff" | ||
| 145 | "ftp://ftp.hawaii.edu/mirrors/gnu" | ||
| 146 | "ftp://uiarchive.cso.uiuc.edu/pub/gnu" | ||
| 147 | "ftp://ftp.cs.columbia.edu/archives/gnu/prep" | ||
| 148 | "ftp://gatekeeper.dec.com/pub/GNU" | ||
| 149 | "ftp://ftp.uu.net/systems/gnu" | ||
| 150 | ]) | ||
| 151 | ("Interactive Weather Information Network" . webjump-to-iwin) | ||
| 152 | ("Lycos" . | 144 | ("Lycos" . |
| 153 | [simple-query "www.lycos.com" "www.lycos.com/cgi-bin/pursuit?query=" ""]) | 145 | [simple-query "www.lycos.com" |
| 146 | "www.lycos.com/cgi-bin/pursuit?cat=lycos&query=" ""]) | ||
| 147 | ("Yahoo" . | ||
| 148 | [simple-query "www.yahoo.com" "search.yahoo.com/bin/search?p=" ""]) | ||
| 149 | |||
| 150 | ;; Misc. general interest. | ||
| 151 | ("Interactive Weather Information Network" . webjump-to-iwin) | ||
| 154 | ("Usenet FAQs" . | 152 | ("Usenet FAQs" . |
| 155 | [simple-query "www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html" | 153 | [simple-query "www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html" |
| 156 | "www.cis.ohio-state.edu/htbin/search-usenet-faqs/form?find=" | 154 | "www.cis.ohio-state.edu/htbin/search-usenet-faqs/form?find=" |
| 157 | ""]) | 155 | ""]) |
| 158 | ("Risks Digest" . webjump-to-risks) | ||
| 159 | ("RTFM Usenet FAQs by Group" . | 156 | ("RTFM Usenet FAQs by Group" . |
| 160 | "ftp://rtfm.mit.edu/pub/usenet-by-group/") | 157 | "ftp://rtfm.mit.edu/pub/usenet-by-group/") |
| 161 | ("RTFM Usenet FAQs by Hierachy" . | 158 | ("RTFM Usenet FAQs by Hierachy" . |
| 162 | "ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/") | 159 | "ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/") |
| 163 | ("X Consortium Archive". "ftp.x.org") | 160 | ("X Consortium Archive" . "ftp.x.org") |
| 164 | ("Yahoo" . | 161 | ("Yahoo: Reference" . "www.yahoo.com/Reference/") |
| 165 | [simple-query "www.yahoo.com" "search.yahoo.com/bin/search?p=" ""]) | 162 | |
| 166 | ("Yahoo Reference" "www.yahoo.com/Reference/") | 163 | ;; Computer social issues, privacy, professionalism. |
| 164 | ("Association for Computing Machinery" . "www.acm.org") | ||
| 165 | ("Computer Professionals for Social Responsibility" . "www.cpsr.org/dox/") | ||
| 166 | ("Electronic Frontier Foundation" . "www.eff.org") | ||
| 167 | ("IEEE Computer Society" . "www.computer.org") | ||
| 168 | ("Risks Digest" . webjump-to-risks) | ||
| 169 | |||
| 170 | ;; Fun. | ||
| 171 | ("Bastard Operator from Hell" . "www.replay.com/bofh/") | ||
| 172 | |||
| 167 | ) | 173 | ) |
| 168 | "Sample hotlist for WebJump.") | 174 | "Sample hotlist for WebJump. See the documentation for the `webjump' |
| 175 | function and the `webjump-sites' variable.") | ||
| 169 | 176 | ||
| 170 | (defvar webjump-state-to-postal-alist | 177 | (defvar webjump-state-to-postal-alist |
| 171 | '(("Alabama" . "al") ("Alaska" . "ak") ("Arizona" . "az") ("Arkansas" . "ar") | 178 | '(("Alabama" . "al") ("Alaska" . "ak") ("Arizona" . "az") ("Arkansas" . "ar") |
| @@ -263,9 +270,8 @@ submitting the URL.") | |||
| 263 | See the documentation for the `webjump-sites' variable for how to customize the | 270 | See the documentation for the `webjump-sites' variable for how to customize the |
| 264 | hotlist. | 271 | hotlist. |
| 265 | 272 | ||
| 266 | Feedback on WebJump can be sent to the author, Neil W. Van Dyke <nwv@acm.org>, | 273 | Please submit bug reports and other feedback to the author, Neil W. Van Dyke |
| 267 | or submitted via `\\[webjump-submit-bug-report]'. The latest version can be | 274 | <nwv@acm.org>." |
| 268 | gotten from `http://www.cs.brown.edu/people/nwv/'." | ||
| 269 | (interactive) | 275 | (interactive) |
| 270 | (let* ((completion-ignore-case t) | 276 | (let* ((completion-ignore-case t) |
| 271 | (item (assoc (completing-read "WebJump to site: " webjump-sites nil t) | 277 | (item (assoc (completing-read "WebJump to site: " webjump-sites nil t) |
| @@ -322,7 +328,7 @@ gotten from `http://www.cs.brown.edu/people/nwv/'." | |||
| 322 | (defun webjump-mirror-default (urls) | 328 | (defun webjump-mirror-default (urls) |
| 323 | ;; Note: This should be modified to apply some simple kludges/heuristics to | 329 | ;; Note: This should be modified to apply some simple kludges/heuristics to |
| 324 | ;; pick a site which is likely "close". As a tie-breaker among candidates | 330 | ;; pick a site which is likely "close". As a tie-breaker among candidates |
| 325 | ;; judged equally desirable, randomness should be used. | 331 | ;; judged equally desirable, randomness might be used. |
| 326 | (car urls)) | 332 | (car urls)) |
| 327 | 333 | ||
| 328 | (defun webjump-read-choice (name what choices &optional default) | 334 | (defun webjump-read-choice (name what choices &optional default) |