From eed50349bcb6c23f7eec094fb05fb079a9063dbe Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 31 Aug 2012 07:56:58 +0200 Subject: [PATCH] org-colview.el: Fix several bugs * org-colview.el (org-columns-goto-top-level): Correctly move the marker `org-columns-top-level-marker'. (org-agenda-columns): Don't set `org-agenda-overriding-columns-format' as a buffer variable, as we only need it dynamically. (org-agenda-colview-summarize): Fix a bug in returning the match string. (The problem with `org-columns-goto-top-level' was introduced by the commit 8d9e83.) Thanks to Hannes Schulz and Jacob Riko who reported this. --- lisp/org-colview.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 53c35193b..56219f25f 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -681,10 +681,10 @@ around it." (defun org-columns-goto-top-level () (when (condition-case nil (org-back-to-heading) (error nil)) - (org-entry-get nil "COLUMNS" t) - (if (marker-position org-entry-property-inherited-from) - (move-marker org-columns-top-level-marker org-entry-property-inherited-from) - (move-marker org-columns-top-level-marker (point))))) + (org-entry-get nil "COLUMNS" t)) + (if (marker-position org-entry-property-inherited-from) + (move-marker org-columns-top-level-marker org-entry-property-inherited-from) + (move-marker org-columns-top-level-marker (point)))) (defun org-columns (&optional columns-fmt-string) "Turn on column view on an org-mode file. @@ -1368,8 +1368,7 @@ and tailing newline characters." (cond ((and (boundp 'org-agenda-overriding-columns-format) org-agenda-overriding-columns-format) - (setq fmt org-agenda-overriding-columns-format) - (org-set-local 'org-agenda-overriding-columns-format fmt)) + (setq fmt org-agenda-overriding-columns-format)) ((setq m (org-get-at-bol 'org-hd-marker)) (setq fmt (or (org-entry-get m "COLUMNS" t) (with-current-buffer (marker-buffer m) @@ -1425,7 +1424,8 @@ and tailing newline characters." This will add overlays to the date lines, to show the summary for each day." (let* ((fmt (mapcar (lambda (x) (if (string-match "CLOCKSUM.*" (car x)) - (list (match-string 0) (nth 1 x) (nth 2 x) ":" 'add_times + (list (match-string 0 (car x)) + (nth 1 x) (nth 2 x) ":" 'add_times nil '+ nil) x)) org-columns-current-fmt-compiled))