org-refile-target-verify-function

org-refile-target-verify-function is a variable defined in `org.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Function to verify if the headline at point should be a refile target.
The function will be called without arguments, with point at the
beginning of the headline. It should return t and leave point
where it is if the headline is a valid target for refiling.

If the target should not be selected, the function must return nil.
In addition to this, it may move point to a place from where the search
should be continued. For example, the function may decide that the entire
subtree of the current entry should be excluded and move point to the end
of the subtree.

You can customize this variable.