Commit Graph

12 Commits

Author SHA1 Message Date
John Ciolfi 45febb409c Fix conflict between matlab-shell debugging and C++ (or other language) debugging.
Fix conflict between matlab-shell debugging and C++ (or other language) debugging.
- matlab-shell debugging previously leveraged gud.el for debugging of *.m files.
- C++ debugging also leverages gud.el for debugging.
- Only one instance of a gud.el debugger can be active. If you run two, say
  *.m debugging and C++ debugging. Then you get odd errors such as the
  ebbreak not being recognized by gdb.
To fix these issue, I copied gud.el and made a new namespace "mlgud". I also
removed a lot of unused code from mlgud.el, though there's still more that can
be removed. Now one can debug *.m files and *.cpp files in one Emacs session.
2022-03-11 14:55:04 -05:00
Eric Ludlam 80763e48c3 matlab-netshell.el:
(matlab-netshell-execute-command): Whe enabling gud bindings, do
so in the netshell process buffer.  Protects local keybindings in
whatever the default buffer was from gud's calls to set-local-key.
2020-01-25 10:36:44 -05:00
Eric Ludlam fb19b6bcc1 cedet-matlab.el, matlab-cgen.el, matlab-compat.el,
matlab-complete.el, matlab-maint.el, matlab-netshell.el,
matlab-publish.el, matlab-topic.el, semantic-matlab.el,
semanticdb-matlab.el, srecode-matlab.el:
Fix varous issues in doc strings and messages identified by `checkdoc'
command.
2019-12-12 22:36:55 -05:00
Eric Ludlam 9646902e54 matlab-compat.el:
(matlab-find-emacsclient): Fix paren bug w/ cond statement.

matlab-netshell.el:
Declare functions from matlab-shell, nd matlab-shell-gud to quiet the
byte compiler.
2019-12-12 18:45:59 -05:00
Eric Ludlam ae9a63e2f9 matlab-netshell.el:
(matlab-netshell-execute-command):
Enable gud bindings when a connection is made from MATLAB.
2019-12-12 17:23:29 -05:00
Eric Ludlam 14541a788a matlab-netshell.el:
(matlab-netshell-execute-command): On init, send
emacs client command so ML can send us files to edit.
2019-12-11 22:11:11 -05:00
Eric Ludlam 154c4cab8b matlab-netshell.el:
(matlab-netshell-execute-command):
Support 'eval' command from MATLAB.
2019-12-08 11:49:26 -05:00
Eric Ludlam ca9701adf9 matlab-cgen.el matlab-complete.el matlab-netshell.el
matlab-shell.el matlab-topic.el srecode-matlab.el:
Fix email @ top of files to be real.
2019-11-28 15:56:59 -05:00
Eric Ludlam 45fa5340f0 matlab-netshell.el:
(matlab-netshell-server-name): Renamed from matlab-netshell-name.
(matlab-netshell-server-active-p): New, use above.
(matlab-netshell-server-start): Use new servername variable for both buffer
and process.
(matlab-netshell-server-stop): Use new servername variable.
2019-11-23 09:30:51 -05:00
Eric Ludlam d6a2d5f8d4 matlab-netshell.el
Improve command parsing / error handling.
(matlab-netshell-client): New helper.
(matlab-netshell-execute-command): Handle new commands
output, and error.
(matlab-netshell-eval): Designed for sending an eval command
(matlab-netshell-evalc): Designed for sending an evalc command

matlab-shell.el:
Integrate netshell support.
(matlab-shell-autostart-netshell): New option.
(matlab-netshell-active-p, matlab-any-shell-active-p): New
(matlab-shell-send-command): New wrapper around send-string
or netshell command send.
(matlab-shell-save-and-go): Integrate matlab-netshell.
Improve finding if we need to CD somewhere.
Use 'run' to run things not on the path.
Select between netshell or regular shell.
(matlab-shell-run-region): If netshell is available, use it
to send region to MATLAB.

matlab.el:
Fix menus that need a shell.
(matlab-frame-init): For commands that need a shell, now use
`matlab-any-shell-active-p'.
2019-11-23 08:58:46 -05:00
Eric Ludlam 8296c09180 Improve network communication between Emacs & MATLAB
matlab-netshell.el:
(matlab-netshell-acc, matlab-netshell-filter):
Keep an accumulator for input from the tcp process.
Packets are seperated by \0.
Commands start, end with newline, then data follows.
Call below with found commands.
(matlab-netshell-execute-command):
Log commands recieved.
Evaluate different commands.  Implement ACK.
(matlab-netshell-sentinel):
Create buffer for newly formed network processes.
(matlab-netshell-send): Fix to send CMD,DATA, not just msg.
(matlab-netshell-eval): Send request to eval something in ML.
(matlab-netshell-ack): Send ACK request.

+emacs/@EmacsServer/EmacsServer.m
NEW.  Object to handle MATLAB state for connecting over tcp
with Emacs.
Implementation started in emacsnetshell.m
Added command parsing (same as Emacs) and command execution.
Implement ACK

emacsnetshell.m:
Remove old impl.  Use EmacsServer for core behavior.
Act as interface to object so user can send commands
via this function.
2019-11-22 17:52:39 -05:00
Eric Ludlam c0a0c7750b matlab-netshell.el, toolbox/emacsnetshell.m:
New utilities that allow MATLAB to connect to an emacs server.
Emacs can send MATLAB requests, and MATLAB will respond with the output
of executing those commands.
2019-11-18 21:55:11 -05:00