# paste_set

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L267
- **Page:** https://libtmux.org/en/tmux/latest/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/latest/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L352)
- [`cmd_load_buffer_done`](/en/tmux/latest/reference/c-function-cmd-load-buffer-c-cmd_load_buffer_done/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-load-buffer.c#L73)
- [`cmd_set_buffer_exec`](/en/tmux/latest/reference/c-function-cmd-set-buffer-c-cmd_set_buffer_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-set-buffer.c#L123)
- [`window_copy_append_selection`](/en/tmux/latest/reference/c-function-window-copy-c-window_copy_append_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L5597)

## Calls

- [`clean_name`](/en/tmux/latest/reference/c-function-clean_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L290)
- [`notify_paste_buffer`](/en/tmux/latest/reference/c-function-notify_paste_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L314)
- [`paste_add`](/en/tmux/latest/reference/c-function-paste_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L280)
- [`paste_free`](/en/tmux/latest/reference/c-function-paste_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L309)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L293)
- [`xmalloc`](/en/tmux/latest/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L297)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L286)

## Other function references

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

## Referenced declarations

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