From help-octave-request at bevo dot che dot wisc dot edu Sat Feb 14 04:36:58 1998 Subject: Re: number of column of octave terminal From: Francesco Potorti` To: "John W. Eaton" , Mario Storti CC: help-octave at bevo dot che dot wisc dot edu Date: Sat, 14 Feb 1998 11:36:41 +0100 (CET) Thank you both for your explanations and interest. I wrote: > How can one make octave change its idea of terminal width? I use > octave as an emacs subprocess on a character terminal. I made the following experiments. If I run octave in a shell buffer, then it seems that it takes all the columns. (I have 90). Yes, it works for me also. In fact, comint tells the process that it runs on a dumb terminal with the correct number of columns. If I reshape the emacs window, then it seems that octave doesn't change its idea of the number of columns and it continues to print matrices as if the number of columns were 90. That is perhaps because the SIGWINCH does not reach the octave process? Or even if it reaches it, readline does not handle it? On the other hand, if I use inferior-octave (from Kurt Hornik and jwe) then octave takes the full width of the window I use the following home-made function which I wrote long ago and is now modified to use comint, and now I get the right window size: (defun octave (rawprefix) (interactive "P") (if (and (get-buffer "octave") (null rawprefix)) (switch-to-buffer "octave") (let ((comint-scroll-to-bottom-on-input 'this) (comint-scroll-to-bottom-on-output nil) (comint-scroll-show-maximum-output t) (buffer (generate-new-buffer "octave"))) (comint-exec buffer "octave" "octave" nil nil) (switch-to-buffer buffer) (shell-mode) (cd "~/math/workarea")))) Do you use inferior-octave? I do not, because on this system (Debian Linux, emacs 19.34), M-x run-octave hangs (or loops). I have not had the time to investigate the problem, so I stick with my home-made function for the moment. Thanks again. F.