From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: refile workflow -- move to same heading in different file? Date: Thu, 03 Aug 2017 20:51:10 -0500 Message-ID: <87a83grtgx.fsf@alphapapa.net> References: <004601d30c89$9c589420$d509bc60$@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddRm1-00024X-83 for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 21:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddRly-0002f6-LO for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 21:51:33 -0400 Received: from [195.159.176.226] (port=52171 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddRly-0002dw-FD for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 21:51:30 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ddRlm-0007zA-Ni for emacs-orgmode@gnu.org; Fri, 04 Aug 2017 03:51:18 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org "Raymond Zeitler" 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. :)