emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to org-refile to a target within the current file?
@ 2016-05-04 17:20 Peter Salazar
  2016-05-08 11:30 ` Peter Salazar
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Salazar @ 2016-05-04 17:20 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]

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!

[-- Attachment #2: Type: text/html, Size: 2009 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-08 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 17:20 how to org-refile to a target within the current file? Peter Salazar
2016-05-08 11:30 ` Peter Salazar

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).