[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ed30956: Make octave-send-region be asynchronous
From: |
Lars Ingebrigtsen |
Subject: |
master ed30956: Make octave-send-region be asynchronous |
Date: |
Sun, 27 Dec 2020 22:24:15 -0500 (EST) |
branch: master
commit ed30956099fff5025698c8ffdd9e876f207ed2af
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make octave-send-region be asynchronous
* lisp/progmodes/octave.el (octave-send-region): Send things
asynchronously to the inferior process (bug#24492).
---
lisp/progmodes/octave.el | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index bda4e60..f295917 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -1512,28 +1512,12 @@ current buffer file unless called with a prefix arg
\\[universal-argument]."
(interactive "r")
(inferior-octave t)
(let ((proc inferior-octave-process)
- (string (buffer-substring-no-properties beg end))
- line)
+ (string (buffer-substring-no-properties beg end)))
(with-current-buffer inferior-octave-buffer
;; https://lists.gnu.org/r/emacs-devel/2013-10/msg00095.html
(compilation-forget-errors)
- (setq inferior-octave-output-list nil)
- (while (not (string-equal string ""))
- (if (string-match "\n" string)
- (setq line (substring string 0 (match-beginning 0))
- string (substring string (match-end 0)))
- (setq line string string ""))
- (setq inferior-octave-receive-in-progress t)
- (inferior-octave-send-list-and-digest (list (concat line "\n")))
- (while inferior-octave-receive-in-progress
- (accept-process-output proc))
- (insert-before-markers
- (mapconcat 'identity
- (append
- (if octave-send-echo-input (list line) (list ""))
- inferior-octave-output-list
- (list inferior-octave-output-string))
- "\n")))))
+ (insert-before-markers string "\n")
+ (comint-send-string proc (concat string "\n"))))
(if octave-send-show-buffer
(display-buffer inferior-octave-buffer)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ed30956: Make octave-send-region be asynchronous,
Lars Ingebrigtsen <=