浏览代码

ox-ascii: Handle (custom-)id links to unnumbered headlines

* lisp/ox-ascii.el (org-ascii--describe-links): When a headline is
  unnumbered, refer to its title instead of dropping the ball.
Nicolas Goaziou 10 年之前
父节点
当前提交
10954832e5
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lisp/ox-ascii.el

+ 4 - 2
lisp/ox-ascii.el

@@ -919,8 +919,10 @@ channel."
 	      (if (not dest) (org-ascii--translate "Unknown reference" info)
 		(format
 		 (org-ascii--translate "See section %s" info)
-		 (mapconcat 'number-to-string
-			    (org-export-get-headline-number dest info) "."))))
+		 (if (org-export-numbered-headline-p dest info)
+		     (mapconcat #'number-to-string
+				(org-export-get-headline-number dest info) ".")
+		   (org-export-data (org-element-property :title dest) info)))))
 	     width info) "\n\n")))
 	;; Do not add a link that cannot be resolved and doesn't have
 	;; any description: destination is already visible in the