From 50701702a646064034eb4fc718862aa8b7f53bcd Mon Sep 17 00:00:00 2001 From: Ippei FURUHASHI Date: Wed, 2 May 2012 05:23:00 +0900 Subject: [PATCH] lisp/org-colview.el: add new param of format to columnview dblock * lisp/org-colview.el (org-dblock-write:columnview): Add a new param, :format which specifies the column view format to be output as columnview dynamic block. One can generate columnview dynamic block with chosen format: #+BEGIN: columnview :format "%6TODO %66ITEM(Task) %6Effort(Estim.){:}" #+END: TINYCHANGE --- lisp/org-colview.el | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index c7b5d45..d3fb601 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1229,13 +1229,16 @@ (defun org-dblock-write:columnview (params) :vlines When t, make each column a colgroup to enforce vertical lines. :maxlevel When set to a number, don't capture headlines below this level. :skip-empty-rows - When t, skip rows where all specifiers other than ITEM are empty." + When t, skip rows where all specifiers other than ITEM are empty. +:format When a non-nil string like \"%66ITEM(Task) %6Effort(Estim.){:}\", + it specifies the format of column view." (let ((pos (move-marker (make-marker) (point))) (hlines (plist-get params :hlines)) (vlines (plist-get params :vlines)) (maxlevel (plist-get params :maxlevel)) (content-lines (org-split-string (plist-get params :content) "\n")) (skip-empty-rows (plist-get params :skip-empty-rows)) + (columns-fmt (plist-get params :format)) (case-fold-search t) tbl id idpos nfields tmp recalc line id-as-string view-file view-pos) @@ -1265,7 +1268,7 @@ (defun org-dblock-write:columnview (params) (save-restriction (widen) (goto-char (or view-pos (point))) - (org-columns) + (org-columns columns-fmt) (setq tbl (org-columns-capture-view maxlevel skip-empty-rows)) (setq nfields (length (car tbl))) (org-columns-quit)))) -- 1.7.9.msysgit.0