Commit Graph

21 Commits (0c8b0548388380a4f98db9c440998642639c6258)

Author SHA1 Message Date
Allard Hendriksen 0c8b054838 Centralize shell-command-to-string executions of tmux 2018-07-16 13:49:36 +02:00
Allard Hendriksen 40dfabed82 Centralize tmux execution points
Now, org-babel-tmux-location is correctly used everywhere.
2018-07-16 13:13:49 +02:00
Allard Hendriksen ba76074ffa Add option to set a default window name
If net set by the user, the first window will not be named "1" by
default anymore.
2018-07-16 12:16:25 +02:00
Allard Hendriksen 0b09770835 Fix parameter name: consistency
I want to use org-session as parameter when it expects the org-session
as typed in to an org document. The terms 'session', 'window', and
'target' should remain reserved for tmux sessions, windows, and
targets respectively.
2018-07-16 12:16:25 +02:00
Allard Hendriksen 9b9c578c95 Fix inconsistency bug in create-window and send-keys
Previously, if you had two sessions and wanted to target by index, a
new window would be created with the index as name. Nonetheless, the
command body would be sent to the window with the target index.

Test case:
echo hoi

echo hoi :session bug:=2 && date

Expected behaviour: date shows up on bug:b. no new window is created.

Actual behaviour: date shows up on bug:b. new window bug:"2" is
created.

Now the date shows up on bug:b and no new window is created.
2018-07-16 12:16:03 +02:00
Allard Hendriksen 26f738b8f9 Start in home directory without extra slashes 2018-07-16 10:42:06 +02:00
Allard Hendriksen 5ccf47725e Disable window renaming from within tmux
Session renaming would frustrate sessions where you would SSH into
some machine and then no be able to use ob-tmux anymore to control the
session.
2018-07-16 10:41:00 +02:00
Allard Hendriksen c8ee803a5f Send strings literally
When a command in the tmux source code block ended with a semi-colon,
it was previously ignored. Now we send the keys with the -l option to
send the line literally.
2018-04-19 10:49:41 +02:00
Allard Hendriksen 43f815da1c Fix bug in org-babel-prep-session:tmux
It did not set process-name correctly.
2018-04-19 10:49:21 +02:00
Allard Hendriksen 4cc0c89501 Add shell-mode syntax highlighting
Also C-c ' now opens a side buffer to edit the code block in
shell-mode.
2018-03-19 09:02:06 +01:00
Allard Hendriksen 510b5f4fee Improve README.org
- Spelling improvements
- Add syntax highlighting to configuration
- Improve wording where needed.
2018-01-11 23:39:44 +01:00
Allard Hendriksen c6d716a53c Change README to org format
Move from markdown to org mode. Seems more appropriate. I hope github
supports all the syntax.
2018-01-11 23:14:24 +01:00
Allard Hendriksen f75eb08f0c Remove :cmd support
It was not used and tmux has sensible defaults. I think it defaults to
bash now.
2018-01-11 22:20:40 +01:00
Allard Hendriksen d4752b9ec1 Add xterm support 2018-01-11 22:19:44 +01:00
Allard Hendriksen 1443272963 Clean up code
Separate session creation from starting the terminal window.
2018-01-11 21:46:52 +01:00
Allard Hendriksen beacdb5ffc Add support for tmux windows
It is now possible to create multiple windows in the same
session. One can write, for example,

echo boom

echo done

This will open up a terminal window with one tmux session, named
'hello', and two windows, named 'boom' and 'done'.
2018-01-09 09:56:18 +01:00
Allard Hendriksen d5deb53751 Implement org-babel-tmux-test
Tests the tmux functionality. Also solves some problems in the
original implementation where the temp file would be read directly
after creation, i.e. before the random string could be written to the
file.
2018-01-05 15:01:27 +01:00
Allard Hendriksen f7fd2b2301 Improve shell string escaping
Previously, some characters would be escaped by the shell before being
sent to tmux. Now, I believe this has been solved.
2018-01-05 14:24:43 +01:00
Allard Hendriksen 862d1d21b7 Update copyright statement 2018-01-03 21:06:41 +01:00
Allard Hendriksen 32717a5001 Add README 2018-01-02 19:06:43 +01:00
Allard Hendriksen 0619483254 Initial commit 2018-01-02 18:58:25 +01:00