emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: refile workflow -- move to same heading in different file?
Date: Thu, 03 Aug 2017 20:51:10 -0500	[thread overview]
Message-ID: <87a83grtgx.fsf@alphapapa.net> (raw)
In-Reply-To: 004601d30c89$9c589420$d509bc60$@yahoo.com

"Raymond Zeitler" <zeitra@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	other threads:[~2017-08-04  1:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 18:52 refile workflow -- move to same heading in different file? Raymond Zeitler
2017-08-04  1:51 ` Adam Porter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-08-04 15:02 Raymond Zeitler
2017-08-05  2:31 ` Adam Porter
2017-08-05 12:41   ` Raymond Zeitler
2017-08-06  4:12     ` Raymond Zeitler
2017-08-06 10:23       ` Adam Porter
2017-08-06 19:52         ` Raymond Zeitler
2017-08-04  4:14 Raymond Zeitler
2017-08-04 10:21 ` Adam Porter
2017-08-04 10:53   ` Joost Kremers
2017-08-05  2:35     ` Adam Porter
2017-08-02 15:11 Raymond Zeitler
2017-08-03 10:07 ` Adam Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a83grtgx.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).