summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2013-09-22 08:07:58 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2013-09-22 08:07:58 +0200
commita1a0acc20409fead50672c70416e7597bb55470f (patch)
treebf975ea131ca70881e4390510f1c5b0be9da38c7
parent2c5fbb19cff87baec09dbd2cc5bbe969ff8c1189 (diff)
downloadorg-mode-a1a0acc20409fead50672c70416e7597bb55470f.tar.gz
Columnview: Fix the case of #+ content present
* 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 Patch by Benjamin Beckwith
-rw-r--r--lisp/org-colview.el2
1 files changed, 1 insertions, 1 deletions
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)))