(matlab-shell-history-ignore): New customizable variable.
(matlab-shell-version-scrape): Update version regex to include prerelease.
Add config for `comint-input-history-ignore' to ignore stuff
sent by Emacs to ML.
(matlab-shell-version-scrape): Change where we remove ourselves from
comint-filter-functions to avoid any leftovers if there is an error.
(matlab-shell-capture-text): Fix error msg when evaluating forms.
Used wrong variable previously.
(matlab-shell-capture-text): Move the evaluation of forms,
or the display of the help buffer outside the
outermost save-excursion. This allows these commands to reposition
point in different buffers.
(matlab-shell-startup-command): Use defcustom instead of
defvar.
(matlab-shell-run-region-cmd): New
(matlab-shell-run-region-internal): Use above for cmd instead
of hard coded value.
(matlab-shell-emacsclient-command): Change default to use
output from `matlab-find-emacsclient'.
(matlab-shell--get-emacsclient-command):
Add docstring.
Added windows capability - adding internal quotes to match
up with the quotes added by ML on windows.
(matlab-shell-first-prompt-fcn): Call emacsinit with 'run'.
Emacsinit will now set the path and rehash.
Use emacs.set for setting up other features.
toolbox/emacsinit.m:
Take no inputs - need to be used via `run'.
Remove stuff now in toolbox/+emacs/set.m for setting up emacsclient.
Remove stuff related to inputs. Only create netshell if not in Emacs.
(matlab-shell-error-anchor-expressions): Update to also deal with
output from dbup/down "workspace belonging to" flavor text.
(matlab-shell-render-errors-as-anchor): Trim file name string.
(matlab-shell-capture-text): Protect when running forms from MATLAB.
Allow spaces in front of Error text.
Needed for Errors that are captured, and posted later indented.
(matlab-shell-error-anchor-expression):
Allow spaces in front of error anchor.
Improve performance of processing massive error stacks.
(matlab-shell-in-process-filter): New state variable.
(matlab-shell-wrapper-filter): Bind above to t inside body of filter.
(matlab-shell-mref-which-fcn): Do not process file names if in a process filter.
Allow MATLAB to tell Emacs what to do.
(matlab-shell-capture-text): After capture, if buffername has special value 'eval'
then read the forms, and evaluate them instead of pushing into a buffer.
(matlab-help-map, matlab-frame-init):
Remove references to topic browsers.
matlab-shell.el:
(easy-menu-define, matlab-shell-mode):
Remove references to topic browsers.
(matlab-shell): Add capture text to prompt-appears hook.
(matlab-shell-capturetext-*-text): New regexp
(matlab-shell-capture-text): New filter fcn that captures
anything between start/end and shows in a buffer.
(matlab-shell-describe-command): Add -emacs flag when calling help.
matlab-topic.el:
Remove topic browsing mode.
(matlab-shell-topic-mode-hook, matlab-shell-topic-current-topic)
(matlab-shell-topic-browser, matlab-shell-topic-mode-menu)
(matlab-shell-topic-mode, matlab-shell-topic-mode-menu)
(matlab-shell-topic-browser-create-contents):
Delete
(matlab-shell-topic-click -> matlab-shell-help-click): rename
(matlab-shell-topic-choose -> matlab-shell-help-choose): rename
(matlab-shell-topic-mouse-highlight-subtopics ->
matlab-shell-help-mouse-highlight-subtopics): Rename
(matlab-shell-help-choose): downcase found text, always
use *-describe-command.
toolbox/help.m:
New function to shadow system help.
Wrap output of system help in capture text cookies.
Factor out matlab-shell-gud.el -> gud support is seperate.
Move stuff around so things make a little more sense.
(matlab-shell-enable-gud-flag): Remove. Always enable.
(matlab-shell-mode, matlab-shell): Move content between these
two functions. Keep settings and keybindings in the mode,
move filters and such in matlab-shell.
Delete gud content, call to matlab-shell-gud-* fcns instead.
Stop asking to use gud, just do it.
(matlab-shell-wrapper-filter): Adopt the garbage filter from
the gud filter.
Always call gud-filter.
(matlab-shell-wrapper-sentinel): Always call gud-sentinel.
Make sure buffer is set correctly.
(gud-matlab-*): Move to matlab-shell-gud.el
Fix matlab-shell-locate-fcn and fix spelling errors.
matlab-shell.el:
(matlab-shell-mode-map): Change C-c. keybinding to do matlab-shell-locate-fcn.
(matlab-shell-locate-fcn): New.
(matlab-find-file-under-path, matlab-find-file-on-path):
Deleted.
matlab.el:
(matlab-mode-map): Change binding of C-c. to do matlab-shell-locate-fcn
(matlab-frame-init): Change menu binding as with keybinding above.
(matlab-shell-run-region-internal): Reduce end by 1 char to match
how MATLAB does indexing of regions.
Check for DOS encoded files. If it is, add charts to start & end to match
the number of CRs. (DOS files have CRLF endings, not just LF endings.)
Add support for debugging & the test harness.
(matlab-shell-io-testing): New.
(gud-matlab-marker-filter): When sending dbhotlink
command, force an echo if the subprocess isn't echoeing.
Print IO state if io testing is on.
(matlab-on-empty-prompt-p): Force to shell buffer before test.
(matlab-on-debug-prompt-p): New (used in tests.)
(matlab-shell-send-string): message io if iotesting is on.
(matlab-shell-class-mref-to-file): First split input on >
to strip off local functions, then continue as before.
(matlab-shell-mref-to-filename): Operate only in the MATLAB shell buffer.
Convenience for debugging.
tests/mstest.el:
Add point for testme(true) - error in local fcn.
Fix some line numbers.
tests/+eltest/+utils/testme.m:
Add error in local fcn option.
(matlab-shell-error-face): Face used to colorize errors in MATLAB shell.
(matlab-shell-mode): Add prompt hook to colorize errors.
(matlab-shell-errortext-start-text, matlab-shell-errortext-end-text): New.
(matlab-shell-colorize-errors): New.
Scans for errortext start/end tokens, and drops an overlay on them.
(gud-matlab-marker-filter): Scan for {^H and }^H tokens, and convert
to errotext tokens. Comint finds these and erases them, but they
really indicate text distinct from other output text.
(matlab-shell-wrapper-filter): Make sure we are in the *MATLAB* buffer
when checking and running prompt hooks.
(matlab-shell-run-region): Change how display-buffer is called
to better re-use frames and windows if they are showing.
Update how filters are setup and run, and move where prompt-appears-hook is created.
Setup several new prompt-appears hook fcns for initializing the process instead of comint filter fcns.
Improve how errors are scanned.
(matlab-shell-errorscanning-syntx-table): New syntax table where \n is whitespace.
(matlab-shell-prompt-hook-cookie): New, used to pass prompt appear status.
(matlab-shell-suppress-prompt-hooks): New
(matlab-shell-cco-testing): New
(matlab-shell-mode): Move our comint hooks to be local.
Add new prompt-appear-hook to a first-prompt-fcn, and also for render-errors-as-anchor.
(matlab-shell): Remove GUD process filter and sentinel.
Add our own matlab-shell-wrapper-* filter and sentinel.
(matlab-shell-wrpper-filter): New.
Calls out to GUD, and calls matlab-shell-prompt-appears-hook when
matlab-shell-prompt-hook-cookie is true.
(matlab-shell-wrapper-sentinel): New.
(matlab-shell-render-html-anchor):
Use matlab-shell-errorscanning-syntax-table.
(matlab-shell-error-anchor-expression, matlab-shell-error-location-expression):
Update spaces to be \s- to overcome newlines.
(matlab-shell-scan-for-error): Use errorscanning syntax table.
(matlab-shell-render-errors-as-anchor): Minor comment/doc cleanup.
Put full file in help-echo.
(matlab-shell-first-prompt-fcn, matlab-shell-user-startup-fcn): NEW
Contents was from `gud-matlab-marker-filter'. Setup matlab for first
time by running emacsinit, and user's init code.
(matlab-shell-second-prompt-fcn): New. Set's prompt-seen.
(gud-matlab-marker-filter): Remove emacsinit setup for MATLAB, and other content
that moved to matlab-shell-first-prompt-fcn.
Turn off beeps.
Stop running matlab-shell-prompt-appears-hook, and instead just set the cookie.
(matlab-shell-collect-command-output): suppress prompt hooks.
Enable timeouts if we wait too long.
(matlab-shell-mref-which-fcn): Disable when cco testing.
(matlab-find-other-window-file-line-column): Stop using goto-line (as per doc)
and use forward line isntead. Cleans up spurious 'set mark' text during test.
Enable testing harness, and MATLAB running under a pipe insted of pty.
(matlab-shell-render-errors-as-anchor): Make sure that the
full file (from the mref expander) succeeds before using it.
(matlab-shell-matlabroot-run): New variable.
(matlab-shell-matlabroot): Use cache
(matlab-shell-collect-command-output): Enable when using pipe
instead of pty. In this case the process doesn't echo, so
we compute bounds of result differently.
Use computations instead of movement to id bounds of captured output.
(matlab-shell-mref-which-fcn): Wrapper around `matlab-shell-mref-which-fcn'
to prevent errors. (ie - allow it to just return nil).
(matlab-shell-mref-converters): Use above.
Make finding errors more robust.
(matlab-shell-render-errors-as-anchor):
Compute actual full file here, and store on the URL instead of using
the matlab reference name.
Improve behavior of return key in this preceeding history text of the shell.
(matlab-shell-mode):
Set comint-get-old-input to below.
(matlab-comint-get-old-input): New.
Only return text to evauate if it was on a prompt before.
(matlab-find-other-window-file-line-column):
If input file fails to translate into a file name, issue a descriptive
error instead of passing nil to find-file-other-window.
Improve error highlighting.
(matlab-shell-render-errors-as-anchor): Fix scanning for the first error
in a session.
(matlab-shell-class-mref-to-file): Add fcn-p flag.
When t, convert to a function name in a package.
(matlab-shell-mref-converters): Add expression to
match functions in a package.
tests/+eltest/+utils/testme.m:
New function in a package that throws an error.
Initialize netshell on regular shell startup based on config.
(matlab-shell): Fix netshell server start (don't do it twice.)
(matlab-shell-render-errors-as-anchor): Fix bug if no errors in shell yet.
(gud-matlab-marker-filter): When sending emacsinit command,
also send netshell start command if configured to do so.
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'.
Fixup error parsing and file finding to support classes.
(matlab-shell-render-errors-as-anchor):
Fix how last-anchor is tracked.
(matlab-shell-class-mref-to-file):
New converter. Takes package.class/method and converts to the
file +package/@class/class.m
(matlab-shell-mref-converters): Add above.