# tmux_buffer:paste/3

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_buffer.erl#L167
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_buffer-paste-3/

```
paste(Pane, Buffer, Options)
-spec paste(tmux_model:pane(), target(), paste_options()) ->
               {ok, tmux_operation:completed()} |
               {error, map()}.
```

Send a named buffer or latest to a registered pane. Defaults preserve payload bytes: LF separators and unsanitized input. On tmux 3.7+, raw paste uses -S; sanitize=true selects its safe print encoding. Earlier releases reject that request with unsupported_capability before dispatch.

separator is NUL-free; delete removes the buffer after the native paste call.
bracketed adds markers only if the target has enabled that terminal mode.
Native input-off/dead-pane behavior still applies. Completion establishes the
tmux command result, not consumption by the child. No automatic retry occurs.

## Parameters

- `Pane` (`tmux_model:pane()`)
- `Buffer` (`target()`)
- `Options` (`paste_options()`)

## tmux command

The tmux commands behind `paste/3`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_paste_buffer_entry`](/en/tmux/latest/reference/c-variable-cmd_paste_buffer_entry/) (attribute)
- [`cmd_paste_buffer_exec`](/en/tmux/latest/reference/c-function-cmd-paste-buffer-c-cmd_paste_buffer_exec/) (function)

## Guides

Pages that discuss `paste/3`.

- [Preserve byte buffers and paste deliberately](/en/erlang/latest/guides/buffers/)

## In other ports

Paste a buffer into a pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.paste_buffer`](/en/py/latest/reference/libtmux-pane-paste_buffer/) (method) |
| Lua | [`libtmux.Pane:paste_buffer`](/en/lua/latest/reference/libtmux-pane-paste_buffer/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.pasteBuffer`](/en/ts/latest/reference/pane-pane-pastebuffer/) (method) |
| Rust | [`pane.Pane.paste_buffer`](/en/rs/latest/reference/pane-pane-paste_buffer/) (method) |
| Go | [`tmux.Pane.PasteBuffer`](/en/go/latest/reference/tmux-pane-pastebuffer/) (method) |
| Java | [`io.github.libtmux.Pane.pasteBuffer`](/en/java/latest/reference/io-github-libtmux-pane-pane-pastebuffer/) (method) |
| C# | [`LibTmux.Pane.PasteBufferAsync`](/en/csharp/latest/reference/libtmux-pane-pastebufferasync/) (method) |
| C++ | [`libtmux::Pane::paste`](/en/cxx/latest/reference/libtmux-pane-paste/) (method) |
| Swift | [`Server.paste(buffer:into:)`](/en/swift/latest/reference/server-paste(buffer-into-)/) (method) |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
