Phil Sung writes:
Presumably if we had a dedicated wiki for this, we could require
that
contributions be tri-licensed (just as Wikipedia requires that
contributions be GFDL'd). But the FSF would still want copyright
assignments in either case if it were going to ship a wiki version, so
I think using Wikimedia is just fine now.
[Note: Since Phil posted this, he has indicated in private mail that
he wishes to restrict redistribution to the GPL and GFDL terms.]
I have created an XEmacs package, but was unable to "cvs add" the
directory, not having sufficient permission. Norbert, do you know
what's going on here? Can you help with this or tell me how to do it?
A packagized tarball is available at
http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/guided-tour/
The sources (for Norbert if he needs it, others probably want to wait
for CVS), package-index, and Windows setup-packages.ini are also
available there.
Phil, I attach the ChangeLog and the infrastructure Lisp for making
the Guided Tour available in the Help menu. Please check the
following points:
1. Use of your name. Tastes differ, and you may want more or less
credits. I wish to respect your tastes. :-)
2. Check the comments about permissions in the ChangeLog. If you
have qualms about it, let me know.
3. Check the permissions notice in the function `guided-tour-about'
in the Lisp. (It's the last thing in this message.) Let me know
if that expresses your intent.
I gather from looking at your site that the "Guided Tour" per se is an
HTML document; this package includes the slides from your lectures. I
plan to update, so comments would be appreciated.
You can install the package under GNU Emacs, but the auto-menu
installation and auto-location of data probably won't work. I'd be
curious if the rest works, but you may need to do some banging. Note
that I do have an assignment for XEmacs on file, so you can submit
code based on this code to GNU Emacs (after checking with rms) without
any legal problems that I know of.
XEmacs developers: This package sort of violates the convention about
auto-autoloading doing nothing, since it "insinuates" the menu. That
seems harmless to me, though.
Lightly tested.
;;; guided-tour.el --- functions for viewing Phil Sung's Emacs Guided Tour
;; Copyright 2007 Free Software Foundation, Inc.
;; Author: Stephen J. Turnbull <stephen(a)xemacs.org>
;; Maintainer: XEmacs Development Team
;; Created: 2007-05-02
;; Keywords: doc
;; The permissions notice is contained in the function
;; `guided-tour-about' at the end of this file. Under the terms
;; granted, you may modify that function, but the appropriate
;; permissions notice must remain in this file somewhere.
;;; Synched up with: Not in FSF.
;;; Commentary:
;; Thanks to Jason Spiro and Phil Sung for making substantial effort
;; to make this content as useful to XEmacs as possible.
;;; Code:
;; Variables
(defgroup guided-tour nil "Phil Sung's Emacs Guided Tour")
(defcustom guided-tour-odp-viewer "ooimpress"
"Path to program able to view Open Document Format presentations.
Program is invoked in a shell, so PATH is searched."
:type '(choice string
(const "ooimpress")
(const "open" :doc "Useful on Mac OS X"))
:group 'guided-tour)
(defcustom guided-tour-pdf-viewer "xpdf"
"Path to program able to view Portable Document Format documents.
Program is invoked in a shell, so PATH is searched."
:type '(choice string
(const "xpdf")
(const "gv")
(const "open" :doc "Useful on Mac OS X"))
:group 'guided-tour)
(defconst guided-tour-submenu
'("A Guided Tour of Emacs"
["Guided Tour, Part %_1 (OOo)" guided-tour-odp-1]
["Guided Tour, Part %_2 (OOo)" guided-tour-odp-2]
["Guided Tour, Part %_3 (OOo)" guided-tour-odp-3]
["Guided Tour, Part %_1 (PDF)" guided-tour-pdf-1]
["Guided Tour, Part %_2 (PDF)" guided-tour-pdf-2]
["Guided Tour, Part %_3 (PDF)" guided-tour-pdf-3]
["About COPYING the Tour" guided-tour-about])
"The submenu for Phil Sung's \"Guided Tour of Emacs\".")
(defvar guided-tour-insinuate-menubar nil
"If non-nil, inhibits insinuation of the menubar.
Note that if you make this nil and reinsinuate, you are responsible for
removing any existing instances of the submenu.")
;; Functions
;; Helper functions
;; #### this probably should move to help.el or menubar-items.el
(defun guided-tour-find-menubar-help-menu (&optional menubar)
"Return the Help submenu for MENUBAR if present, else nil."
(assoc "%_Help" (or menubar default-menubar)))
(defun guided-tour-about-xemacs-index (menu)
"Return the (zero-based) index of the About XEmacs item in MENU.
Returns nil if not present."
;; #### Of course we should actually search for it....
;; Does easy-menu provide functions for this? It should....
(let ((item (cadr menu)))
(if (and (vectorp item) (eq 'about-xemacs (aref item 1)))
0
nil)))
;; Initialization
;;;###autoload
(defun guided-tour-insinuate-menubar ()
"Add Phil Sung's Guided Tour of Emacs to the default menubar."
(unless guided-tour-insinuate-menubar
(setq guided-tour-insinuate-menubar t)
(let* ((help (guided-tour-find-menubar-help-menu)))
(setcdr help (nconc (if (eq 0 (guided-tour-about-xemacs-index help))
(list (cadr help) guided-tour-submenu)
(list guided-tour-submenu (cadr help)))
(cddr help))))))
;; Is this OK? Don't see how it really hurts.
;;;###autoload
(guided-tour-insinuate-menubar)
;; The Guided Tour
(defun guided-tour (type part)
"Start the Guided Tour with TYPE viewer, in Part PART."
(interactive "sWhich format? \nnWhich part? ")
(let ((viewer (symbol-value (intern (concat "guided-tour-" type
"-viewer"))))
(file (format "emacs-slides-%d.%s" part type)))
(message "\
`M-x guided-tour-about RET' for FAQ and licensing.")
(shell-command (format "%s %s" viewer (or (locate-data-file file) file)))))
(defun guided-tour-odp-1 ()
"Start up the Guided Tour of Emacs, part 1, as an Open Office presentation."
(interactive)
(guided-tour "odp" 1))
(defun guided-tour-odp-2 ()
"Start up the Guided Tour of Emacs, part 2, as an Open Office presentation."
(interactive)
(guided-tour "odp" 2))
(defun guided-tour-odp-3 ()
"Start up the Guided Tour of Emacs, part 3, as an Open Office presentation."
(interactive)
(guided-tour "odp" 3))
(defun guided-tour-pdf-1 ()
"Start up the Guided Tour of Emacs, part 1, in a PDF viewer."
(interactive)
(guided-tour "pdf" 1))
(defun guided-tour-pdf-2 ()
"Start up the Guided Tour of Emacs, part 2, in a PDF viewer."
(interactive)
(guided-tour "pdf" 2))
(defun guided-tour-pdf-3 ()
"Start up the Guided Tour of Emacs, part 3, in a PDF viewer."
(interactive)
(guided-tour "pdf" 3))
(defun guided-tour-about ()
"Document the Guided Tour."
(interactive)
(with-displaying-temp-buffer "*About the Guided Tour of Emacs*"
(princ "\
A Guided Tour of Emacs
Phil Sung
This is the XEmacs package of the Guided Tour of Emacs.
The slides are by Phil Sung. That's the important part. Send kudos to Phil.
The XEmacs package is by Stephen Turnbull. Direct complaints about packaging
to Steve via the XEmacs Developers mailing list <xemacs-beta(a)xemacs.org>.
The FAQ follows the permissions notice.
Copyright 2007 The Free Software Foundation Inc.
The Guided Tour, is both free software and free content.
You can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version published by
the Free Software Foundation.
You can redistribute it and/or modify it under the terms of GNU Free
Documentation License; either version 1.2, or (at your option) any
later version published by the Free Software Foundation.
A verbatim or modified version can be redistributed under both
licenses simultaneously, which is the authors' preferred method.
The Guided Tour is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License and/or the GNU Free Documentation License for more
details.
FAQ
Q1. I select a tour from the menu, but nothing happens!
A1. You probably need to configure a viewer. C-h v guided-tour-pdf-viewer RET
or C-h v guided-tour-odp-viewer RET.
"
;; #### Find web, C-h, and maybe file locations for licenses, then add above.
;; You should have received a copy of the GNU General Public License
;; along with XEmacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
)))
;;; guided-tour.el ends here
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta