From: Jambunathan K <kjambunathan@gmail.com>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-mode 7.5, save-excursion does not work in tables
Date: Thu, 23 Jun 2011 16:31:33 +0530 [thread overview]
Message-ID: <81tybgizg2.fsf@gmail.com> (raw)
In-Reply-To: <87hb7gc2vn.fsf@gilgamesch.quim.ucm.es> (Uwe Brauer's message of "Thu, 23 Jun 2011 11:29:16 +0200")
> 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 |
> |------------+---+------+---------------------------------------------------|
--
prev parent reply other threads:[~2011-06-23 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=81tybgizg2.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=oub@mat.ucm.es \
/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.