emacs-orgmode@gnu.org archives
 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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).