Yes, the batch file needs to be setup to accept argument(s). But you
don't really need the batch file if you hardcode the path info into the
elisp function:
(defun wwwd ()
"Lookup Latin word at point with William Whitaker's Words program"
(interactive )
(cd "c:/wwwd") ;; where I unzipped everything
(shell-command (concat "wwwd " (thing-at-point 'sentence))) ;; renamed
word.exe to wwwd.exe
(cd "c:/mydocu~1")) ;; reset current directory for emacs
(global-set-key (kbd "<f12>") 'wwwd)
To use the 'sentence "thing" instead of the 'word "thing" you might have
to mess with these settings:
'(sentence-end "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[
]*")
'(sentence-end-double-space nil)
or else just enter a series of space-separated Latin forms on the same
line. With the following (all punctuation removed), the programm parsed
all tokens up to and including the words "bonorum omnium," most of them
correctly.
Quo usque tandem abutere Catilina, patientia nostra quam diu etiam furor
iste tuus nos eludet quem ad finem sese effrenata iactabit audacia
Nihilne te nocturnum praesidium Palati nihil urbis vigiliae nihil timor
populi nihil concursus bonorum omnium nihil hic munitissimus habendi
senatus locus nihil horum ora voltusque moverunt Patere tua consilia non
sentis constrictam iam horum omnium scientia teneri coniurationem tuam
non vides
So there is a limit to the number a arguments that the program will
accept, even though it's written in Ada.
Ed