From 591cd3487591dca3d55c1c7a6c2c6039771388ef Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Sun, 26 Jun 2016 18:27:51 -0400 Subject: [PATCH] make individual bracket links invisible To: emacs-orgmode@gnu.org if org-link-type-visibility is 'org-link or non-existant the link type will behave normallay. If not, it will not be folded so the path and descripbtion is visible. --- lisp/org.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index f1c500d..b41d139 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6048,11 +6048,17 @@ by a #." (defun org-activate-bracket-links (limit) "Add text properties for bracketed links." (if (and (re-search-forward org-bracket-link-regexp limit t) - (not (org-in-src-block-p))) + (not (org-in-src-block-p))) (let* ((hl (org-match-string-no-properties 1)) (help (concat "LINK: " (save-match-data (org-link-unescape hl)))) + (type (save-match-data + (string-match "\\(.*?\\):" hl) + (match-string 1 hl))) (ip (org-maybe-intangible - (list 'invisible 'org-link + (list 'invisible (let ((li (intern (format + "org-link-%s-invisibility" + type)))) + (if (boundp li) (symbol-value li) 'org-link)) 'keymap org-mouse-map 'mouse-face 'highlight 'font-lock-multiline t 'help-echo help 'htmlize-link `(:uri ,hl)))) -- 2.4.4