emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Peter Salazar <cycleofsong@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: how to org-refile to a target within the current file?
Date: Wed, 4 May 2016 13:20:58 -0400	[thread overview]
Message-ID: <CAE+_6TxRHkY+7BFP51x_9q9OoZsbGM6ovy-c6-abdcPMpdKzJQ@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2016-05-04 17:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 17:20 Peter Salazar [this message]
2016-05-08 11:30 ` how to org-refile to a target within the current file? Peter Salazar

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=CAE+_6TxRHkY+7BFP51x_9q9OoZsbGM6ovy-c6-abdcPMpdKzJQ@mail.gmail.com \
    --to=cycleofsong@gmail.com \
    --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).