emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] refile workflow -- move to same heading in different file?


From: Raymond Zeitler
Subject: Re: [O] refile workflow -- move to same heading in different file?
Date: Thu, 3 Aug 2017 14:52:08 -0400

Thank you for responding.

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

org-agenda-files evaluates to:
("~/HR.org" "~/1234.org" "~/2345.org" "~/3456.org" "~/4567.org"
"~/todo.org")
All those files exist, and they load when I invoke org-agenda.

I also tried the setting used by Sacha Chua(1), shown below.  The error that
Emacs returned follows that (but at least that's an error from the let
function and not an org function, so it might indicate a problem with how I
wrote it):
(let (org-refile-targets '((org-agenda-files . (:maxlevel . 3))))
(org-refile))
let: Invalid function: (org-agenda-files :maxlevel . 3)

Then on reddit there's naught-me's setting(2), upon which I based this:
(let ((org-refile-targets (quote ("~/HR.org" :maxlevel . 3) ("~/todo.org"
:regexp . "tasks"))) (org-refile))
This returns: funcall-interactively: End of file during parsing

I have no clue how to proceed.  And I spent far too much time on this.  Fun,
but very unproductive.

3. Helm is on my todo.org, actually, but I've put it off because of how
formidable it seems.

(1) http://pages.sachachua.com/.emacs.d/Sacha.html#org2789cb5
(2)
https://www.reddit.com/r/emacs/comments/4366f9/how_do_orgrefiletargets_work/

- Ray

-----Original Message-----
From: Emacs-orgmode [mailto:address@hidden
On Behalf Of Adam Porter
Sent: Thursday, August 03, 2017 6:08 AM
To: address@hidden
Subject: Re: [O] refile workflow -- move to same heading in different file?

"Raymond Zeitler" <address@hidden> writes:

> C-c C-w cannot seem to recognize any of my agenda files, even though 
> org-refile-targets is set to (in custom-set-variables):
>
> (org-refile-targets (quote ((org-agenda-files :regexp . "Tasks"))))
>
> Suppose org-agenda-files contains "~/proj1.org" "~/proj2.org"
"~/proj3.org" "~/todo.org".
>
> My expectation is that when I press C-c C-w with point on a subheading 
> of Tasks in todo.org, I can specify, say proj1.org and get the 
> subheading moved to proj1.org under Tasks. However, org-refile 
> responds [No Match], even if I provide the file as ~/proj1.org. And 
> Emacs is visiting proj1.org in another buffer.

Hi Raymond,

Going on what you've provided, it sounds like it should work.  A few
suggestions:

1.  In case you haven't yet (but you probably have), check describe-variable
for org-refile-targets.

2.  If you have any doubt about org-refile-targets being set correctly,
experiment with setting it and calling org-refile inside a (let).

3.  I haven't used the default Emacs completion in years; I'm so used to
having Helm that when I have to run "emacs -q" now and then, completing
buffer names and such is painful!  :)  So I'd suggest temporarily, at least,
using Helm as the default completing-read method, which will make it much
easier to debug by showing you the full list of candidates.
That way, if it's empty to begin with, you know something's really wrong; or
if it's full, but it shows [No Match] after you type something in, that
should help you narrow down the cause.

Hope this helps.


----------------------------------------------------
This message has been processed by Firetrust Benign.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]