Browse Source

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 years ago
parent
commit
10954832e5
1 changed files with 4 additions and 2 deletions
  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