How to programmatically update node title? I would like to programmatically update some fields including the title of a node, when this node is saved.
To do so I am using a hook

function MY_MODULE_node_update($node) {
    $node-&gt;title = "Something new an beautiful";
    $node-&gt;filed_what_ever = "Something";
    field_attach_update('node', $node);
}


The problem is, that the title is not updated, I assume, that's because of the fact it isn't a field an the Drupal sense.
But I can not use 

node_save($node);


instead, because that brings me in an infinite loop: the function hook_node_update() is called by the function node_save()... So what would be a clean why to do this?
To do this, you have to use hook_node_presave(). 

It's called before saving the node to the database. (both new nodes and edits). 
Note that you must make sure that you are saving sanitized and formatted data.