[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-mode 7.5, save-excursion does not work in tables
From: |
Jambunathan K |
Subject: |
Re: [O] org-mode 7.5, save-excursion does not work in tables |
Date: |
Thu, 23 Jun 2011 16:31:33 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) |
> 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 |
> |------------+---+------+---------------------------------------------------|
--