Permalink
Browse files

Shell-command, for simple 'wait commands.

  • Loading branch information...
jdtsmith committed Feb 24, 2010
1 parent 7035d9b commit 23b06d1f3b612baa477b247317c09105bf394f6e
Showing with 16 additions and 0 deletions.
  1. +16 −0 idlw-shell.el
View
@@ -1373,6 +1373,22 @@ recognized."
(goto-char save-point))
(set-buffer save-buffer))))
+(defun idlwave-shell-command (cmd)
+ "Send a command and immediately gather the result.
+Disables line display after state scanning."
+ (let (result)
+ ;; Only return when you've received the output
+ (idlwave-shell-send-command
+ cmd
+ '(progn (idlwave-shell-strip-input)
+ (setq result idlwave-shell-command-output))
+ 'hide 'wait nil 'disable)
+ (with-current-buffer ;; DEBUGXXX
+ (get-buffer-create "*idlwave-shell-output*")
+ (goto-char (point-max))
+ (insert (format "--[C.] New result: %s\n" result)))
+ result))
+
(defun idlwave-shell-send-char (c &optional error)
"Send one character to the shell, without a newline."
(interactive "cChar to send to IDL: \np")

0 comments on commit 23b06d1

Please sign in to comment.