From 80b474db0060b540ff4717e34fb1acca06ad62f5 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Wed, 24 Apr 2024 15:42:39 +0300 Subject: [PATCH] ox-ascii: Fix broken link export for broken fuzzy links * lisp/ox-ascii.el (org-ascii--describe-links): Ignore all kinds of broken links, not just broken id links. Reported-by: Pablo Aguado Link: https://orgmode.org/list/SA1P223MB070291E02E95707C31342244C2102@SA1P223MB0702.NAMP223.PROD.OUTLOOK.COM --- lisp/ox-ascii.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index db4356ec6..056d7a4f5 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -954,14 +954,15 @@ channel." ;; Only links with a description need an entry. Other are ;; already handled in `org-ascii-link'. (when description - (let ((dest (if (equal type "fuzzy") - (org-export-resolve-fuzzy-link link info) - ;; Ignore broken links. On broken link, - ;; `org-export-resolve-id-link' will throw an - ;; error and we will return nil. - (condition-case nil - (org-export-resolve-id-link link info) - (org-link-broken nil))))) + (let ((dest + ;; Ignore broken links. On broken link, + ;; `org-export-resolve-id-link' will throw an + ;; error and we will return nil. + (condition-case nil + (if (equal type "fuzzy") + (org-export-resolve-fuzzy-link link info) + (org-export-resolve-id-link link info)) + (org-link-broken nil)))) (when dest (concat (org-ascii--fill-string