# paste_rename

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

```c
int paste_rename(const char *oldname, const char *newname, char **cause)
```

## Parameters

- `oldname` (`const char *`)
- `newname` (`const char *`)
- `cause` (`char **`)

## Called by

- [`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#L89)

## Calls

- [`paste_get_name`](/en/tmux/3.2a/reference/c-function-paste_get_name/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L223)
- [`xasprintf`](/en/tmux/3.2a/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L226)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/paste.c#L214)

## Referenced declarations

- [`paste_buffer.automatic`](/en/tmux/3.2a/reference/c-struct-paste_buffer-automatic/) (attribute)
- [`paste_buffer.name`](/en/tmux/3.2a/reference/c-struct-paste_buffer-name/) (attribute)
- [`paste_by_name`](/en/tmux/3.2a/reference/c-variable-paste-c-paste_by_name/) (attribute)
- [`paste_num_automatic`](/en/tmux/3.2a/reference/c-variable-paste-c-paste_num_automatic/) (attribute)
