# paste_set

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L256
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-paste_set/

```c
int paste_set(char *data, size_t size, const char *name, char **cause)
```

## Parameters

- `data` (`char *`)
- `size` (`size_t`)
- `name` (`const char *`)
- `cause` (`char **`)

## Called by

- [`cmd_capture_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L236)
- [`cmd_load_buffer_done`](/en/tmux/3.2a/reference/c-function-cmd-load-buffer-c-cmd_load_buffer_done/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-load-buffer.c#L73)
- [`cmd_set_buffer_exec`](/en/tmux/3.2a/reference/c-function-cmd-set-buffer-c-cmd_set_buffer_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-set-buffer.c#L117)
- [`window_copy_append_selection`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_append_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L4171)

## Calls

- [`paste_add`](/en/tmux/3.2a/reference/c-function-paste_add/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L268)
- [`paste_free`](/en/tmux/3.2a/reference/c-function-paste_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L291)
- [`xmalloc`](/en/tmux/3.2a/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L278)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L274)

## Other function references

- [`paste_get_name`](/en/tmux/3.2a/reference/c-function-paste_get_name/) (function)

## Referenced declarations

- [`paste_buffer.automatic`](/en/tmux/3.2a/reference/c-struct-paste_buffer-automatic/) (attribute)
- [`paste_buffer.created`](/en/tmux/3.2a/reference/c-struct-paste_buffer-created/) (attribute)
- [`paste_buffer.data`](/en/tmux/3.2a/reference/c-struct-paste_buffer-data/) (attribute)
- [`paste_buffer.name`](/en/tmux/3.2a/reference/c-struct-paste_buffer-name/) (attribute)
- [`paste_buffer.order`](/en/tmux/3.2a/reference/c-struct-paste_buffer-order/) (attribute)
- [`paste_by_name`](/en/tmux/3.2a/reference/c-variable-paste-c-paste_by_name/) (attribute)
- [`paste_by_time`](/en/tmux/3.2a/reference/c-variable-paste-c-paste_by_time/) (attribute)
- [`paste_next_order`](/en/tmux/3.2a/reference/c-variable-paste-c-paste_next_order/) (attribute)
- [`paste_buffer.size`](/en/tmux/3.2a/reference/c-struct-paste_buffer-size/) (attribute)
