From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Salazar Subject: how to org-refile to a target within the current file? Date: Wed, 4 May 2016 13:20:58 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ecdbef001860532077271 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay0UL-0002aR-RB for emacs-orgmode@gnu.org; Wed, 04 May 2016 13:21:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay0UA-0002IC-11 for emacs-orgmode@gnu.org; Wed, 04 May 2016 13:21:24 -0400 Received: from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c]:36743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay0U8-0002F5-OA for emacs-orgmode@gnu.org; Wed, 04 May 2016 13:21:17 -0400 Received: by mail-io0-x22c.google.com with SMTP id u185so69793492iod.3 for ; Wed, 04 May 2016 10:21:01 -0700 (PDT) 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: org-mode --001a113ecdbef001860532077271 Content-Type: text/plain; charset=UTF-8 Hello, I use org-refile quite a bit, but for my use-case, I want to refile my org-mode subtrees not to an org-agenda file, but to the current file or another file I'm currently visiting. I had a way of doing this that was working correctly, but now has stopped working. I'm not sure what I changed that broke it. Here's the code I'm using for org-refile: (setq org-outline-path-complete-in-steps nil) ; Refile in a single go (setq org-completion-use-ido nil) (setq org-refile-use-outline-path t) ; Show full paths for refiling (setq org-refile-allow-creating-parent-nodes (quote confirm)) ; allow refile to create parent tasks with confirmation (defun my-org-files-list () (mapcar (lambda (buffer) (buffer-file-name buffer)) (org-buffer-list 'files t))) (setq org-refile-targets '((my-org-files-list :maxlevel . 3))) Again, this used to work. But now when I run org-refile, I get this: Debugger entered--Lisp error: (wrong-type-argument stringp nil) get-file-buffer(nil) org-find-base-buffer-visiting(nil) org-get-agenda-file-buffer(nil) org-refile-get-targets(nil (#("this" 0 4 (fontified t face org-level-1)))) org-refile-get-location("Refile subtree \"this\" to" nil confirm nil) org-refile(nil) call-interactively(org-refile record nil) command-execute(org-refile record) execute-extended-command(nil "org-refile") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) Any suggestions on how to fix this? Thanks! --001a113ecdbef001860532077271 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello, I use org-refile quite a bit, but for my use-case, = I want to refile my org-mode subtrees not to an org-agenda file, but to the= current file or another file I'm currently visiting.

I had a way of doing this that was working correctly, but now has stopped= working.=C2=A0I'm not sure what I changed that broke it.=C2=A0

Here's the code I'm using for org-refile:

(setq org-outline-path-complete-in-steps nil) ; Refi= le in a single go=C2=A0
(setq org-completion-use-ido nil)=C2=A0
(setq org-refile-use-outline-path t) ; Show full paths for refilin= g=C2=A0
(setq org-refile-allow-creating-parent-nodes (quote confi= rm)) ; allow refile to create parent tasks with confirmation

=
(defun my-org-files-list ()
=C2=A0(mapcar (lambda (buf= fer)
=C2=A0 =C2=A0(buffer-file-name buffer))
=C2=A0 =C2= =A0(org-buffer-list 'files t)))=C2=A0

(setq or= g-refile-targets '((my-org-files-list :maxlevel . 3)))=C2=A0
=
Again, this used to work. But now when I run org-refil= e, I get this:

Debugger entered--Lisp error: = (wrong-type-argument stringp nil)
=C2=A0 get-file-buffer(nil)
=C2=A0 org-find-base-buffer-visiting(nil)
=C2=A0 org-get-a= genda-file-buffer(nil)
=C2=A0 org-refile-get-targets(nil (#("= ;this" 0 4 (fontified t face org-level-1))))
=C2=A0 org-refi= le-get-location("Refile subtree \"this\" to" nil confir= m nil)
=C2=A0 org-refile(nil)
=C2=A0 call-interactively= (org-refile record nil)
=C2=A0 command-execute(org-refile record)=
=C2=A0 execute-extended-command(nil "org-refile")
=C2=A0 call-interactively(execute-extended-command nil nil)
=C2=A0 command-execute(execute-extended-command)

Any suggestions on how to fix this? Thanks!

--001a113ecdbef001860532077271--