From 10954832e5168c301e4c0d266089a5f77062212b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 1 Jan 2015 21:37:35 +0100 Subject: [PATCH] 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. --- lisp/ox-ascii.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 820d763c1..f98564807 100644 --- a/lisp/ox-ascii.el +++ b/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