"Raymond Zeitler" <zei...@yahoo.com> writes:

> 1.  org-refile-targets ... value is ((org-agenda-files :regexp . "Tasks"))
> Seems OK.  But then I see that org-refile-target-verify-function is nil,
> which seems like a problem.  Mind you, this is the default configuration,
> and I'm not sure what to change it to.
>
> 2.  I placed the let block below into a subheading of Tasks in my todo.org
> and then evaluated it.  The error that Emacs returned follows that:
> (let ((org-refile-targets (quote (((org-agenda-files) :regexp . "Tasks")))))
> (org-refile))
> org-find-base-buffer-visiting: Wrong type argument: stringp,
> org-agenda-files

It seems that describe-variable isn't printing the variable structure
the way it really is, so then when you try to evaluate it, it doesn't
work.  Note that according to the docstring:

#+BEGIN_QUOTE
This is a list of cons cells.  Each cell contains:

- a specification of the files to be considered, either a list of files,
  or a symbol...
- A specification of how to find candidate refile targets.  This may be
  any of:
  ...
  - a cons cell (:regexp . "REGEXP") with a regular expression matching
    headlines that are refiling targets.
#+END_QUOTE

So the variable is a list, which should contain at least one cons cell,
and the cons cells should have another cons cell as their cdrs.

Try this, it seems to work for me:

(let ((org-refile-targets '((org-agenda-files . (:regexp . "Tasks")))))
  (org-refile))

This is one advantage of the customize system: it makes it harder to get
these structures wrong.  :)


Reply via email to