A method of maintaining undo/redo capabilities across metadata merges in a document that is co-authored at a client computer , the method comprising: modifying , at the client computer , a first section of a document on a word processing application on the client computer , the modifying a first section of a document comprising performing one or more user actions in the first section of the document; while modifying the first section of the document, receiving a metadata lock, at the client computer , for a second section of the document, the second section of the document being different than the first section of the document; after receiving the metadata lock for the second section of the document, inserting the metadata lock in the second section of the document, wherein the metadata lock prevents a coauthoring user on the client computer from editing the second section of the document; storing the metadata lock in a program stack on the client computer; and after the metadata is inserted in the second section of the document, performing an undo operation on the word processing application, wherein the undo operation includes the steps of: removing the metadata lock, at the client computer , for the second section of the document from the program stack and storing the metadata lock in a memory area of the client computer that is different from the program stack; undoing the last user action of the one or more user actions in the first section of the document by removing the last user action from the program stack; and restoring the metadata lock on the program stack. modifying , at the client computer , a first section of a document on a word processing application on the client computer , the modifying a first section of a document comprising performing one or more user actions in the first section of the document; while modifying the first section of the document, receiving a metadata lock, at the client computer , for a second section of the document, the second section of the document being different than the first section of the document; after receiving the metadata lock for the second section of the document, inserting the metadata lock in the second section of the document, wherein the metadata lock prevents a coauthoring user on the client computer from editing the second section of the document; storing the metadata lock in a program stack on the client computer; and after the metadata is inserted in the second section of the document, performing an undo operation on the word processing application, wherein the undo operation includes the steps of: removing the metadata lock, at the client computer , for the second section of the document from the program stack and storing the metadata lock in a memory area of the client computer that is different from the program stack; undoing the last user action of the one or more user actions in the first section of the document by removing the last user action from the program stack; and restoring the metadata lock on the program stack. removing the metadata lock, at the client computer , for the second section of the document from the program stack and storing the metadata lock in a memory area of the client computer that is different from the program stack; undoing the last user action of the one or more user actions in the first section of the document by removing the last user action from the program stack; and restoring the metadata lock on the program stack. <EOS>