> Hello > > I want a simple function which allows me to insert a new row > before I wrap a region. (Because otherwise rows which > already contain information get disordered.) > > Like > > (defun my-org-wrap-cell () > (interactive) > (save-excursion > (progn > (org-table-insert-row 1) > (org-table-wrap-region nil)))) > > However the save excursion does not work: the cursor even jumps > outside the table.
Have you looked at markers? http://www.gnu.org/s/emacs/manual/html_node/elisp/Markers.html#Markers Basicall you will put a marker, prettify the buffer, jump to the marker and free it. M-x apropos RET marker shows a bunch of files (including org) that use markers. > > Example > > > | Nombre | | Qual | Comment | > | Jim Miller | | | % Some very long text: UB:23.06.2011 Wrong: instead > | of t use the third component of the vecto | > | John Smith | | | Not much | > |------------+---+------+-----------------------------------------------------------------------------------------------| > > The wrap function does this > | Nombre | | Qual | Comment | > | Jim Miller | | | % Some very long text: UB:23.06.2011 Wrong: | > | John Smith | | | instead of t use the third component of the vecto > | Not much | > |------------+---+------+------------------------------------------------------------| > > Instead of > > > | Nombre | | Qual | Comment | > | Jim Miller | | | % Some very long text: UB:23.06.2011 Wrong: | > | | | | instead of t use the third component of the vecto | > | John Smith | | | Not much | > |------------+---+------+---------------------------------------------------| --