ソースを参照

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