Improve documentation of org-agenda-skip-*

* doc/org-manual.org (Special Agenda Views): Improve indexing.
* lisp/org-agenda.el (org-agenda-skip-function)
(org-agenda-skip-entry-if, org-agenda-skip-subtree-if): Expand
docstrings.
(org-agenda-skip-if): Doc fix; clarify wording.
This commit is contained in:
Stefan Kangas 2022-10-02 21:54:27 +02:00 committed by Ihor Radchenko
parent 101280aa66
commit e28e3aaabb
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
2 changed files with 25 additions and 10 deletions

View File

@ -21345,6 +21345,8 @@ meaningful string suitable for the agenda view.
#+vindex: org-odd-levels-only #+vindex: org-odd-levels-only
#+vindex: org-agenda-skip-function #+vindex: org-agenda-skip-function
#+findex: org-agenda-skip-entry-if
#+findex: org-agenda-skip-subtree-if
Search for entries with a limit set on levels for the custom search. Search for entries with a limit set on levels for the custom search.
This is a general approach to creating custom searches in Org. To This is a general approach to creating custom searches in Org. To
include all levels, use =LEVEL>0=[fn:: Note that, for include all levels, use =LEVEL>0=[fn:: Note that, for

View File

@ -4200,12 +4200,19 @@ to t."
If this function returns nil, the current match should not be skipped. If this function returns nil, the current match should not be skipped.
Otherwise, the function must return a position from where the search Otherwise, the function must return a position from where the search
should be continued. should be continued.
This may also be a Lisp form, it will be evaluated.
Never set this variable using `setq' or so, because then it will apply This may also be a Lisp form that will be evaluated. Useful
to all future agenda commands. If you do want a global skipping condition, forms include `org-agenda-skip-entry-if' and
use the option `org-agenda-skip-function-global' instead. `org-agenda-skip-subtree-if'. See the Info node `(org) Special
The correct usage for `org-agenda-skip-function' is to bind it with Agenda Views' for more details and examples.
`let' to scope it dynamically into the agenda-constructing command.
Never set this variable using `setq' or similar, because then it
will apply to all future agenda commands. If you want a global
skipping condition, use the option `org-agenda-skip-function-global'
instead.
The correct way to use `org-agenda-skip-function' is to bind it with `let'
to scope it dynamically into the agenda-constructing command.
A good way to set it is through options in `org-agenda-custom-commands'.") A good way to set it is through options in `org-agenda-custom-commands'.")
(defun org-agenda-skip (&optional element) (defun org-agenda-skip (&optional element)
@ -5118,12 +5125,18 @@ bind it in the options section.")
(defun org-agenda-skip-entry-if (&rest conditions) (defun org-agenda-skip-entry-if (&rest conditions)
"Skip entry if any of CONDITIONS is true. "Skip entry if any of CONDITIONS is true.
See `org-agenda-skip-if' for details." See `org-agenda-skip-if' for details about CONDITIONS.
This function can be put into `org-agenda-skip-function' for the
duration of a command."
(org-agenda-skip-if nil conditions)) (org-agenda-skip-if nil conditions))
(defun org-agenda-skip-subtree-if (&rest conditions) (defun org-agenda-skip-subtree-if (&rest conditions)
"Skip subtree if any of CONDITIONS is true. "Skip subtree if any of CONDITIONS is true.
See `org-agenda-skip-if' for details." See `org-agenda-skip-if' for details about CONDITIONS.
This function can be put into `org-agenda-skip-function' for the
duration of a command."
(org-agenda-skip-if t conditions)) (org-agenda-skip-if t conditions))
(defun org-agenda-skip-if (subtree conditions) (defun org-agenda-skip-if (subtree conditions)
@ -5145,8 +5158,8 @@ notregexp Check if regexp does not match.
todo Check if TODO keyword matches todo Check if TODO keyword matches
nottodo Check if TODO keyword does not match nottodo Check if TODO keyword does not match
The regexp is taken from the conditions list, it must come right after The regexp is taken from the conditions list, and must come right
the `regexp' or `notregexp' element. after the `regexp' or `notregexp' element.
`todo' and `nottodo' accept as an argument a list of todo `todo' and `nottodo' accept as an argument a list of todo
keywords, which may include \"*\" to match any todo keyword. keywords, which may include \"*\" to match any todo keyword.