Jelajahi Sumber

Protect keyword-selecting variabels during mapping.

Carsten Dominik 16 tahun lalu
induk
melakukan
990a549370
2 mengubah file dengan 10 tambahan dan 3 penghapusan
  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>
 
 	* 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))))
 	 (llast 0) rtn rtn1 level category i txt
 	 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)))
     (save-excursion
       (goto-char (point-min))
@@ -9506,9 +9506,12 @@ the scanner.  The following items can be given here:
 	 (org-agenda-skip-function
 	  (car (org-delete-all '(comment archive) skip)))
 	 (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 nil) (setq matcher t))
      (t (setq matcher (if match (org-make-tags-matcher match) t))))