From 9e49be14b86a359cd4ea834763c697349eba0d2f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 11 May 2018 14:59:33 +0200 Subject: [PATCH] Add `partial' to `org-descriptive-link' * lisp/org.el (org-activate-links): Handle `partial' value. --- lisp/org.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 2cfe46697..bf1e19f36 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5914,8 +5914,17 @@ This includes angle, plain, and bracket links." ,(or (org-link-get-parameter type :display) 'org-link)) properties)) - (visible-start (or (match-beginning 4) (match-beginning 2))) - (visible-end (or (match-end 4) (match-end 2)))) + (visible-start + (pcase org-descriptive-links + (`nil start) + (`partial (or (match-beginning 3) + (1- (match-beginning 2)))) + (_ (or (match-beginning 4) (match-beginning 2))))) + (visible-end + (pcase org-descriptive-links + (`nil end) + (`partial (or (match-end 3) (1+ (match-end 2)))) + (_ (or (match-end 4) (match-end 2)))))) (add-text-properties start visible-start hidden) (add-text-properties visible-start visible-end properties) (add-text-properties visible-end end hidden) -- 2.17.0