emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/idlwave 23b06d1f3b 253/360: Shell-command, for simple '


From: ELPA Syncer
Subject: [elpa] externals/idlwave 23b06d1f3b 253/360: Shell-command, for simple 'wait commands.
Date: Sun, 28 Apr 2024 00:59:30 -0400 (EDT)

branch: externals/idlwave
commit 23b06d1f3b612baa477b247317c09105bf394f6e
Author: JD Smith <jdtsmith@gmail.com>
Commit: JD Smith <jdtsmith@gmail.com>

    Shell-command, for simple 'wait commands.
---
 idlw-shell.el | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/idlw-shell.el b/idlw-shell.el
index c28e89153f..a5036cf592 100644
--- a/idlw-shell.el
+++ b/idlw-shell.el
@@ -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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]