From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Raymond Zeitler" Subject: Re: refile workflow -- move to same heading in different file? Date: Thu, 3 Aug 2017 14:52:08 -0400 Message-ID: <004601d30c89$9c589420$d509bc60$@yahoo.com> Reply-To: zeitra@yahoo.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddLEG-0004ud-D9 for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 14:52:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddLEB-0004yu-VQ for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 14:52:16 -0400 Received: from nm15-vm0.bullet.mail.ne1.yahoo.com ([98.138.91.70]:51227) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddLEB-0004vz-Oe for emacs-orgmode@gnu.org; Thu, 03 Aug 2017 14:52:11 -0400 Content-Language: en-us 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: 'Adam Porter' , emacs-orgmode@gnu.org 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:emacs-orgmode-bounces+zeitra=yahoo.com@gnu.org] On Behalf Of Adam Porter Sent: Thursday, August 03, 2017 6:08 AM To: emacs-orgmode@gnu.org Subject: Re: [O] refile workflow -- move to same heading in different file? "Raymond Zeitler" 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.