ソースを参照

org.el (org-store-link): Bugfix

* org.el (org-store-link): Fall back on an empty string when
no description is available.

This fixes a bug about tangling a source block outside of any
subtree when `org-id-link-to-org-use-id' is `t'.

Thanks to Sean Allred for reporting this.
Bastien Guerry 11 年 前
コミット
7f65ba52ee
1 ファイル変更1 行追加1 行削除
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -9586,7 +9586,7 @@ active region."
        ;; We're done setting link and desc, clean up
        ;; We're done setting link and desc, clean up
        (if (consp link) (setq cpltxt (car link) link (cdr link)))
        (if (consp link) (setq cpltxt (car link) link (cdr link)))
        (setq link (or link cpltxt)
        (setq link (or link cpltxt)
-	     desc (or desc cpltxt))
+	     desc (or desc cpltxt ""))
        (cond ((equal desc "NONE") (setq desc nil))
        (cond ((equal desc "NONE") (setq desc nil))
 	     ((string-match org-bracket-link-analytic-regexp desc)
 	     ((string-match org-bracket-link-analytic-regexp desc)
 	      (let ((d0 (match-string 3 desc))
 	      (let ((d0 (match-string 3 desc))