;;; From: Jean-Philippe Theberge ;;; Subject: bofh.el ;;; Newsgroups: gnu.emacs.sources ;;; Date: 30 Jul 2001 17:03:39 +0200 ;;; Organization: Guest of France Telecom Oleane's newsreading service ;;; Mail-Copies-To: never ;;; Lines: 44 ;;; Sender: jphil@godzilla.act.oda.fr ;;; Message-ID: ;;; NNTP-Posting-Host: godzilla.act.oda.fr ;;; Mime-Version: 1.0 ;;; Content-Type: text/plain; charset=us-ascii ;;; X-Complaints-To: abuse@oleane.net ;;; NNTP-Posting-Date: Mon, 30 Jul 2001 15:03:39 +0000 (UTC) ;;; User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.5 ;;; Xref: news.wam.umd.edu gnu.emacs.sources:9833 ;;; This is a frontend to the "Bastard Operator From Hell Excuse ;;; Generator" ;;; A must for tech support. ;;; If you have a slow connection and get errors, try running with a ;;; higher bofh-timer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bofh.el - version 0.1 ;; ;; by JP Theberge jphil@emacslisp.org 30/07/2001 ;; ;; Useful lisp code for tech-support (defvar bofh-timer 3) (defun bofh-get-excuse () (let* ((process (open-network-stream "bofh-process" "*bofh-process-buffer*" "bofh.jive.org" 666)) (excuse (progn (sleep-for bofh-timer)) (switch-to-buffer "*bofh-process-buffer*") (goto-char (point-min)) (re-search-forward "Your excuse is: \\(.*\\)$" nil t) (match-string 1)))) (kill-buffer (current-buffer)) (if excuse excuse)) (defun bofh-show-excuse () (interactive) (message (bofh-get-excuse))) (defun bofh-insert-excuse () (interactive) (insert (bofh-get-excuse)))