Subject: bug#21150: 24.5; octave-inf mode does not need --no-line-editing

From: Francesco Potortì <[email-masked]>
Date: Tue, 28 Jul 2015 15:40:01 +0200

In Octave inferior mode, defined in octave-inf.el, the Octave process is
called with the --no-line-editing option.  This option should be
deleted, because apparently it is useless and it causes problems.

The problem is that Octave disables everything related to readline with
that option, which has the side effects of making Octave incapable of
getting the terminal line width and of using the Ftlk graphics engine.

These problems could in principle be corrected inside Octave, but in
fact the --no-line-editing option seems to be not necessary (no more?),
as I have experienced in several weeks of using Octave under Emacs with
a modified octave-inf.el.  Note that it is unlikely that other users
have had a different experience, as I am one of the few users which are
both proficient in Emacs and Octave and uses routinely Octave in an
Emacs buffer.

As you can read in the following email, all the other potentially
involved developers have nothing to add to this description of facts.

In short, please remove the "--no-line-editing" option from the list of
options in octave-inf.el.

-- 
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

------- Start of forwarded message -------
Date: Thu, 02 Jul 2015 19:33:16 +0200
From: Kurt Hornik <[email-masked]>
Subject: Fwd: Re: changing terminal size
In-reply-to: <[email-masked]>
To: Francesco Potortì <[email-masked]>
Cc: Kurt Hornik <[email-masked]>, Mike Miller <[email-masked]>,
 "John W. Eaton" <[email-masked]>
Reply-to: [email-masked]

>>>>> Francesco Potortì writes:

> Kurt,
> I am writing to you about the --no-line-editing option that is used when
> calling octave in inferior octave mode under Emacs.  That option causes
> at least to nasty side effects.  As you can read in the Debian bug
> report linked at the end of the following email, it disables Octave's
> modern graphics engine.  Moreover, it forces Octave into 80-column mode,
> sa discussed in the following email.

> Both these problems could be in prnciple be corrected in Octave,
> especially the second one.  But I just tried to remove --no-line-editing
> from the list of options in octave-inf.el and everything seems to work
> well.

> So, why is --no-line-editing there at all?  Can it be simply deleted
> from the code of octave-inf.el?

Francesco,

Sorry ... I really don't know any more.  It must be more than 20 years
ago that I wrote the code ...

Best
- -k

> -- 
> 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

> ------- Start of forwarded message -------
> Date: Mon, 29 Jun 2015 14:23:27 -0400
> From: Mike Miller <[email-masked]>
> Subject: Re: changing terminal size
> In-reply-to: <[email-masked]>
> To: Francesco Potortì <[email-masked]>
> Cc: Octave users list <[email-masked]>, "John W. Eaton" <[email-masked]>

> On Thu, Jun 25, 2015 at 20:07:52 +0200, Francesco Potortì wrote:
>> Probably the clean solution would be to not using readline for getting
>> terminal width and height, if possible.

> We could add a fallback to get the terminal size directly if readline
> is disabled, but IMHO we should also definitely add support for
> overriding the terminal size with COLUMNS and LINES regardless.

>> 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...

> I don't know, that's a question for the Emacs devs who work on the
> Octave mode. You might have better luck asking on an emacs list. I
> suspect it's because Emacs wants to be in charge of line editing,
> history, completion, etc, and maybe there is some interference or
> other reason to want to disable readline in the target program.

> We talked about all of this a while ago on Debian #675509 [1] where
> you proposed that Octave mode should not be based on comint mode. I
> have no opinion or insight into what any of that means, but it is
> still based on comint mode today and does still set the
> - --no-line-editing option. IMHO taking this up with the maintainers of
> the Octave mode script is the best way forward.

> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675509

> - -- 
> mike
> ------- End of forwarded message -------
------- End of forwarded message -------