From 76e18b30e9c54520439ef48f87fff1413b161361 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 23 Dec 2008 06:15:04 +0100 Subject: [PATCH] Remember: Fix bug cause by expand-file-name on nil file. --- lisp/ChangeLog | 5 +++++ lisp/org.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb75b642c..65a33f3b9 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-12-23 Carsten Dominik + + * org.el (org-refile-get-location): Handle case of current buffer + not having a file associated with it. + 2008-12-22 Carsten Dominik * org-table.el (org-table-get-formula): Only ask to overwrite diff --git a/lisp/org.el b/lisp/org.el index 0d1378610..b03d8bb80 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7671,13 +7671,13 @@ operation has put the subtree." (unless org-refile-target-table (error "No refile targets")) (let* ((cbuf (current-buffer)) + (cfn (buffer-file-name (buffer-base-buffer cbuf))) (cfunc (if (and org-refile-use-outline-path org-outline-path-complete-in-steps) 'org-olpath-completing-read 'org-ido-completing-read)) (extra (if org-refile-use-outline-path "/" "")) - (filename (expand-file-name - (buffer-file-name (buffer-base-buffer cbuf)))) + (filename (and cfn (expand-file-name cfn))) (tbl (mapcar (lambda (x) (if (not (equal filename (nth 1 x)))