all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hugh Lawson <hu.lawson@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: windows, elisp function to call batch file, shell-command, Whitaker's words
Date: Fri, 2 Dec 2016 05:49:17 -0800 (PST)	[thread overview]
Message-ID: <ae54e9d8-1139-4ef5-892e-571607bff8a0@googlegroups.com> (raw)

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.


             reply	other threads:[~2016-12-02 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 13:49 Hugh Lawson [this message]
2016-12-02 14:06 ` windows, elisp function to call batch file, shell-command, Whitaker's words 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae54e9d8-1139-4ef5-892e-571607bff8a0@googlegroups.com \
    --to=hu.lawson@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.