Fix bugs in implementation and documentation of the mapping API.
There were bugs in the mapping API, pointed to by Samuel Wales: Manual says: The following example counts the number of entries with TODO keyword WAITING, in all agenda files. (length (org-map-entries t "/+WAITING" nil 'agenda)) Org says invalid function for the string. First of all, the example in the manual was wrong, the "nil" should be gone. Second, the mapping function did not return all results in a list, so that `length' could not count them. This patch fixes these issues.
This commit is contained in:
parent
269c5a85bc
commit
4800fd8b7c
|
@ -1,3 +1,7 @@
|
|||
2008-12-02 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.texi (Using the mapping API): Fix bug in mapping example.
|
||||
|
||||
2008-11-29 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.texi (Property searches): Document new special values for
|
||||
|
|
|
@ -9830,7 +9830,7 @@ The following example counts the number of entries with TODO keyword
|
|||
@code{WAITING}, in all agenda files.
|
||||
|
||||
@lisp
|
||||
(length (org-map-entries t "/+WAITING" nil 'agenda))
|
||||
(length (org-map-entries t "/+WAITING" 'agenda))
|
||||
@end lisp
|
||||
|
||||
@node History and Acknowledgments, Main Index, Hacking, Top
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-12-02 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-map-entries): Return all values.
|
||||
|
||||
2008-11-29 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-matcher-time): Recognize more special values.
|
||||
|
|
|
@ -9897,7 +9897,7 @@ 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 res
|
||||
org-todo-keywords-for-agenda
|
||||
org-done-keywords-for-agenda
|
||||
org-todo-keyword-alist-for-agenda
|
||||
|
@ -9906,7 +9906,7 @@ the scanner. The following items can be given here:
|
|||
(cond
|
||||
((eq match t) (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 (cdr (org-make-tags-matcher match)) t))))
|
||||
|
||||
(when (eq scope 'tree)
|
||||
(org-back-to-heading t)
|
||||
|
@ -9939,7 +9939,8 @@ the scanner. The following items can be given here:
|
|||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(org-scan-tags func matcher))))))))
|
||||
(setq res (append res (org-scan-tags func matcher)))))))
|
||||
res)))
|
||||
|
||||
;;;; Properties
|
||||
|
||||
|
|
Loading…
Reference in New Issue