GNU bug report logs -
#21162
adapting octave-inf.el to Octave 4
Previous Next
Reported by: Francesco Potortì <pot <at> gnu.org>
Date: Thu, 30 Jul 2015 17:23:03 UTC
Severity: minor
Merged with 21150,
21163
Found in version 24.5
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21162 in the body.
You can then email your comments to 21162 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Thu, 30 Jul 2015 17:23:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Francesco Potortì <pot <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 30 Jul 2015 17:23:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The following patch does two things:
1) it removes the --no-line-editing option when calling the Octave
process, for reasons that I explained in my previous bug report about
octave-inf.el
2) it adds the --no-gui option when calling Octave if its version is
different from 3: this is needed because the last (and future,
probably) Octave versions launch a GUI by default
--- /dev/fd/63 2015-07-30 19:21:16.227231663 +0200
+++ octave-inf.el 2015-07-30 19:13:13.678557317 +0200
@@ -193,12 +193,16 @@
(defun inferior-octave-startup ()
"Start an inferior Octave process."
- (let ((proc (comint-exec-1
- (substring inferior-octave-buffer 1 -1)
- inferior-octave-buffer
- inferior-octave-program
- (append (list "-i" "--no-line-editing")
- inferior-octave-startup-args))))
+ (let* ((octave-version-string (shell-command-to-string
+ (concat inferior-octave-program " --version")))
+ (octave-gui (not (string-match "version 3" octave-version-string)))
+ (proc (comint-exec-1
+ (substring inferior-octave-buffer 1 -1)
+ inferior-octave-buffer
+ inferior-octave-program
+ (append (list "-i")
+ (when octave-gui (list "--no-gui"))
+ inferior-octave-startup-args))))
(set-process-filter proc 'inferior-octave-output-digest)
(setq comint-ptyp process-connection-type
inferior-octave-process proc
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Fri, 31 Jul 2015 06:48:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 21162 <at> debbugs.gnu.org (full text, mbox):
Francesco Potortì wrote:
> The following patch does two things:
>
> 1) it removes the --no-line-editing option when calling the Octave
> process, for reasons that I explained in my previous bug report about
> octave-inf.el
>
> 2) it adds the --no-gui option when calling Octave if its version is
> different from 3: this is needed because the last (and future,
> probably) Octave versions launch a GUI by default
There is no file "octave-inf.el" in Emacs for some time,
and "inferior-octave-startup" has contained code to call "--no-gui" for
the past two years, so please review the situation in current Emacs
master and send a revised patch, if one is still needed. Thanks.
Merged 21162 21163.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 31 Jul 2015 06:49:01 GMT)
Full text and
rfc822 format available.
Added tag(s) moreinfo.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 31 Jul 2015 06:49:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Fri, 31 Jul 2015 09:27:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 21162 <at> debbugs.gnu.org (full text, mbox):
>> The following patch does two things:
>>
>> 1) it removes the --no-line-editing option when calling the Octave
>> process, for reasons that I explained in my previous bug report about
>> octave-inf.el
>>
>> 2) it adds the --no-gui option when calling Octave if its version is
>> different from 3: this is needed because the last (and future,
>> probably) Octave versions launch a GUI by default
>
>There is no file "octave-inf.el" in Emacs for some time,
>and "inferior-octave-startup" has contained code to call "--no-gui" for
>the past two years, so please review the situation in current Emacs
>master and send a revised patch, if one is still needed. Thanks.
Sorry, I live behind the times :)
With the newest version, it's easier: just remove the --no-line-editing
option from the initialization of inferior-octave-startup-args:
--- octave.el.old 2015-07-31 11:19:50.203406678 +0200
+++ octave.el.new 2015-07-31 11:19:55.647504953 +0200
@@ -641,7 +641,7 @@
:group 'octave
:version "24.4")
-(defcustom inferior-octave-startup-args '("-i" "--no-line-editing")
+(defcustom inferior-octave-startup-args '("-i")
"List of command line arguments for the inferior Octave process.
For example, for suppressing the startup message and using `traditional'
mode, include \"-q\" and \"--traditional\"."
Reason for changelog entry:
--no-line-editing serves no apparent purpose (any more?) and prevents an
inferior Octave process from using readline features, like getting the
terminal width and other functions used for the FLTK graphical backend.
Thanks
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Fri, 31 Jul 2015 15:41:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 21162 <at> debbugs.gnu.org (full text, mbox):
Francesco Potortì wrote:
> --no-line-editing serves no apparent purpose (any more?) and prevents an
> inferior Octave process from using readline features, like getting the
> terminal width and other functions used for the FLTK graphical backend.
vc-annotate is your friend, and shows that this was added in:
commit 48495f0fd6afc6aa45f87116552629df39268336
Author: Stephen Eglen <stephen <at> gnu.org>
Date: Mon Sep 6 19:20:29 1999 +0000
add --no-line-editing to inferior-octave-startup-args so that TABs
in source files are not interpreted as completion requests.
I don't use Octave myself, so I have no idea if this is still relevant.
If you know it isn't, I suggest you feel free to commit this.
Please bump the defcustom's :version tag (to 25.1) if you do,
and then close this bug. Thanks!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Thu, 06 Aug 2015 13:16:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 21162 <at> debbugs.gnu.org (full text, mbox):
Francesco Potortì:
>> --no-line-editing serves no apparent purpose (any more?) and prevents an
>> inferior Octave process from using readline features, like getting the
>> terminal width and other functions used for the FLTK graphical backend.
Glen Morris:
>vc-annotate is your friend, and shows that this was added in:
>
>commit 48495f0fd6afc6aa45f87116552629df39268336
>Author: Stephen Eglen <stephen <at> gnu.org>
>Date: Mon Sep 6 19:20:29 1999 +0000
>
> add --no-line-editing to inferior-octave-startup-args so that TABs
> in source files are not interpreted as completion requests.
Hm. Thanks, Glenn. I see now that I had not checked that corner case.
I'll bring this up with Octave developers and look for a solution.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Thu, 13 Aug 2015 16:14:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 21162 <at> debbugs.gnu.org (full text, mbox):
>Hi Francesco, thanks for sticking with this despite resistance / lack
>of interest.
>
>Is there a reason you omitted the Octave mailing list on this reply?
I think it is of interest only to a tiny minority of people on that
list, but if you think otherwise please add it back when answering.
By the way, I put in copy the bug reporting address and interested Emacs
people.
>On Thu, Aug 6, 2015 at 9:26 AM, Francesco Potortì wrote:
>> 1) --no-line-editing is used to prevent the Emacs inferior Octave from
>> intepreting tabs. That was the original intention. In fact, this
>> just happened to me while copying and pasting column of numbers from
>> another buffer to the inferior Octave buffer and having Octave trying
>> to autocomplete.
>
>Ok, that makes sense.
Note that this is the only reason why --no-line-editing is used at all:
all other control sequences are intercepted by Emacs adn are not passed
to the inferior Octave at all. This is true for tabs also, but if you
copy-paste from somewhere else into an inferior Octave buffer, you get
strange results without --no-line-editing if what you paste contains
tabs.
>> 2) --no-line-editing prevents the Emacs inferior Octave from adapting to
>> the buffer width (height is not relevant in this context)
>
>Agreed, this should be fixed in one way or another.
>
>> 3) --no-line-editing disables some functions used by Octave for FLTK.
>>
>> Adding support for COLUMNS solves problem 2.
>>
>> At this point, finding the right solution requires knowing what is the
>> purpose of the --no-line-editing: is it possible / desirable to change
>> its behaviour?
>
>If you mean conceptually, I think the meaning is literally "do not use
>the readline library for input". IOW, Octave takes its input from
>either fgets() or readline(). No line editing means the user's text is
>read directly by Octave as provided on the standard input stream. Line
>editing allows the user to edit the current line, recall previous
>lines in the saved history, kill and yank text, etc, before submitting
>it to Octave.
>
>This is the concept that I think Emacs (correctly) wants to disable.
>In this case the user is using Emacs to edit text in a buffer and
>submitting it to Octave for evaluation on a line-by-line basis.
As I explained above, while this is true conceptually, it is not true in
practice. If there was an Octave option --disable-tab-expansion, that
would pefectly do as far as Emacs is concerned. So, if
--no-line-editing was in fact devised for Emacs' sake, then it is
definitely overkill, and one possibility is to simply change its
behaviour. If it was intended for some other purpose, then changing its
behaviour is out of question.
>Your other points are side effects not tied to the main purpose of
>using readline for input line editing. I think we all agree #2 is
>relatively easy to fix in multiple ways.
>
>Problem 3 is bug #37795 [1] that has no progress and no suggestions
>for how to continue. If we don't use readline to get input from the
>user, then we currently have no way to perform asynchronous event
>execution while the input is idle and FLTK does not behave correctly.
>I think that the Qt toolkit does not suffer from this limitation
>because it is multithreaded and does not rely on readline's idle input
>callback feature.
>
>[1]: https://savannah.gnu.org/bugs/?37795
As a conclusion of my observations above:
A. if --no-line-editing was introduce because of the Emacs inferior
Octave mode
B. if it is reasonable to assume that --no-line-editing is not used by
any other application
C. if there is a way to leave readline enabled, but disable tab expansion
then one can change the --no-line-editing behaviour to just disable tab
expansion.
Or, if only C is certainly true, one can deprecate and undocument
--no-line-editing and add a separate option --disable-tab-expansion for
use in Emacs inferior Octave mode.
--
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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Wed, 26 May 2021 22:59:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 21162 <at> debbugs.gnu.org (full text, mbox):
Francesco Potortì <pot <at> gnu.org> writes:
> -(defcustom inferior-octave-startup-args '("-i" "--no-line-editing")
> +(defcustom inferior-octave-startup-args '("-i")
[...]
Francesco Potortì <pot <at> gnu.org> writes:
> As a conclusion of my observations above:
>
> A. if --no-line-editing was introduce because of the Emacs inferior
> Octave mode
>
> B. if it is reasonable to assume that --no-line-editing is not used by
> any other application
>
> C. if there is a way to leave readline enabled, but disable tab expansion
>
> then one can change the --no-line-editing behaviour to just disable tab
> expansion.
>
> Or, if only C is certainly true, one can deprecate and undocument
> --no-line-editing and add a separate option --disable-tab-expansion for
> use in Emacs inferior Octave mode.
I'm going through old bug reports, and after skimming this one, I'm not
quite sure what the conclusions are. Should the --no-line-editing value
be removed from the options?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Tue, 08 Jun 2021 13:10:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 21162 <at> debbugs.gnu.org (full text, mbox):
>
>Francesco Potortì <pot <at> gnu.org> writes:
>
>> -(defcustom inferior-octave-startup-args '("-i" "--no-line-editing")
>> +(defcustom inferior-octave-startup-args '("-i")
>
>[...]
>
>Francesco Potortì <pot <at> gnu.org> writes:
>
>> As a conclusion of my observations above:
>>
>> A. if --no-line-editing was introduce because of the Emacs inferior
>> Octave mode
>>
>> B. if it is reasonable to assume that --no-line-editing is not used by
>> any other application
>>
>> C. if there is a way to leave readline enabled, but disable tab expansion
>>
>> then one can change the --no-line-editing behaviour to just disable tab
>> expansion.
>>
>> Or, if only C is certainly true, one can deprecate and undocument
>> --no-line-editing and add a separate option --disable-tab-expansion for
>> use in Emacs inferior Octave mode.
>
>I'm going through old bug reports, and after skimming this one, I'm not
>quite sure what the conclusions are. Should the --no-line-editing value
>be removed from the options?
No. Not unless Octave adds a --disable--tab--expansion as I suggest in
the second route that I described.
The current options provide minimal damage with current Octave's
behaviour. To do better, Octave should follow one of the two routes I
illustrated above.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21162
; Package
emacs
.
(Wed, 09 Jun 2021 09:37:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 21162 <at> debbugs.gnu.org (full text, mbox):
Francesco Potortì <pot <at> gnu.org> writes:
> No. Not unless Octave adds a --disable--tab--expansion as I suggest in
> the second route that I described.
>
> The current options provide minimal damage with current Octave's
> behaviour. To do better, Octave should follow one of the two routes I
> illustrated above.
Is there anything more to be done here on the Emacs side of things, then?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
21150 <at> debbugs.gnu.org and Francesco Potortì <pot <at> gnu.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 09 Jun 2021 10:20:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 07 Jul 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 292 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.