# tmux_server:bind/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_server.erl#L350
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_server-bind-2/

```
bind(Server, Row)
-spec bind(t(), tmux_model:row()) ->
              {ok, tmux_model:row()} | {error, map()}.
```

Explicitly read current fields from this server and register the new value. For sessions, physical windows and panes, the read uses the stable ID and discards the supplied field observations. This explicit call accepts an edited target; ordinary actions require its captured target association to match and reject mismatches before dispatch. The returned row carries a new private observation association; see `m:tmux_model`. It provides no atomic identity check. Window-link binding checks its session/index and expected physical window. A replaced or missing membership returns stale_link. This observed preflight does not make a later action atomic.

Invalid rows are rejected before I/O:

## Examples

```erlang
1> tmux_server:bind(invalid_server, invalid_row).
{error,#{code => invalid_row,path => []}}
```

## Parameters

- `Server` (`t()`)
- `Row` (`tmux_model:row()`)

## Guides

Pages that discuss `bind/2`.

### Concepts

- [Architecture decisions](/en/erlang/latest/concepts/architecture/)
- [Object graph](/en/erlang/latest/concepts/object-graph/)

### Guides

- [Build commands before running them](/en/erlang/latest/guides/commands/)
- [Support and remaining gaps](/en/erlang/latest/guides/compatibility/)
