# libtmux:load-buffer

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/buffers.lisp#L99
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-load-buffer/

```
(load-buffer client path &key name cancel-token timeout output-limit)
```

Load a file's bytes into a literal named or automatic buffer; return an outcome.
PATH is literal path text, not a format. Relative paths follow the tmux command
client's cwd. An empty file is tmux's no-op and preserves an existing buffer.
New names reject backslashes, ASCII controls and DEL before I/O.
Use SET-BUFFER for in-memory bytes. Signals INVALID-ARGUMENT or an operational
condition; a failure after dispatch may have an uncertain outcome.

## Parameters

- `client`
- `path`
- `name?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `load-buffer`.

- [`load-buffer`](/en/tmux/latest/manual/load-buffer/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_load_buffer_entry`](/en/tmux/latest/reference/c-variable-cmd_load_buffer_entry/) (attribute)
- [`cmd_load_buffer_exec`](/en/tmux/latest/reference/c-function-cmd-load-buffer-c-cmd_load_buffer_exec/) (function)

## Guides

Pages that discuss `load-buffer`.

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