GNU bug report logs -
#24492
24.5; Emacs unresponsive when sending buffer or region to Octave
Previous Next
Reported by: "Anton S." <emacs <at> alshu.de>
Date: Wed, 21 Sep 2016 08:15:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 24.5
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
"Anton S." <emacs <at> alshu.de> writes:
> Reproduction guide :beetle:
>
> Start Emacs
> write folling in octave mode: for i=1:10 i, pause(1); end
> send the buffer to octave with
> octave-send-buffer
> or mark everything and do
> octave-send-region
>
> Observed behavior:
>
> Emacs is unresponsive for 10 seconds. Then a second buffer window opens
> with the input lines visible but without output:
(This bug report unfortunately got no response at the time.)
Yes, the `C-c C-i C-a' command in octave-mode is totally synchronous
(per line). I wondered whether you can just avoid splitting up the
region into lines and just send them to the process, and that works
fine, as far as I can see.
And it fixes the test case.
However, I'm not an octave-mode user. Does anybody have a comment on
making a change like this?
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index c313ad1179..24e69ab992 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -1517,23 +1517,8 @@ octave-send-region
(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)))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.