# libtmux:move-window

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/placement.lisp#L53
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-move-window/

```
(move-window client source-link session index &key (detached t) (observe t) cancel-token timeout output-limit)
```

Move SOURCE-LINK into SESSION at the free INDEX; return a COMMAND-OUTCOME.
Other links to the physical window survive. Removing a session's last link can
destroy that session, following tmux semantics. OBSERVE supplies the destination
link. DETACHED defaults true; occupied indexes are never overwritten. Signals
STALE-TARGET or an operational condition; older link observations stay unchanged.

## Parameters

- `client`
- `source-link`
- `session`
- `index`
- `detached?`
- `observe?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `move-window`.

- [`move-window`](/en/tmux/latest/manual/move-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_move_window_entry`](/en/tmux/latest/reference/c-variable-cmd_move_window_entry/) (attribute)
- [`cmd_move_window_exec`](/en/tmux/latest/reference/c-function-cmd-move-window-c-cmd_move_window_exec/) (function)

## Guides

Pages that discuss `move-window`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
