all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* windows, elisp function to call batch file, shell-command, Whitaker's words
@ 2016-12-02 13:49 Hugh Lawson
  2016-12-02 14:06 ` tomas
  2016-12-02 15:03 ` windows, elisp function to call batch file, shell-command, Whitaker's words--solved Hugh Lawson
  0 siblings, 2 replies; 5+ messages in thread
From: Hugh Lawson @ 2016-12-02 13:49 UTC (permalink / raw)
  To: help-gnu-emacs

The problem is that William Whitaker's Words program returns an error when I try to call it with this setup, in Windows 10.  I have a Latin text in a buffer. I put the cursor on a Latin word, and strike F12.  The elisp function calls the latin.bat bath file, which calls the words latin dictionary program.  I think something is wrong either with my elisp function or my batch file.

The following error is displayed:

=>Raised END_ERROR, although in STANDARD_INPUT
^Z is inappropriate keyboard input, WORDS should be terminated with a blank line
Giving up!

In .emacs file:

(defun whitaker-lookup ()
"Lookup Latin word at point in Whitaker's words"
(interactive )
(shell-command (concat "C:\latin " (thing-at-point 'word))))
;;C:\latin is a batch file
(global-set-key (kbd "<f12>") 'whitaker-lookup)


Here is the batch file, latin.bat

cd c:\WORDS
words


The same error occurs if I issue these commands:

m-x shell-command
latin

However, if I go into the shell mode buffer I can make things work:

mx-shell

c:\> cd c:\words
c:\words> words
;;calls the words program with no error
c:\words> latin
;; calls the batch file which calls the words program, successfully.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-19  2:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-02 13:49 windows, elisp function to call batch file, shell-command, Whitaker's words Hugh Lawson
2016-12-02 14:06 ` tomas
2016-12-02 15:03 ` windows, elisp function to call batch file, shell-command, Whitaker's words--solved Hugh Lawson
2016-12-02 17:03   ` B. T. Raven
2016-12-19  2:41     ` Hugh Lawson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.