help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing terminal size


From: Francesco Potortì
Subject: Re: changing terminal size
Date: Thu, 25 Jun 2015 20:07:52 +0200

>On Wed, Jun 24, 2015 at 15:04:30 -0400, John W. Eaton wrote:
>> On 06/23/2015 02:02 PM, Francesco Potortì wrote:
>>
>>> Hm.  Disabling line editing is conceptually different from assuming that
>>> you cannot ask for terminal size, as far as I know.  Am I wrong?
>>
>>
>> It is a separate issue, but I think that we have used readline functions to
>> query terminal size and the current implementation assumes that those
>> functions are not available if you disable line editing.  I guess it should
>> really use them if they are available, even if line editing is not enabled.
>
>Yeah, we also use readline for its ability to process events in the
>background while waiting for input, so that FLTK plotting doesn't work
>when line editing is disabled. Those concepts are even further removed
>but currently bound together. *shrug*
>
>I looked at the "comint" package in Emacs, which is what I think is
>used to run Octave, and it does already handle setting the COLUMNS
>environment variable correctly when a subprocess is started, so Octave
>should just need to be taught to override the terminal size from
>readline if the COLUMNS and/or LINES variables are present in the
>environment. I think this is the easiest solution and worth doing, and
>is not just for Emacs.
>
>Now if you also need the number of lines to be set correctly, you
>should probably file a bug to add that to the Emacs comint library.

Alright, as I view it usign the COLUMNS variable is enough for the Emacs
inferior-octave mode and a quick workaround.  I just checked and indeed
Octave sees the COLUMNS env var, which is correctly set inside
inferior-octave mode.

Probably the clean solution would be to not using readline for getting
terminal width and height, if possible.

Isn't there a way to just disable the line-editing features of readline,
without disabling all the rest?

However, there is fundamental question: why ever is --no-line-editing
needed at all?  I just tried modifying octave-inf.el to call Octave
without it, and apparently all is well, the columns behave as they
should and all the resta s well...


By the way, now that you mention it, I probably understand why I have
never been able to use FLTK under Emacs, which is really a pity :(

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]