# paste_rename

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L203
- **Page:** https://libtmux.org/en/tmux/latest/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/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#L99)

## Calls

- [`clean_name`](/en/tmux/latest/reference/c-function-clean_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L222)
- [`notify_paste_buffer`](/en/tmux/latest/reference/c-function-notify_paste_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L256)
- [`paste_free`](/en/tmux/latest/reference/c-function-paste_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L243)
- [`paste_get_name`](/en/tmux/latest/reference/c-function-paste_get_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L229)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L225)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L213)

## Referenced declarations

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