From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: org-mode 7.5, save-excursion does not work in tables Date: Thu, 23 Jun 2011 11:29:16 +0200 Message-ID: <87hb7gc2vn.fsf@gilgamesch.quim.ucm.es> Reply-To: Uwe Brauer Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZgED-0003Kc-BO for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 05:29:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZgEB-00073e-3W for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 05:29:37 -0400 Received: from lo.gmane.org ([80.91.229.12]:40384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZgEA-000730-Gk for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 05:29:34 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QZgE8-0006xt-M8 for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 11:29:32 +0200 Received: from 11.pool85-54-11.dynamic.orange.es ([85.54.11.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Jun 2011 11:29:32 +0200 Received: from oub by 11.pool85-54-11.dynamic.orange.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Jun 2011 11:29:32 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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. Example --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=ex.org | 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 | |------------+---+------+---------------------------------------------------| --=-=-=--