From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Refile targets fail with certain filename Date: Mon, 12 Dec 2011 09:55:18 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra8Dq-000847-SN for emacs-orgmode@gnu.org; Mon, 12 Dec 2011 10:55:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ra8Dp-0008JO-U8 for emacs-orgmode@gnu.org; Mon, 12 Dec 2011 10:55:22 -0500 Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:42665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra8Dp-0008JB-Kl for emacs-orgmode@gnu.org; Mon, 12 Dec 2011 10:55:21 -0500 Received: by lahi5 with SMTP id i5so2405377lah.0 for ; Mon, 12 Dec 2011 07:55:19 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hello, This was a very tricky problem to work around. I have two directories ("notesmine" and "personal") that I use to refile stuff to. I refile to my notesmine directory once every few months, so I was baffled last night when I started getting "Wrong type argument: stringp, nil" when I wanted to refile to my notesmine directory. ;; Setup ;; My /Users/nate/Documents/notesmine directory has a file called "org-mode.org" in it. ;; Begin Code (defun njn/personal-org-files() (interactive) (directory-files "/Users/nate/Documents/notesmine" 't "^[^.].*org$") ) (defun njn/refile-targets-personal() (interactive) (setq org-refile-targets (quote ((njn/personal-org-files :maxlevel . 5)))) ) ;; I would then run M-x njn/refile-targets-personal, and ;; then press Ctrl-C Ctrl-W to refile a heading in one of my org files. ;; Then, I would see the "Wrong type argument: stringp nil" I found that the problem *disappears* when I remove or re-name the "org-mode.org" file from my notesmine directory! I refile to my personal directory all the time, and I found that if I move the "org-mode.org" file to my personal directory, (or create a blank "org-mode.org" file in my personal directory then I would start getting the same "Wrong type argument stringp, nil" error when refiling to my personal directory. So, as a geek, I'm interested in why the "org-mode.org" filename causes this error. I've reproduced the problem with the simple code above, so I hope someone else can say "Yes, I can reproduce the problem" and I will have done some good :-) Can anyone reproduce the error and tell me if "org-mode.org" is a keyword or function or something, or is the problem in the regular expression I'm using to select my refile targets? Thanks, --Nate