From 3100838dcc24097c5bc3eb3b2f96c378555e053d Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 18 Aug 2011 09:14:44 +0200 Subject: [PATCH] org-colview.el: Correctly remove leading stars. * org-colview.el (org-columns-cleanup-item): Correctly remove leading stars in items displayed in the agenda column view. Thanks to Christian Schmidt for spotting this. --- lisp/org-colview.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index f0585193c..7db4fec96 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -347,7 +347,7 @@ CPHR is the complex heading regexp to use for parsing ITEM." (let (fixitem) (if (not cphr) item - (unless (string-match "\*+ " item) + (unless (string-match "^\*+ " item) (setq item (concat "* " item) fixitem t)) (if (string-match cphr item) (setq item @@ -361,8 +361,8 @@ CPHR is the complex heading regexp to use for parsing ITEM." (add-text-properties 0 (1+ (match-end 1)) (list 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1)))))) - item) - (if fixitem (replace-regexp-in-string "^\*+ " "" item) item))))) + item)) + (if fixitem (replace-regexp-in-string "^\*+ " "" item) item)))) (defun org-columns-compact-links (s) "Replace [[link][desc]] with [desc] or [link]."