From c6737633b12b8f9de1a240b2f32f52d54e1c14a1 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Wed, 5 Oct 2022 11:17:55 +0800 Subject: [PATCH] lisp/ox.el: Allow links to inlinetasks * lisp/ox.el (org-export-search-cells): (org-export-resolve-fuzzy-link): (org-export-resolve-id-link): Resolve links to inlinetasks. **This is not a proper commit** Applying it will not make inlinetask links work during export. Backend-specific support will be required. --- lisp/ox.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 51145acaa..6090d1ecd 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -4313,7 +4313,7 @@ (defun org-export-search-cells (datum) A search cell is the internal representation of a fuzzy link. It ignores white spaces and statistics cookies, if applicable." (pcase (org-element-type datum) - (`headline + ((or `headline `inlinetask) (let ((title (split-string (replace-regexp-in-string "\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]" " " @@ -4408,7 +4408,8 @@ (defun org-export-resolve-fuzzy-link (link info &rest pseudo-types) ;; Matching both a name and a target is not valid, and ;; therefore undefined. (or (cl-some (lambda (datum) - (and (not (eq (org-element-type datum) 'headline)) + (and (not (memq (org-element-type datum) + '(headline inlinetask))) datum)) matches) (car matches)) @@ -4428,7 +4429,7 @@ (defun org-export-resolve-id-link (link info) (let ((table (make-hash-table :test #'equal))) (org-element-map (plist-get info :parse-tree) - 'headline + '(headline inlinetask) (lambda (headline) (let ((id (org-element-property :ID headline)) (custom-id (org-element-property :CUSTOM_ID headline))) -- 2.35.1