all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: org-mode 7.5, save-excursion does not work in tables
Date: Thu, 23 Jun 2011 11:29:16 +0200	[thread overview]
Message-ID: <87hb7gc2vn.fsf@gilgamesch.quim.ucm.es> (raw)

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

             reply	other threads:[~2011-06-23  9:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  9:29 Uwe Brauer [this message]
2011-06-23 11:01 ` org-mode 7.5, save-excursion does not work in tables Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hb7gc2vn.fsf@gilgamesch.quim.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.