annotate lisp/net/webjump.el @ 104379:46cbb492149b

(vc-git-annotate-command): Run asynchronously. Explicitly pass the date format to git blame so that user local so that the output format can be parsed.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 21 Aug 2009 03:37:33 +0000
parents a9dc0e7c3f2b
children 1d1d5d9bd884
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1 ;;; webjump.el --- programmable Web hotlist
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41948
diff changeset
2
74509
f7702c5f335d Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68648
diff changeset
3 ;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004,
100908
a9dc0e7c3f2b Add 2009 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 94677
diff changeset
4 ;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 ;; Author: Neil W. Van Dyke <nwv@acm.org>
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7 ;; Created: 09-Aug-1996
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8 ;; Keywords: comm www
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11
94677
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
94677
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
14 ;; the Free Software Foundation, either version 3 of the License, or
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
15 ;; (at your option) any later version.
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
21
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
94677
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
24
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
26
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27 ;; WebJump provides a sort of ``programmable hotlist'' of Web sites that can
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28 ;; quickly be invoked in your Web browser. Each Web site in the hotlist has a
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29 ;; name, and you select the desired site name via a completing string prompt in
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 ;; the minibuffer. The URL for each Web site is defined as a static string or
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 ;; a built-in or custom function, allowing interactive prompting for
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 ;; site-specific queries and options.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 ;; Note that WebJump was originally intended to complement your conventional
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35 ;; browser-based hotlist, not replace it. (Though there's no reason you
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 ;; couldn't use WebJump for your entire hotlist if you were so inclined.)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 ;; The `webjump-sites' variable, which defines the hotlist, defaults to some
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39 ;; example sites. You'll probably want to override it with your own favorite
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40 ;; sites. The documentation for the variable describes the syntax.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 ;; You may wish to add something like the following to your `.emacs' file:
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 ;;
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 ;; (require 'webjump)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 ;; (global-set-key "\C-cj" 'webjump)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 ;; (setq webjump-sites
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
47 ;; (append '(
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
48 ;; ("My Home Page" . "www.someisp.net/users/joebobjr/")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49 ;; ("Pop's Site" . "www.joebob-and-son.com/")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
50 ;; )
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
51 ;; webjump-sample-sites))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
52 ;;
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
53 ;; The above loads this package, binds `C-c j' to invoke WebJump, and adds your
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
54 ;; personal favorite sites to the hotlist.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
55
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
56 ;; The `webjump-sample-sites' variable mostly contains some site entries that
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
57 ;; are expected to be generally relevant to many users, but excluding
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
58 ;; those that the GNU project would not want to recommend.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
59
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
60 ;; The `browse-url' package is used to submit URLs to the browser, so any
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
61 ;; browser-specific configuration should be done there.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
62
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
63 ;;; Code:
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
64
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
65 ;;-------------------------------------------------------- Package Dependencies
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
66
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
67 (require 'browse-url)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
68
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
69 ;;------------------------------------------------------------------- Constants
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
70
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71 (defvar webjump-sample-sites
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72 '(
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73 ;; FSF, not including Emacs-specific.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 ("GNU Project FTP Archive" .
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
75 ;; GNU FTP Mirror List from http://www.gnu.org/order/ftp.html
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 [mirrors "ftp://ftp.gnu.org/pub/gnu/"
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
77 ;; United States
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
78 "ftp://mirrors.kernel.org/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
79 "ftp://gatekeeper.dec.com/pub/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
80 "ftp://ftp.keystealth.org/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
81 "ftp://mirrors.usc.edu/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
82 "ftp://cudlug.cudenver.edu/pub/mirrors/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
83 "ftp://ftp.cise.ufl.edu/pub/mirrors/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
84 "ftp://uiarchive.cso.uiuc.edu/pub/ftp/ftp.gnu.org/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
85 "ftp://gnu.cs.lewisu.edu/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
86 "ftp://ftp.in-span.net/pub/mirrors/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
87 "ftp://gnu.ms.uky.edu/pub/mirrors/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
88 "ftp://ftp.algx.net/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
89 "ftp://aeneas.mit.edu/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
90 "ftp://ftp.egr.msu.edu/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
91 "ftp://ftp.wayne.edu/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
92 "ftp://wuarchive.wustl.edu/mirrors/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
93 "ftp://gnu.teleglobe.net/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
94 "ftp://ftp.cs.columbia.edu/archives/gnu/prep/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
95 "ftp://ftp.ece.cornell.edu/pub/mirrors/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
96 "ftp://ftp.ibiblio.org/pub/mirrors/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
97 "ftp://ftp.cis.ohio-state.edu/mirror/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
98 "ftp://ftp.club.cc.cmu.edu/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
99 "ftp://ftp.sunsite.utk.edu/pub/gnu/ftp/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
100 "ftp://thales.memphis.edu/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
101 "ftp://gnu.wwc.edu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
102 "ftp://ftp.twtelecom.net/pub/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
103 ;; Africa
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
104 "ftp://ftp.sun.ac.za/mirrorsites/ftp.gnu.org"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
105 ;; The Americas
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
106 "ftp://ftp.unicamp.br/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
107 "ftp://master.softaplic.com.br/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
108 "ftp://ftp.matrix.com.br/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
109 "ftp://ftp.pucpr.br/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
110 "ftp://ftp.linorg.usp.br/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
111 "ftp://ftp.cs.ubc.ca/mirror2/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
112 "ftp://cs.ubishops.ca/pub/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
113 "ftp://ftp.inf.utfsm.cl/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
114 "ftp://sunsite.ulatina.ac.cr/Mirrors/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
115 "ftp://www.gnu.unam.mx/pub/gnu/software/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
116 "ftp://gnu.cem.itesm.mx/pub/mirrors/gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
117 "ftp://ftp.azc.uam.mx/mirrors/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
118 ;; Australia
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
119 "ftp://mirror.aarnet.edu.au/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
120 "ftp://gnu.mirror.pacific.net.au/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
121 ;; Asia
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
122 "ftp://ftp.cs.cuhk.edu.hk/pub/gnu/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
123 "ftp://sunsite.ust.hk/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
124 "ftp://ftp.gnupilgrims.org/pub/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
125 "ftp://www.imtech.res.in/mirror/gnuftp/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
126 "ftp://kambing.vlsm.org/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
127 "ftp://ftp.cs.huji.ac.il/mirror/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
128 "ftp://tron.um.u-tokyo.ac.jp/pub/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
129 "ftp://core.ring.gr.jp/pub/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
130 "ftp://ftp.ring.gr.jp/pub/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
131 "ftp://mirrors.hbi.co.jp/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
132 "ftp://ftp.cs.titech.ac.jp/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
133 "ftp://ftpmirror.hanyang.ac.kr/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
134 "ftp://ftp.linux.sarang.net/mirror/gnu/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
135 "ftp://ftp.xgate.co.kr/pub/mirror/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
136 "ftp://ftp://gnu.xinicks.com/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
137 "ftp://ftp.isu.net.sa/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
138 "ftp://ftp.nctu.edu.tw/UNIX/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
139 "ftp://coda.nctu.edu.tw/UNIX/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
140 "ftp://ftp1.sinica.edu.tw/pub3/GNU/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
141 "ftp://gnu.cdpa.nsysu.edu.tw/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
142 "ftp://ftp.nectec.or.th/pub/mirrors/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
143 ;; Europe
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
144 "ftp://ftp.gnu.vbs.at/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
145 "ftp://ftp.univie.ac.at/packages/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
146 "ftp://gd.tuwien.ac.at/gnu/gnusrc/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
147 "ftp://ftp.belnet.be/mirror/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
148 "ftp://gnu.blic.net/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
149 "ftp://ftp.fi.muni.cz/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
150 "ftp://ftp.dkuug.dk/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
151 "ftp://sunsite.dk/mirrors/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
152 "ftp://ftp.funet.fi/pub/gnu/prep/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
153 "ftp://ftp.irisa.fr/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
154 "ftp://ftp.cs.univ-paris8.fr/mirrors/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
155 "ftp://ftp.cs.tu-berlin.de/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
156 "ftp://ftp.leo.org/pub/comp/os/unix/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
157 "ftp://ftp.informatik.rwth-aachen.de/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
158 "ftp://ftp.de.uu.net/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
159 "ftp://ftp.freenet.de/pub/ftp.gnu.org/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
160 "ftp://ftp.cs.uni-bonn.de/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
161 "ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
162 "ftp://ftp.stw-bonn.de/pub/mirror/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
163 "ftp://ftp.math.uni-bremen.de/pub/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
164 "ftp://ftp.forthnet.gr/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
165 "ftp://ftp.ntua.gr/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
166 "ftp://ftp.duth.gr/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
167 "ftp://ftp.physics.auth.gr/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
168 "ftp://ftp.esat.net/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
169 "ftp://ftp.heanet.ie/mirrors/ftp.gnu.org"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
170 "ftp://ftp.lugroma2.org/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
171 "ftp://ftp.gnu.inetcosmos.org/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
172 "ftp://ftp.digitaltrust.it/pub/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
173 "ftp://ftp://rm.mirror.garr.it/mirrors/gnuftp"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
174 "ftp://ftp.nluug.nl/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
175 "ftp://ftp.mirror.nl/pub/mirror/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
176 "ftp://ftp.nl.uu.net/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
177 "ftp://mirror.widexs.nl/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
178 "ftp://ftp.easynet.nl/mirror/GNU/"
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
179 "ftp://ftp.win.tue.nl/pub/gnu"
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
180 "ftp://gnu.mirror.vuurwerk.net/pub/GNU/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
181 "ftp://gnu.kookel.org/pub/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
182 "ftp://ftp.uninett.no/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
183 "ftp://ftp.task.gda.pl/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
184 "ftp://sunsite.icm.edu.pl/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
185 "ftp://ftp.man.poznan.pl/pub/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
186 "ftp://ftp.ist.utl.pt/pub/GNU/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
187 "ftp://ftp.telepac.pt/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
188 "ftp://ftp.timisoara.roedu.net/mirrors/ftp.gnu.org/pub/gnu"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
189 "ftp://ftp.chg.ru/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
190 "ftp://gnuftp.axitel.ru/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
191 "ftp://ftp.arnes.si/software/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
192 "ftp://ftp.etsimo.uniovi.es/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
193 "ftp://ftp.rediris.es/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
194 "ftp://ftp.chl.chalmers.se/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
195 "ftp://ftp.isy.liu.se/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
196 "ftp://ftp.luth.se/pub/unix/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
197 "ftp://ftp.stacken.kth.se/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
198 "ftp://ftp.sunet.se/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
199 "ftp://sunsite.cnlab-switch.ch/mirror/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
200 "ftp://ftp.ulak.net.tr/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
201 "ftp://ftp.gnu.org.ua"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
202 "ftp://ftp.mcc.ac.uk/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
203 "ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
204 "ftp://ftp.warwick.ac.uk/pub/gnu/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
205 "ftp://ftp.hands.com/ftp.gnu.org/"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
206 "ftp://gnu.teleglobe.net/ftp.gnu.org/"])
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
207 ("GNU Project Home Page" . "www.gnu.org")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
208
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
209 ;; Emacs.
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
210 ("Emacs Home Page" .
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
211 "www.gnu.org/software/emacs/emacs.html")
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
212 ("Savannah Emacs page" .
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
213 "savannah.gnu.org/projects/emacs")
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
214 ("Emacs Lisp List" .
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
215 "www.damtp.cam.ac.uk/user/eglen/emacs/ell.html")
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
216 ("Emacs Wiki" .
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
217 [simple-query "www.emacswiki.org"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
218 "www.emacswiki.org/cgi-bin/wiki/" ""])
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
219
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
220 ;; Internet search engines.
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
221 ("Google" .
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
222 [simple-query "www.google.com"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
223 "www.google.com/search?q=" ""])
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
224 ("Google Groups" .
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
225 [simple-query "groups.google.com"
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
226 "groups.google.com/groups?q=" ""])
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41948
diff changeset
227 ("Yahoo" .
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
228 [simple-query "www.yahoo.com" "search.yahoo.com/search?p=" ""])
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
229 ("Yahoo: Reference" . "www.yahoo.com/Reference/")
77892
5e72d285d2fe (webjump-sample-sites): Add Wikipedia query.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
230 ("Wikipedia" .
5e72d285d2fe (webjump-sample-sites): Add Wikipedia query.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
231 [simple-query "wikipedia.org" "wikipedia.org/wiki/" ""])
5e72d285d2fe (webjump-sample-sites): Add Wikipedia query.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
232
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
233 ;; Misc. general interest.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
234 ("Interactive Weather Information Network" . webjump-to-iwin)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41948
diff changeset
235 ("Usenet FAQs" .
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
236 "www.faqs.org/faqs/")
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
237 ("RTFM Usenet FAQs by Group" .
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
238 "ftp://rtfm.mit.edu/pub/usenet-by-group/")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
239 ("RTFM Usenet FAQs by Hierachy" .
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
240 "ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
241 ("X Consortium Archive" . "ftp.x.org")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
242
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
243 ;; Computer social issues, privacy, professionalism.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
244 ("Association for Computing Machinery" . "www.acm.org")
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
245 ("Computer Professionals for Social Responsibility" . "www.cpsr.org")
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
246 ("Electronic Frontier Foundation" . "www.eff.org")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
247 ("IEEE Computer Society" . "www.computer.org")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
248 ("Risks Digest" . webjump-to-risks)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
249
67915
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
250 ;; More.
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
251 ("Supplemental Web site list for webjump" .
13c47acdfe5c (webjump-sample-sites): Update URLs.
Juri Linkov <juri@jurta.org>
parents: 64701
diff changeset
252 "www.neilvandyke.org/webjump/")
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
253
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
254 )
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
255 "Sample hotlist for WebJump. See the documentation for the `webjump'
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
256 function and the `webjump-sites' variable.")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
257
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
258 (defvar webjump-state-to-postal-alist
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
259 '(("Alabama" . "al") ("Alaska" . "ak") ("Arizona" . "az") ("Arkansas" . "ar")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
260 ("California" . "ca") ("Colorado" . "co") ("Connecticut" . "ct")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
261 ("Delaware" . "de") ("Florida" . "fl") ("Georgia" . "ga") ("Hawaii" . "hi")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
262 ("Idaho" . "id") ("Illinois" . "il") ("Indiana" . "in") ("Iowa" . "ia")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
263 ("Kansas" . "ks") ("Kentucky" . "ky") ("Louisiana" . "la") ("Maine" . "me")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
264 ("Maryland" . "md") ("Massachusetts" . "ma") ("Michigan" . "mi")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
265 ("Minnesota" . "mn") ("Mississippi" . "ms") ("Missouri" . "mo")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
266 ("Montana" . "mt") ("Nebraska" . "ne") ("Nevada" . "nv")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
267 ("New Hampshire" . "nh") ("New Jersey" . "nj") ("New Mexico" . "nm")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
268 ("New York" . "ny") ("North Carolina" . "nc") ("North Dakota" . "nd")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
269 ("Ohio" . "oh") ("Oklahoma" . "ok") ("Oregon" . "or")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
270 ("Pennsylvania" . "pa") ("Rhode Island" . "ri") ("South Carolina" . "sc")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
271 ("South Dakota" . "sd") ("Tennessee" . "tn") ("Texas" . "tx")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
272 ("Utah" . "ut") ("Vermont" . "vt") ("Virginia" . "va")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
273 ("Washington" . "wa") ("West Virginia" . "wv") ("Wisconsin" . "wi")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
274 ("Wyoming" . "wy")))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
275
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
276 ;;------------------------------------------------------------ Option Variables
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
277
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
278 (defvar webjump-sites
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
279 webjump-sample-sites
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
280 "*Hotlist for WebJump.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
281
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
282 The hotlist is represented as an association list, with the CAR of each cell
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
283 being the name of the Web site, and the CDR being the definition for the URL of
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
284 that site. The URL definition can be a string (the URL), a vector (specifying
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
285 a special \"builtin\" which returns a URL), a symbol (name of a function which
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
286 returns a URL), or a list (which when `eval'ed yields a URL).
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
287
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
288 If the URL definition is a vector, then a \"builtin\" is used. A builtin has a
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
289 Lisp-like syntax, with the name as the first element of the vector, and any
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
290 arguments as the following elements. The three current builtins are `name',
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
291 which returns the name of the site as the URL, `simple-query', which
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
292 returns a URL that is a function of a query entered by the user, and `mirrors',
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
293 which allows the user to select from among multiple mirror sites for the same
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
294 content.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
295
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
296 The first argument to the `simple-query' builtin is a static URL to use if the
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
297 user enters a blank query. The second and third arguments are the prefix and
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
298 suffix, respectively, to add to the encoded query the user enters. This
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
299 builtin covers Web sites that have single-string searches with the query
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
300 embedded in the URL.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
301
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
302 The arguments to the `mirrors' builtin are URLs of mirror sites.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
303
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
304 If the symbol of a function is given, then the function will be called with the
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
305 Web site name (the one you specified in the CAR of the alist cell) as a
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
306 parameter. This might come in handy for various kludges.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
307
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
308 For convenience, if the `http://', `ftp://', or `file://' prefix is missing
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
309 from a URL, WebJump will make a guess at what you wanted and prepend it before
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
310 submitting the URL.")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
311
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
312 ;;------------------------------------------------------- Sample Site Functions
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
313
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
314 (defun webjump-to-iwin (name)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
315 (let ((prefix "http://iwin.nws.noaa.gov/")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
316 (state (webjump-read-choice name "state"
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
317 (append '(("Puerto Rico" . "pr"))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
318 webjump-state-to-postal-alist))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
319 (if state
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
320 (concat prefix "iwin/" state "/"
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
321 (webjump-read-choice name "option"
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
322 '(("Hourly Report" . "hourly")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
323 ("State Forecast" . "state")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
324 ("Local Forecast" . "local")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
325 ("Zone Forecast" . "zone")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
326 ("Short-Term Forecast" . "shortterm")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
327 ("Weather Summary" . "summary")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
328 ("Public Information" . "public")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
329 ("Climatic Data" . "climate")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
330 ("Aviation Products" . "aviation")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
331 ("Hydro Products" . "hydro")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
332 ("Special Weather" . "special")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
333 ("Watches and Warnings" . "warnings"))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
334 "zone")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
335 ".html")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
336 prefix)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
337
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
338 (defun webjump-to-risks (name)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
339 (let (issue volume)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
340 (if (and (setq volume (webjump-read-number (concat name " volume")))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
341 (setq issue (webjump-read-number (concat name " issue"))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
342 (format "catless.ncl.ac.uk/Risks/%d.%02d.html" volume issue)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
343 "catless.ncl.ac.uk/Risks/")))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
344
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
345 ;;-------------------------------------------------------------- Core Functions
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
346
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
347 ;;;###autoload
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
348 (defun webjump ()
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
349 "Jumps to a Web site from a programmable hotlist.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
350
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
351 See the documentation for the `webjump-sites' variable for how to customize the
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
352 hotlist.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
353
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
354 Please submit bug reports and other feedback to the author, Neil W. Van Dyke
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
355 <nwv@acm.org>."
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
356 (interactive)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
357 (let* ((completion-ignore-case t)
62122
96701ef6c56d (webjump): Replace `assoc-ignore-case' by `assoc-string'.
Juanma Barranquero <lekktu@gmail.com>
parents: 53857
diff changeset
358 (item (assoc-string
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
359 (completing-read "WebJump to site: " webjump-sites nil t)
62122
96701ef6c56d (webjump): Replace `assoc-ignore-case' by `assoc-string'.
Juanma Barranquero <lekktu@gmail.com>
parents: 53857
diff changeset
360 webjump-sites t))
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
361 (name (car item))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
362 (expr (cdr item)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
363 (browse-url (webjump-url-fix
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
364 (cond ((not expr) "")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
365 ((stringp expr) expr)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
366 ((vectorp expr) (webjump-builtin expr name))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
367 ((listp expr) (eval expr))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
368 ((symbolp expr)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
369 (if (fboundp expr)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
370 (funcall expr name)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41948
diff changeset
371 (error "WebJump URL function \"%s\" undefined"
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
372 expr)))
38436
b174db545cfd Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 28210
diff changeset
373 (t (error "WebJump URL expression for \"%s\" invalid"
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
374 name)))))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
375
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
376 (defun webjump-builtin (expr name)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
377 (if (< (length expr) 1)
38436
b174db545cfd Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 28210
diff changeset
378 (error "WebJump URL builtin for \"%s\" empty" name))
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
379 (let ((builtin (aref expr 0)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
380 (cond
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
381 ((eq builtin 'mirrors)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
382 (if (= (length expr) 1)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
383 (error
53857
4fdf85312c1c (webjump-builtin): Add missing format string
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
384 "WebJump URL builtin \"mirrors\" for \"%s\" needs at least 1 arg"
4fdf85312c1c (webjump-builtin): Add missing format string
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
385 name))
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
386 (webjump-choose-mirror name (cdr (append expr nil))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
387 ((eq builtin 'name)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
388 name)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
389 ((eq builtin 'simple-query)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
390 (webjump-builtin-check-args expr name 3)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
391 (webjump-do-simple-query name (aref expr 1) (aref expr 2) (aref expr 3)))
38436
b174db545cfd Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 28210
diff changeset
392 (t (error "WebJump URL builtin \"%s\" for \"%s\" invalid"
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
393 builtin name)))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
394
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
395 (defun webjump-builtin-check-args (expr name count)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
396 (or (= (length expr) (1+ count))
38436
b174db545cfd Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 28210
diff changeset
397 (error "WebJump URL builtin \"%s\" for \"%s\" needs %d args"
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
398 (aref expr 0) name count)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
399
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
400 (defun webjump-choose-mirror (name urls)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
401 (webjump-read-url-choice (concat name " mirror")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
402 urls
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
403 (webjump-mirror-default urls)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
404
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
405 (defun webjump-do-simple-query (name noquery-url query-prefix query-suffix)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
406 (let ((query (webjump-read-string (concat name " query"))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
407 (if query
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
408 (concat query-prefix (webjump-url-encode query) query-suffix)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
409 noquery-url)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
410
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
411 (defun webjump-mirror-default (urls)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
412 ;; Note: This should be modified to apply some simple kludges/heuristics to
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
413 ;; pick a site which is likely "close". As a tie-breaker among candidates
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
414 ;; judged equally desirable, randomness might be used.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
415 (car urls))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
416
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
417 (defun webjump-read-choice (name what choices &optional default)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
418 (let* ((completion-ignore-case t)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
419 (choice (completing-read (concat name " " what ": ") choices nil t)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
420 (if (webjump-null-or-blank-string-p choice)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
421 default
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
422 (cdr (assoc choice choices)))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
423
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
424 (defun webjump-read-number (prompt)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
425 ;; Note: I should make this more robust someday.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
426 (let ((input (webjump-read-string prompt)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
427 (if input (string-to-number input))))
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41948
diff changeset
428
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
429 (defun webjump-read-string (prompt)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
430 (let ((input (read-string (concat prompt ": "))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
431 (if (webjump-null-or-blank-string-p input) nil input)))
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41948
diff changeset
432
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
433 (defun webjump-read-url-choice (what urls &optional default)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
434 ;; Note: Convert this to use `webjump-read-choice' someday.
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
435 (let* ((completions (mapcar (function (lambda (n) (cons n n)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
436 urls))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
437 (input (completing-read (concat what
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
438 ;;(if default " (RET for default)" "")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
439 ": ")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
440 completions
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
441 nil
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
442 t)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
443 (if (webjump-null-or-blank-string-p input)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
444 default
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
445 (car (assoc input completions)))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
446
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
447 (defun webjump-null-or-blank-string-p (str)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
448 (or (null str) (string-match "^[ \t]*$" str)))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
449
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
450 (defun webjump-url-encode (str)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
451 (mapconcat '(lambda (c)
82100
a26a0d557a69 (webjump-url-encode): Fix for non-ASCII characters.
Kenichi Handa <handa@m17n.org>
parents: 81084
diff changeset
452 (let ((s (char-to-string c)))
a26a0d557a69 (webjump-url-encode): Fix for non-ASCII characters.
Kenichi Handa <handa@m17n.org>
parents: 81084
diff changeset
453 (cond ((string= s " ") "+")
a26a0d557a69 (webjump-url-encode): Fix for non-ASCII characters.
Kenichi Handa <handa@m17n.org>
parents: 81084
diff changeset
454 ((string-match "[a-zA-Z_.-/]" s) s)
a26a0d557a69 (webjump-url-encode): Fix for non-ASCII characters.
Kenichi Handa <handa@m17n.org>
parents: 81084
diff changeset
455 (t (upcase (format "%%%02x" c))))))
a26a0d557a69 (webjump-url-encode): Fix for non-ASCII characters.
Kenichi Handa <handa@m17n.org>
parents: 81084
diff changeset
456 (encode-coding-string str 'utf-8)
a26a0d557a69 (webjump-url-encode): Fix for non-ASCII characters.
Kenichi Handa <handa@m17n.org>
parents: 81084
diff changeset
457 ""))
28210
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
458
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
459 (defun webjump-url-fix (url)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
460 (if (webjump-null-or-blank-string-p url)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
461 ""
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
462 (webjump-url-fix-trailing-slash
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
463 (cond
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
464 ((string-match "^[a-zA-Z]+:" url) url)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
465 ((string-match "^/" url) (concat "file://" url))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
466 ((string-match "^\\([^\\./]+\\)" url)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
467 (concat (if (string= (downcase (match-string 1 url)) "ftp")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
468 "ftp"
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
469 "http")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
470 "://"
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
471 url))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
472 (t url)))))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
473
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
474 (defun webjump-url-fix-trailing-slash (url)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
475 (if (string-match "^[a-zA-Z]+://[^/]+$" url)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
476 (concat url "/")
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
477 url))
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
478
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
479 ;;-----------------------------------------------------------------------------
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
480
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
481 (provide 'webjump)
b56f9152e329 Moved here from lisp.
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
482
93975
1e3a407766b9 Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 87649
diff changeset
483 ;; arch-tag: f1d20156-0a6f-488b-bd91-f69ee8b6d5cc
38436
b174db545cfd Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 28210
diff changeset
484 ;;; webjump.el ends here