From: Carsten Dominik <carsten.dominik@gmail.com>
To: Benjamin Beckwith <bnbeckwith@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Columnview: Fix the case of #+ content present
Date: Sun, 22 Sep 2013 08:08:53 +0200 [thread overview]
Message-ID: <A2E10110-29A5-4502-9424-82964EE69CB3@gmail.com> (raw)
In-Reply-To: <CADhi4W3zebL2MxTSNdB5tk64J5h5RUxV4oCHd2CO3QANWB0SYw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]
Applied, thank you Benjamin.
- Carsten
On 17.9.2013, at 21:13, Benjamin Beckwith <bnbeckwith@gmail.com> wrote:
> * lisp/org-colview.el (org-dblock-write:columnview): Change the
> capture of pos to after inserting the original content
>
> The problem is with a block that has content preceding the table.
> Upon recreating the content, the `pos' gets set to the beginning of
> this content instead of the table. Later calls to
> `org-table-recalculate' or `org-table-align' will fail because the
> point is not at a table.
>
> This patch moves the capture of `pos' to right before the insertion of
> the table.
>
> TINYCHANGE
> ---
> lisp/org-colview.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/org-colview.el b/lisp/org-colview.el
> index f3b8e42..8790ad4 100644
> --- a/lisp/org-colview.el
> +++ b/lisp/org-colview.el
> @@ -1306,10 +1306,10 @@ PARAMS is a property list of parameters:
> (if (eq 'hline x) x (cons "" x)))
> tbl))
> (setq tbl (append tbl (list (cons "/" (make-list nfields "<>"))))))
> - (setq pos (point))
> (when content-lines
> (while (string-match "^#" (car content-lines))
> (insert (pop content-lines) "\n")))
> + (setq pos (point))
> (insert (org-listtable-to-string tbl))
> (when (plist-get params :width)
> (insert "\n|" (mapconcat (lambda (x) (format "<%d>" (max 3 x)))
> --
> 1.8.1.2
>
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
prev parent reply other threads:[~2013-09-22 6:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 19:13 [PATCH] Columnview: Fix the case of #+ content present Benjamin Beckwith
2013-09-22 6:08 ` Carsten Dominik [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=A2E10110-29A5-4502-9424-82964EE69CB3@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=bnbeckwith@gmail.com \
--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.