Tmux REPL 'no such command' error and can't send text

Hello, I am not having success with the tmux REPL commands. I get an error message when I create the REPL (details below), and can’t send text to it. Maybe it’s a bug but I haven’t used Kakoune a whole lot so I reckon it’s more likely I’m doing something wrong. Any help would be appreciated.

Here’s what I’m doing:

Open tmux:

tmux

Start Kakoune:

kak temp.py

In Kakoune, try to open a Python REPL:

:tmux-repl-vertical python3

A new tmux pane appears, with a python3 prompt. But the Kakoune pane displays this message: 1:1: 'tmux-repl-vertical' 2:5: 'tmux-repl-impl' no such command: ''. Writing some Python code (e.g., print("hello"), selecting it and running :send-text does nothing.

Looking here kakoune/tmux.kak at master · mawww/kakoune · GitHub it seems like the command to send text to the REPL should be repl-send-text, but when I write :repl- I get no prompt for that. I get a prompt for :send-text, although Clippy says that it’s an alias for x11-send-text. That might explain why nothing is being sent to the REPL, but in that case I’m not sure how to access the appropriate send text command for tmux.

I’ve tried this with tmux-repl-horizontal and tmux-repl-window and I get the same error. I’ve also tried it with Julia instead of Python.

Version info:

$kak -version
Kakoune v2020.09.01-249-g958a9431

I removed my kakrc file to make sure something in that wasn’t causing the problem.

Thank you!

If you don’t have the command, my first guess would be you have a binary version and aren’t building from source, which is ahead of the binaries and probably has this new command?

Hi @craigmac, I was sure I had built from source but to double check I rebuilt from the same commit (Avoid non-POSIX ln -r switch · mawww/kakoune@958a943 · GitHub). I now have two kak executables, both of which have the same output for kak -version, but one of which has the problems I described above and the other of which works perfectly. Not sure what went wrong the first time but it seems to be resolved. Thank you for your help!

1 Like

Just in case anyone else ever runs into this problem: the specific issue was that ~/.local/share/kak/rc and ~/.local/share/kak/autoload/rc were out of date, presumably from an earlier install. Installing kak with PREFIX=$HOME/.local make install was updating the other directories in ~/.local/share/kak but not those. Removing ~/.local/share/kak completely before installing fixed the problem.

If you’re building from the git repo, you don’t need to actually make install: you can just symlink src/kak.opt into ~/.local/bin/kak (or somewhere else on your $PATH), and symlink rc/ into ~/.config/kak/autoload and then they’ll automatically be up-to-date whenever you git pull && make the Kakoune repo, no additional steps required.

2 Likes

@Screwtapello Neat, thank you for the tip!