octave-maintainers
[Top][All Lists]
Advanced

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

command_editor and generating completions


From: John Swensen
Subject: command_editor and generating completions
Date: Fri, 15 May 2009 16:21:34 -0400

I just found out about an add-on to GtkSourceView that does autocompletion. So, I have been looking into how Octave uses GNU readline to do completion from the command line. It looks like there are a lot of utility functions already there to make my life easier, but have a couple of questions about how the command_editor::generate_*_completions() functions work. I'm assuming that as with everything else, this interaction with readline and the list of function defined in Octave is *not* threadsafe? My only problem is that this autocompletion is for the editor and it would stink if auto-completion wasn't available while Octave is currently executing. I often start a script running, then go off and edit some other file while it is running. Since my threadsafe workaround so far has been to only interact with the internals of Octave during the readline idle event loop, I can't use this while a function/script is executing.

So, my question is whether there is a way to get a snapshot of whatever readline is storing so that I can reference this copy while the Octave interpreter is running? What are the implications of calling GNU readline functions for finding possible completions while in the middle of executing a script?

John Swensen


reply via email to

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