浏览代码

Fix refiling to an empty headline

* lisp/org.el (org-refile): Do not assume the headline is not empty.

Reported-by: Fabrice Popineau <fabrice.popineau@supelec.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/107772>
Nicolas Goaziou 8 年之前
父节点
当前提交
75238d25ed
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -11921,7 +11921,8 @@ prefix argument (`C-u C-u C-u C-c C-w')."
 					(replace-regexp-in-string
 					 org-bracket-link-regexp
 					 "\\3"
-					 (nth 4 (org-heading-components)))))
+					 (or (nth 4 (org-heading-components))
+					     ""))))
 				(org-refile-get-location
 				 (cond ((and arg (listp arg)) "Goto")
 				       (regionp (concat actionmsg " region to"))