summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Shlyakhter <ilya_shl@alum.mit.edu>2012-03-24 12:25:59 -0400
committerBastien Guerry <bzg@altern.org>2012-03-25 01:49:14 +0100
commite8337f69202bab64702bfe067711f64607794b4c (patch)
treeab6feb9b39281dc2e368037b7c94d52330fa86b7
parentec65badbaa7114e56e6510f28b744d2b9ea8115f (diff)
downloadorg-mode-e8337f69202bab64702bfe067711f64607794b4c.tar.gz
Colview bugfix: A headline with just a TODO keyword and blank headline content would crash
* lisp/org-colview.el (org-columns-cleanup-item): Handle case of empty headline * lisp/org-colview-xemacs.el (org-columns-cleanup-item): Handle case of empty headline TINYCHANGE
-rw-r--r--lisp/org-colview-xemacs.el2
-rw-r--r--lisp/org-colview.el2
2 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-colview-xemacs.el b/lisp/org-colview-xemacs.el
index ec892fe..b65aa18 100644
--- a/lisp/org-colview-xemacs.el
+++ b/lisp/org-colview-xemacs.el
@@ -516,7 +516,7 @@ This is the compiled version of the format.")
'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1))))))
(and (match-end 2) (not (assoc "TODO" fmt)) (concat " " (match-string 2 item)))
(and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item)))
- " " (save-match-data (org-columns-compact-links (match-string 4 item)))
+ " " (save-match-data (org-columns-compact-links (or (match-string 4 item) "")))
(and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item)))))
(add-text-properties
0 (1+ (match-end 1))
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 95def1c..fb15880 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -357,7 +357,7 @@ CPHR is the complex heading regexp to use for parsing ITEM."
'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1))))))
(and (match-end 2) (not (assoc "TODO" fmt)) (concat " " (match-string 2 item)))
(and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item)))
- " " (save-match-data (org-columns-compact-links (match-string 4 item)))
+ " " (save-match-data (org-columns-compact-links (or (match-string 4 item) "")))
(and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item)))))
(add-text-properties
0 (1+ (match-end 1))