Skip to content

Commit eea387a

Browse files
committed
README.org - improve the overview / getting started
With this, the start of the README.org should address the need for a getting started guide. #39
1 parent 63eff51 commit eea387a

File tree

3 files changed

+46
-14
lines changed

3 files changed

+46
-14
lines changed

README.org

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,51 @@
1414

1515
2. *Code navigation and more*
1616

17-
- [[https://github.com/mathworks/MATLAB-language-server][MATLAB Language Server]], matlabls, for code navigation, code completion, go to definition, find
18-
references, and more. See [[file:doc/matlab-language-server-lsp-mode.org][doc/matlab-language-server-lsp-mode.org]].
17+
- The [[https://github.com/mathworks/MATLAB-language-server][MATLAB Language Server]], matlabls, for code navigation, code completion, go to definition,
18+
find references, and more. matlabls is a separate special MATLAB process that Emacs
19+
communicates with. For example, when you ask Emacs to jump to the definition of a function via
20+
=M-.= or =M-x xref-find-definitions=, Emacs will ask the matlabls process where the function is
21+
located and use it's response to jump to the definition.
22+
23+
#+begin_example
24+
+-----------+ +------------+
25+
| | | |
26+
| Emacs |<==========>| matlabls |
27+
| | | |
28+
+-----------+ +------------+
29+
#+end_example
30+
31+
You need to install and setup the MATLAB Language Server to use it.
32+
See [[file:doc/matlab-language-server-lsp-mode.org][doc/matlab-language-server-lsp-mode.org]].
1933

2034
- Imenu support for quickly jumping to function declarations in the current ~*.m~ file.
2135
See [[file:doc/matlab-imenu.org][doc/matlab-imenu.org]].
2236

23-
3. *M-x matlab-shell* for running and debugging MATLAB within Emacs (Unix-only).
37+
3. *M-x matlab-shell* for running and debugging MATLAB within Emacs (Unix only).
2438

2539
- MATLAB command window errors are hyper-linked and files open in Emacs
2640
- Debugging support is available from the MATLAB menu.
2741
- matlab-shell uses company-mode for completions.
28-
- You can use Emacs TRAMP and =M-x matlab-shell= to run remote MATLAB within your local Emacs
29-
session, see [[file:doc/remote-matlab-shell.org][doc/remote-matlab-shell.org]].
3042

31-
4. *M-x matlab-netshell* for running MATLAB code on Microsoft Windows within Emacs using an attached
32-
MATLAB.
43+
See [[file:doc/matlab-shell-for-unix.org][doc/matlab-shell-for-unix.org]]
44+
45+
4. *M-x matlab-shell* to run remote Unix MATLAB within your local Emacs session.
3346

3447
#+begin_example
48+
+----------------+ +-----------------+
49+
| Local Computer | | Remote Computer |
50+
| |<===============>| |
51+
| Emacs | ssh | MATLAB |
52+
+----------------+ +-----------------+
53+
#+end_example
3554

55+
You use Emacs on your local computer to edit files on the remote computer, run and debug remote
56+
MATLAB in a matlab-shell in your local Emacs. See [[file:doc/remote-matlab-shell.org][doc/remote-matlab-shell.org]].
57+
58+
5. *M-x matlab-netshell* for running MATLAB code on Microsoft Windows within Emacs using an attached
59+
MATLAB.
60+
61+
#+begin_example
3662
+--------------- Emacs ----------------+ +------------ MATLAB ------------+
3763
| | | |
3864
| (1) M-x matlab-netshell-server-start | | (2) connect to Emacs |
@@ -41,17 +67,16 @@
4167
| "MATLAB -> Code Sections" menu | | >> |
4268
| or the key bindings | | |
4369
+--------------------------------------+ +----------------------------------+
44-
4570
#+end_example
46-
47-
5. *Code sections* support for MATLAB script files. See [[file:doc/matlab-code-sections.org][doc/matlab-code-sections.org]].
71+
72+
6. *Code sections* support for MATLAB script files. See [[file:doc/matlab-code-sections.org][doc/matlab-code-sections.org]].
4873

4974
- After visiting a MATLAB script, you have a *"MATLAB -> Code Sections"* menu and key bindings
5075
which lets you navigate, run, and move code sections.
5176

5277
- Try out code sections using: [[file:examples/matlab-sections/tryout_matlabsection.m][./examples/matlab-sections/tryout_matlabsection.m]].
5378

54-
6. *Creation of scientific papers, theses, and documents* using MATLAB and [[http://orgmode.org]].
79+
7. *Creation of scientific papers, theses, and documents* using MATLAB and [[http://orgmode.org]].
5580

5681
- Org enables [[https://en.wikipedia.org/wiki/Literate_programming][literate programming]] which directly supports reproducible research by allowing
5782
scientists and engineers to write code along with detailed explanations in natural language.
@@ -66,7 +91,7 @@
6691
- See [[file:examples/matlab-and-org-mode][./examples/matlab-and-org-mode/]] to get started. This directory contains a [[file:examples/matlab-and-org-mode/matlab-and-org-mode.pdf][PDF]] generated from
6792
[[file:examples/matlab-and-org-mode/matlab-and-org-mode.org][./examples/matlab-and-org-mode/matlab-and-org-mode.org]].
6893

69-
7. *tlc-mode* for editing ~*.tlc~ files. The Target Language Compiler (TLC) is part of Simulink®
94+
8. *tlc-mode* for editing ~*.tlc~ files. The Target Language Compiler (TLC) is part of Simulink®
7095
Coder™.
7196

7297
* Installation

doc/matlab-shell-for-unix.org

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Copyright 2025 Free Software Foundation, Inc.
77

8-
* MATLAB inside of Emacs on Unix (Linux or Mac)
8+
* Running MATLAB inside of Emacs on Unix (Linux or Mac)
99

1010
In Emacs,
1111

@@ -19,3 +19,10 @@ matlab-shell to use a specific version of MATLAB run
1919

2020
In the =*MATAB*= matlab-shell buffer, you can run MATLAB commands, debug MATLAB =*.m= files, and
2121
more. See the MATLAB menu for capabilities.
22+
23+
At the MATLAB prompt, ">>", you can TAB complete commands. matlab-shell uses company-mode for
24+
completions. For example:
25+
26+
: >> plot(a, b, 'Line<TAB>
27+
28+
will complete =Line= to =LineWidth=.

doc/remote-matlab-shell.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
* Remote M-x matlab-shell
99

10-
You can use Emacs TRAMP to run matlab-shell on a remote system.
10+
You can use Emacs [[https://www.gnu.org/software/tramp/][TRAMP]] to run matlab-shell on a remote system.
1111

1212
1. First verify you can connect to the remote system in a terminal
1313

0 commit comments

Comments
 (0)