Next: Tree-buffer keybindings, Previous: A new tree-node, Up: tree-buffer [Contents][Index]

#### 11.3.4 How to update a tree-buffer-display after changes

When finished with adding tree-nodes to the tree-structure you mostly want to display the current tree and its state in the buffer/window so a user can see the current tree and can use it.

Threre are two ways to update a tree-buffer for display:

1. Updating the whole tree-buffer:

   This is the most used way to update the tree-buffer display. It’s quite simple, just call `tree-buffer-update`. In most cases you want to call it without arguments.

   If you want to display a certain expanded node and as much as possible subnodes of this node then pass this node-object as first argument to `tree-buffer-update`.

   If you do not have the need to display a completely new tree-structure but you want only to display a previously cached display-state then pass this cached-state as second argument to `tree-buffer-update`. See the documentation of this function and also Tree-buffer How to for a detailled description how to do this.

2. Updating only a single node of the tree-buffer:

   Sometimes it can be useful to update only exactly one special node, e.g. when your application codes some node-state in the displayed node-name (e.g. ECB displays the version-control state of a file as part of the related node-name) then it is necessary to update only this node if the state has changed.

   This can be done with the function `tree-buffer-update-node`. For this function the mentioning in this section can be misleading because this function can not only update the node-display but in general the slots NAME, SHRINK-NAME, TYPE, DATA and EXPANDABLE. Do `C-h f` to see the documentation of this function for all details!

Next: Tree-buffer keybindings, Previous: A new tree-node, Up: tree-buffer [Contents][Index]