I've recently started using Emacs octave-mode and discovered that when using printf
Emacs seems to block and I have to kill the execution of an Octave script with C-g
.
I can reproduce that problem by having a file testprintf.m
with just that single following line:
printf("Test");
or, alternatively, more authentical:
printf("Test: %d", 10);
Then, I execute this file with C-c C-i a
(or, if you like, just that line with C-c C-i l
) and I am seeing the mouse pointer turning into the waiting symbol signalling me that this Emacs command seems to hang. C-g
terminates the command and allows further editing of the buffer. The Inferior Octave buffer does not show any output during and after this action.
Converting printf
into a disp
statement works but I'd like to make use of the convenient C-style formatting, Octave offers. Also, the same printf
command works when directly copied into the Inferior Octave buffer with the expected out. I am using GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.11) and Octave 4.4.1. I have also tried it without my ~/.emacs
with the same result, the mouse pointer turning into the waiting symbol.