瀏覽代碼

Fixed bug in capturing column view.

Patch from Peter Jones.
Carsten Dominik 17 年之前
父節點
當前提交
be38bc3316
共有 2 個文件被更改,包括 15 次插入14 次删除
  1. 8 7
      lisp/org-colview-xemacs.el
  2. 7 7
      lisp/org-colview.el

+ 8 - 7
lisp/org-colview-xemacs.el

@@ -1216,13 +1216,14 @@ of fields."
         (let* ((title (mapcar 'cadr org-columns-current-fmt-compiled))
                (n (length title)) row tbl)
           (goto-char (point-min))
-          (while (and (re-search-forward "^\\(\\*+\\) " nil t)
-                      (or (null maxlevel)
-                          (>= maxlevel
-                              (if org-odd-levels-only
-                                  (/ (1+ (length (match-string 1))) 2)
-                                (length (match-string 1))))))
-            (when (get-char-property (match-beginning 0) 'org-columns-key)
+
+	  (while (re-search-forward "^\\(\\*+\\) " nil t)
+	    (when (and (or (null maxlevel)
+			   (>= maxlevel
+			       (if org-odd-levels-only
+				   (/ (1+ (length (match-string 1))) 2)
+				 (length (match-string 1)))))
+		       (get-char-property (match-beginning 0) 'org-columns-key))
               (goto-char (match-beginning 0))
               (setq row nil)
               (loop for i from 0 to (1- n) do

+ 7 - 7
lisp/org-colview.el

@@ -1013,13 +1013,13 @@ of fields."
     (let* ((title (mapcar 'cadr org-columns-current-fmt-compiled))
 	   (n (length title)) row tbl)
       (goto-char (point-min))
-      (while (and (re-search-forward "^\\(\\*+\\) " nil t)
-		  (or (null maxlevel)
-		      (>= maxlevel
-			  (if org-odd-levels-only
-			      (/ (1+ (length (match-string 1))) 2)
-			    (length (match-string 1))))))
-	(when (get-char-property (match-beginning 0) 'org-columns-key)
+      (while (re-search-forward "^\\(\\*+\\) " nil t)
+	(when (and (or (null maxlevel)
+                       (>= maxlevel
+                           (if org-odd-levels-only
+                               (/ (1+ (length (match-string 1))) 2)
+                             (length (match-string 1)))))
+                   (get-char-property (match-beginning 0) 'org-columns-key))
 	  (setq row nil)
 	  (loop for i from 0 to (1- n) do
 		(push (or (get-char-property (+ (match-beginning 0) i) 'org-columns-value-modified)