[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Here is the half hour hack --
Use as 
M-x cd-tool
and press the appropriate key--

;;;$Id: cd-tool.el,v 1.3 1999/08/30 03:22:44 raman Exp $
;;;Emacs front-end to CDTool
;;{{{  Copyright:

;;; Copyright (C) 1999 T. V. Raman <raman@cs.cornell.edu>
;;; All Rights Reserved.
;;; This file is not part of GNU Emacs, but the same permissions apply.
;;; GNU Emacs is free software; 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.
;;; GNU Emacs is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Emacs; see the file COPYING.  If not, write to
;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

(require 'cl)

(defvar cd-tool-message 
" +Next  - Previous  p play s stop h shuffle i info"
"Short message to display if user hits invalid key.")
(defun cd-tool ()
  "Front-end to CDTool."
  (let ((action (read-char "CD Action? "))
        (command nil))
    (while (null command)
      (setq command
            (case action
              (?+ "cdstart +")
              (?- "cdstart -")
              (?p "cdplay")
              (?s "cdstop")
              (?= "cdshuffle")
              (?\ "cdpause")
              (?r "cdstart")
              (?i "cdir")
              (otherwise (message cd-tool-message)))))
     (format "%s &"
             command ))))

(provide 'cd-tool)

Best Regards,

Email:  raman@cs.cornell.edu
WWW:    http://cs.cornell.edu/home/raman/             
PGP:    http://cs.cornell.edu/home/raman/raman.asc 

       To unsubscribe or change your address send mail to
"emacspeak-request@cs.vassar.edu" with a subject of "unsubscribe" or "help"

Emacspeak Files | Subscribe | Unsubscribe