«»«»«»«»«»«»«»
«»«»
«»(code-c-d "phpdoc" "/usr/doc/phpdoc/html/")
(defun find-phpdocpage (page &rest rest)
(apply 'find-w3m (format "/usr/doc/phpdoc/html/%s.html" page) rest))
(defvar ee-file-php "/var/www/ee-tmp.php")
(defvar ee-url-php "http://127.0.0.1/ee-tmp.php")
(defun eephp (s &optional e)
(eev (format "wget -q -O - %s" ee-url-php))
(ee-write-with-nl s e "<?\n" "?>" ee-file-php))
(defun eephp+ (s &optional e)
(eev (format "w3m %s" ee-url-php))
(ee-write-with-nl s e "<?\n" "?>" ee-file-php))
(eeb-define 'eeb-php 'eephp 'ee-delimiter-hash nil t t)
(eeb-define 'eeb-php+ 'eephp+ 'ee-delimiter-hash nil t t)
«»(defvar ee-file-lua "$EEVTMPDIR/ee.lua")
(defun eelua (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-lua)
(find-sh (format "lua50 %s" ee-file-lua)))
(defun eelua0 (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-lua)
(find-sh0 (format "lua50 %s" ee-file-lua)))
(eeb-define 'eeb-lua 'eelua "\n--*\n" nil t t)
(eeb-define 'eeb-lua0 'eelua0 "\n--*\n" nil t t)
«»(defvar ee-file-tcl "$EEVTMPDIR/ee.tcl")
(defun eetcl (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-tcl))
(eeb-define 'eeb-tcl 'eetcl "\n#*\n" nil t t)
(defun find-tcl (str &rest rest)
(eetcl str)
(apply 'find-sh (format "tclsh %s" ee-file-tcl) rest))
(defun find-tcl0 (str)
(eetcl str)
(find-sh0 (format "tclsh %s" ee-file-tcl)))
(defun find-expcommand (str &rest rest)
(interactive "sExpect command: ")
(apply 'find-man "1 expect" "\nCOMMANDS"
(format "\n %s" str) rest))
«»
(setq ee-file-mp "$EEVTMPDIR/ee.mp")
(setq ee-script-mp "cd $EEVTMPDIR/ &&
mpost tmp.mp &&
awk '{if (NR==1) {print \"%!PS-Adobe-2.0 EPSF-1.2\"} else print}' \\
< tmp.0 > tmp.0.eps")
(defun eemp (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-mp)
(ee-write-with-nl ee-script-mp nil "" "" ee-file)
(format "eemp: wrote %s and %s" ee-file-mp ee-file))
(defun eemp-now (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-mp)
(find-sh ee-script-mp))
(eeb-define 'eeb-mp 'eemp 'ee-delimiter-percent nil t t)
(eeb-define 'eeb-mp-now 'eemp-now 'ee-delimiter-percent nil t t)
«»
(setq ps-run-x '("gs" "-r36" "-sPAPERSIZE=a4"))
(defun eepsrun (s &optional e)
(interactive "r")
(require 'ps-mode)
(unless (equal major-mode 'ps-mode) (ps-mode))
(unless (equal (process-status "ps-run") 'run)
(let ((pop-up-windows t))
(ps-run-start)))
(ps-run-region s e))
(eeb-define 'eeb-psrun 'eepsrun 'ee-delimiter-percent nil t t)
(setq ee-file-icon "~/ICON/ee.icn")
(setq ee-script-icon "cd ~/ICON/ && icont -s tmp.icn -x")
(defun eeicon (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-icon)
(ee-write-with-nl ee-script-icon nil "" "" ee-file)
(format "eeicon: wrote %s and %s" ee-file-icon ee-file))
(defun eeicon-ow (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-icon)
(find-progoutput-ow ee-script-icon))
(eeb-define 'eeb-icon 'eeicon 'ee-delimiter-hash nil t t)
(eeb-define 'eeb-icon-ow 'eeicon-ow 'ee-delimiter-hash nil t t)
(defun eelily (s &optional e)
(ee-write s e "
\\score {
\\notes {
" "
}
\\paper { }
\\midi { }
}" "$EEVTMPDIR/ee-ly.ly")
(eev "cd $EEVTMPDIR && lilypond ee-ly && rexdvi ee-ly.dvi &"))
(eeb-define 'eeb-lily 'eelily 'ee-delimiter-percent nil t t)
'
(eelily "\\key g \\major \\time 3/4
g,8^0()d b4 a8^0 b16()c' | b8()a g^4()fis g()d | e8()g c'()a^0 fis()b |
<g, d b>2\\trill <d a>4 | \\break
% 5
a,8()fis^3 c'4^2 b8 c'16()d' | c'8()b a^4()g fis^3()e |
fis8^1 g16()a g8()fis^1 e^1()fis | d4^0 a, d, \\bar \":|:\" |
d8()fis^3 a4^2 g8 a16()b | \\break
")
(defun ee-mgp-command-line (fname &optional page)
(format "cd %s && mgp -x vflib %s %s"
(file-name-directory (expand-file-name fname))
(if (and page (> page 0)) (format "-p %d" page) "")
(file-name-nondirectory fname)))
(defun find-mgp (fname &optional page now)
(interactive "fMagicPoint file: ")
(if now (shell-command-to-string (ee-mgp-command-line fname page))
(eev (ee-mgp-command-line fname page))))
(defun find-mgpnow (fname &optional page)
(interactive "fMagicPoint file: ")
(shell-command-to-string (ee-mgp-command-line fname page)))
(defun eemgp-file-now (&optional page)
(interactive "P") (find-mgpnow (buffer-file-name) page))
(defun ee-count-occurrences (str s e &optional show-it)
(interactive "MString: \nr\np")
(ee-maybe-showing-it
(save-excursion
(let ((count 0) (s (min s e)) (e (max s e)))
(goto-char s)
(while (search-forward str e t)
(setq count (1+ count)))
count))))
(defun eemgp-this-page-number ()
(ee-count-occurrences "\n%page" (point-min) (point)))
(defun eemgp-show (&optional show-it)
(interactive "p")
(save-buffer)
(ee-maybe-showing-it
(eemgp-file-now (eemgp-this-page-number))))
«»(defvar ee-file-fvwm "~/.fvwm/ee.fvwm")
(defun eefvwm (s &optional e)
(interactive "r")
(ee-write-with-nl s e "" "" ee-file-fvwm)
(format "eefvwm: wrote %s" ee-file-fvwm))
(defun eefvwm0 (s &optional e)
(interactive "r")
(eefvwm s e)
(find-sh0 "FvwmCommand ee"))
(eeb-define 'eeb-fvwm 'eefvwm 'ee-delimiter-hash nil t t)
(eeb-define 'eeb-fvwm0 'eefvwm0 'ee-delimiter-hash nil t t)
(defun find-fvwm0 (str)
(eefvwm str)
(find-sh0 "FvwmCommand ee"))
(defvar ee-fvwmhelp-prefix "\n ")
(defun find-fvwmhelp (&optional str &rest pos-spec-list)
(interactive
(let ((word (read-string "Fvwm command: " (word-at-point))))
(list (if (equal word "") nil word))))
(if str (apply 'find-man "1 fvwm" (concat ee-fvwmhelp-prefix str)
pos-spec-list)
(find-man "1 fvwm")))
(defun eehtml (s &optional e)
(interactive "r")
(ee-write s e
(format "<html>\n<head>\n<title>%s</title>\n</head>\n<body>\n"
ee-file-html)
"\n</body>\n</html>\n"
ee-file-html)
ee-file-html)
(defun eeurl (url)
(interactive (list (car (browse-url-interactive-arg "eeurl "))))
(eehtml (format "<a href=\"%s\">\n%s\n</a>" url url)))
(eeb-define 'eeb-html 'eehtml 'ee-delimiter-hash nil t t)
(defun ee-send-to-erc-channel (channel line)
(if (not (get-buffer channel))
(error "There's no buffer called \"%s\"" channel))
(if (not (eq 'erc-mode (with-current-buffer channel major-mode)))
(error "The buffer \"%s\" is not an ERC buffer"))
(switch-to-buffer channel)
(goto-char (point-max))
(insert line)
(erc-send-current-line))
(defun find-fsbot-answer (question)
"Ask a question to fsbot, a knowledgebot at the #emacs channel of Freenode"
(interactive "sQuestion: ")
(ee-send-to-erc-channel "fsbot" question))
(defun eeimage-data (fname)
(with-temp-buffer
(set-buffer-multibyte nil)
(insert-file-contents-literally fname)
(buffer-string)))
(defun eeimage-set (s e fname)
(add-text-properties s e
`(display (image :type ,(image-type-from-file-header fname)
:data ,(eeimage-data fname)))))
(defun find-eimage0 (fname &optional nlines nchars &rest ignored)
"Display the image given by FNAME in place of the text between point and bol.
This function is meant to be used with \\[eek-eval-sexp-eol], so
by default it will change the appearance of the entire current
line. If NLINES is non-nil then work on that number of lines
instead - e.g., 5 means change this line and the four previous
ones. A non-nil value of NCHARS means to use bol+NCHARS instead
of bol."
(eeimage-set (point)
(+ (or nchars 0) (point-at-bol (- 2 (or nlines 1))))
(ee-expand fname)))
(defun find-inkscape (fname)
(interactive "FSVG file name: ")
(eev (format "cd %s && inkscape %s &"
(file-name-directory (expand-file-name fname))
(file-name-nondirectory fname))))
«»