all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-mode 7.5, save-excursion does not work in tables
@ 2011-06-23  9:29 Uwe Brauer
  2011-06-23 11:01 ` Jambunathan K
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Brauer @ 2011-06-23  9:29 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

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 


[-- Attachment #2: ex.org --]
[-- Type: text/plain, Size: 1272 bytes --]


| 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                                          |
|------------+---+------+---------------------------------------------------|

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-23 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23  9:29 org-mode 7.5, save-excursion does not work in tables Uwe Brauer
2011-06-23 11:01 ` Jambunathan K

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.