0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 14:02:51 +00:00

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.
This commit is contained in:
Bastien Guerry 2011-08-18 09:14:44 +02:00
parent 9f337ee06c
commit 3100838dcc

View file

@ -347,7 +347,7 @@ CPHR is the complex heading regexp to use for parsing ITEM."
(let (fixitem) (let (fixitem)
(if (not cphr) (if (not cphr)
item item
(unless (string-match "\*+ " item) (unless (string-match "^\*+ " item)
(setq item (concat "* " item) fixitem t)) (setq item (concat "* " item) fixitem t))
(if (string-match cphr item) (if (string-match cphr item)
(setq item (setq item
@ -361,8 +361,8 @@ CPHR is the complex heading regexp to use for parsing ITEM."
(add-text-properties (add-text-properties
0 (1+ (match-end 1)) 0 (1+ (match-end 1))
(list 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1)))))) (list 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1))))))
item) item))
(if fixitem (replace-regexp-in-string "^\*+ " "" item) item))))) (if fixitem (replace-regexp-in-string "^\*+ " "" item) item))))
(defun org-columns-compact-links (s) (defun org-columns-compact-links (s)
"Replace [[link][desc]] with [desc] or [link]." "Replace [[link][desc]] with [desc] or [link]."