Initial Commit
[packages] / xemacs-packages / net-utils / webjump.el
1 ;;; webjump.el --- programmable Web hotlist
2      
3 ;; Copyright (C) 1996-1997 Free Software Foundation
4
5 ;; Author:    Neil W. Van Dyke <nwv@acm.org>
6 ;; Created:   09-Aug-1996
7 ;; Keywords:  comm www
8 ;; X-URL:     http://www.cs.brown.edu/people/nwv/
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
26
27 ;;; Change Log:
28
29 ;; [Version 1.5, 02-Jun-1997, nwv@acm.org] Prepared for first inclusion in GNU
30 ;; Emacs distribution by merging in RMS' minor changes and moving some sample
31 ;; Web site entries out.  Also updated Lycos and Yahoo sample entries.
32
33 ;; [Version 1.4, 17-Sep-1996, nwv@acm.org] Removed the evil "defconst-TEST"
34 ;; that slipped into 1.3.  Organized webjump-sample-sites and modified the
35 ;; content a bit.
36
37 ;; [Version 1.3, 30-Aug-1996, nwv@acm.org] Fixed broken `if' function in
38 ;; `webjump-to-javaapi' (bugfix already posted).  Added `webjump-to-iwin'.
39 ;; Added comment on purpose of `webjump-sample-sites'.  Added
40 ;; `webjump-read-choice'.
41
42 ;; [Version 1.2, 16-Aug-1996, nwv@acm.org] Oops, got Gamelan mixed up with
43 ;; Digital Espresso somehow.  Added `mirrors' builtin and used it for the
44 ;; sample GNU Archive site.  Added some other sample sites.  Split sample sites
45 ;; out into separate constant.  Misc. small changes.  Copyright has been
46 ;; transferred to the FSF.
47
48 ;; [Version 1.1, 10-Aug-1996, nwv@acm.org] Added missing call to
49 ;; `webjump-url-fix' (thanks to Istvan Marko <mi@bgytf.hu> for pointing this
50 ;; out).  Added ``builtins'' concept in order to support `simple-query' builtin
51 ;; for covering the majority of cases.  Added a couple more sample sites.
52
53 ;; [Version 1.0, 09-Aug-1996, nwv@acm.org] Wrote initial version and posted to
54 ;; gnu.emacs.sources.
55
56 ;;; Commentary:
57
58 ;; WebJump provides a sort of ``programmable hotlist'' of Web sites that can
59 ;; quickly be invoked in your Web browser.  Each Web site in the hotlist has a
60 ;; name, and you select the desired site name via a completing string prompt in
61 ;; the minibuffer.  The URL for each Web site is defined as a static string or
62 ;; a built-in or custom function, allowing interactive prompting for
63 ;; site-specific queries and options.
64
65 ;; Note that WebJump was originally intended to complement your conventional
66 ;; browser-based hotlist, not replace it.  (Though there's no reason you
67 ;; couldn't use WebJump for your entire hotlist if you were so inclined.)
68
69 ;; The `webjump-sites' variable, which defines the hotlist, defaults to some
70 ;; example sites.  You'll probably want to override it with your own favorite
71 ;; sites.  The documentation for the variable describes the syntax.
72
73 ;; You may wish to add something like the following to your `.emacs' file:
74 ;;
75 ;;   (require 'webjump)
76 ;;   (global-set-key "\C-cj" 'webjump)
77 ;;   (setq webjump-sites
78 ;;         (append '(
79 ;;                   ("My Home Page" . "www.someisp.net/users/joebobjr/")
80 ;;                   ("Pop's Site"   . "www.joebob-and-son.com/")
81 ;;                   )
82 ;;                 webjump-sample-sites))
83 ;;
84 ;; The above loads this package, binds `C-c j' to invoke WebJump, and adds your
85 ;; personal favorite sites to the hotlist.
86
87 ;; The `webjump-sample-sites' variable mostly contains some site entries that
88 ;; are expected to be generally relevant to most Emacs users.  Some additional
89 ;; site entries are defined in the separate and more frequently updated
90 ;; `webjump-plus' package, which is available from the author's Web site.
91
92 ;; The `browse-url' package is used to submit URLs to the browser, so any
93 ;; browser-specific configuration should be done there.
94
95 ;; WebJump inherits a small amount code from my `altavista.el' package, and is
96 ;; intended to obsolete that package.
97
98 ;;; Code:
99
100 ;;-------------------------------------------------------- Package Dependencies
101
102 (require 'browse-url)
103
104 ;;------------------------------------------------------------------- Constants
105