Browse Source

Protect keyword-selecting variabels during mapping.

Carsten Dominik 17 years ago
parent
commit
990a549370
2 changed files with 10 additions and 3 deletions
  1. 4 0
      lisp/ChangeLog
  2. 6 3
      lisp/org.el

+ 4 - 0
lisp/ChangeLog

@@ -1,3 +1,7 @@
+2008-09-24  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.el (org-map-entries): Protect the keyword-selecting variables.
+
 2008-09-23  Bastien Guerry  <bzg@altern.org>
 2008-09-23  Bastien Guerry  <bzg@altern.org>
 
 
 	* org-agenda.el (org-agenda-to-appt): Make sure the function check
 	* org-agenda.el (org-agenda-to-appt): Make sure the function check

+ 6 - 3
lisp/org.el

@@ -8685,7 +8685,7 @@ only lines with a TODO keyword are included in the output."
 	 (tags-alist (list (cons 0 (mapcar 'downcase org-file-tags))))
 	 (tags-alist (list (cons 0 (mapcar 'downcase org-file-tags))))
 	 (llast 0) rtn rtn1 level category i txt
 	 (llast 0) rtn rtn1 level category i txt
 	 todo marker entry priority)
 	 todo marker entry priority)
-    (when (not (member action '(agenda sparse-tree)))
+    (when (not (or (member action '(agenda sparse-tree)) (functionp action)))
       (setq action (list 'lambda nil action)))
       (setq action (list 'lambda nil action)))
     (save-excursion
     (save-excursion
       (goto-char (point-min))
       (goto-char (point-min))
@@ -9506,9 +9506,12 @@ the scanner.  The following items can be given here:
 	 (org-agenda-skip-function
 	 (org-agenda-skip-function
 	  (car (org-delete-all '(comment archive) skip)))
 	  (car (org-delete-all '(comment archive) skip)))
 	 (org-tags-match-list-sublevels t)
 	 (org-tags-match-list-sublevels t)
-	 matcher pos file)
+	 matcher pos file
+	 org-todo-keywords-for-agenda
+	 org-done-keywords-for-agenda
+	 org-todo-keyword-alist-for-agenda
+	 org-tag-alist-for-agenda)
 
 
-    (cond
      ((eq match t)   (setq matcher t))
      ((eq match t)   (setq matcher t))
      ((eq match nil) (setq matcher t))
      ((eq match nil) (setq matcher t))
      (t (setq matcher (if match (org-make-tags-matcher match) t))))
      (t (setq matcher (if match (org-make-tags-matcher match) t))))