# libtmux:next-window

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

```
(next-window client session &key activity (observe t) cancel-token timeout output-limit)
```

Select SESSION's next window link; return a COMMAND-OUTCOME.
ACTIVITY restricts selection to windows with an alert. OBSERVE supplies the
newly captured active link through OUTCOME-VALUE, or records an observation
failure separately. Signals STALE-TARGET or an operational condition.

## Parameters

- `client`
- `session`
- `activity?`
- `observe?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `next-window`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_next_window_entry`](/en/tmux/latest/reference/c-variable-cmd_next_window_entry/) (attribute)
- [`cmd_select_window_exec`](/en/tmux/latest/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function)

## Guides

Pages that discuss `next-window`.

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