Browse Source

Refresh the agenda when redoing the column view.

Carsten Dominik 17 years ago
parent
commit
4178a34c48
2 changed files with 13 additions and 7 deletions
  1. 1 0
      lisp/ChangeLog
  2. 12 7
      lisp/org-colview.el

+ 1 - 0
lisp/ChangeLog

@@ -7,6 +7,7 @@
 	when in agenda.
 	(org-columns-edit-value): Fixed bug with editing values from
 	agenda column view.
+	(org-columns-redo): Also redo the agenda itself.
 
 2008-05-28  Carsten Dominik  <dominik@science.uva.nl>
 

+ 12 - 7
lisp/org-colview.el

@@ -845,13 +845,18 @@ Don't set this, this is meant for dynamic scoping.")
   "Construct the column display again."
   (interactive)
   (message "Recomputing columns...")
-  (save-excursion
-    (if (marker-position org-columns-begin-marker)
-	(goto-char org-columns-begin-marker))
-    (org-columns-remove-overlays)
-    (if (org-mode-p)
-	(call-interactively 'org-columns)
-      (call-interactively 'org-agenda-columns)))
+  (let ((line (org-current-line))
+	(col (current-column)))
+    (save-excursion
+      (if (marker-position org-columns-begin-marker)
+	  (goto-char org-columns-begin-marker))
+      (org-columns-remove-overlays)
+      (if (org-mode-p)
+	  (call-interactively 'org-columns)
+	(org-agenda-redo)
+	(call-interactively 'org-agenda-columns)))
+    (goto-line line)
+    (move-to-column col))
   (message "Recomputing columns...done"))
 
 (defun org-columns-not-in-agenda ()