org-colview: fix heading retrieval in Org buffers

* lisp/org-colview.el (org-columns-display-here): Fix heading retrieval in
Org buffers.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2011-03-18 17:36:18 +01:00
parent c01c2ad035
commit 7dc1f1a973
1 changed files with 11 additions and 2 deletions

View File

@ -186,8 +186,17 @@ This is the compiled version of the format.")
title (nth 1 column) title (nth 1 column)
ass (if (equal property "ITEM") ass (if (equal property "ITEM")
(cons "ITEM" (cons "ITEM"
;; When in a buffer, get the whole line,
;; we'll clean it later…
(if (org-mode-p)
(save-match-data
(org-no-properties (org-no-properties
(org-get-at-bol 'txt))) (org-remove-tabs
(buffer-substring-no-properties
(point-at-bol) (point-at-eol)))))
;; In agenda, just get the `txt' property
(org-no-properties
(org-get-at-bol 'txt))))
(assoc property props)) (assoc property props))
width (or (cdr (assoc property org-columns-current-maxwidths)) width (or (cdr (assoc property org-columns-current-maxwidths))
(nth 2 column) (nth 2 column)