Proper terminal width



????? ????? wrote:
> 
> So, we can just set linel to terminal width and solve this problem. As
> i found out terminal width can be found with (maxima-getenv
> "COLUMNS").
> 
> The last thing to do is to add smth like
>         (setq linel  (maxima-getenv "COLUMNS") $linel (maxima-getenv
> "COLUMNS") )
> to the place, where user hits his enter key.
> 
> I would've provide a patch, but
> 1) I have no idea where this place is
> 2) The result of (maxima-getenv "COLUMNS") is a string and i don't
> know how to convert it to a number
> 3) I don't know if all this is ok.
> 
> Would you give me a hand?
> 

I suppose using the value of COLUMNS is a decent default.  FWIW, on my
particular system, COLUMNS doesn't exist.  We'd have to check for that.

You could, of course, do this in your own maxima-init file.

Here is a possible function to do what you want.  Completely untested.

(defun set-linel ()
  (let ((c (maxima-getenv "COLUMNS")))
    (when c
      ;; More error checking needed....
      (setf c (parse-integer c))
      (setf linel c)
      (setf $linel c))))

Ray