これはorg-mode
のorg-activate-bracket-links
関数によって引き起こされるバグのように見えます。
これは、この関数がどのように見えるかです:
(defun org-activate-bracket-links (limit)
"Run through the buffer and add overlays to bracketed links."
(if (and (re-search-forward org-bracket-link-regexp limit t)
(not (org-in-src-block-p)))
(let* ((hl (org-match-string-no-properties 1))
(help (concat "LINK: " (save-match-data (org-link-unescape hl))))
(ip (org-maybe-intangible
(list 'invisible 'org-link
'keymap org-mouse-map 'mouse-face 'highlight
'font-lock-multiline t 'help-echo help
'htmlize-link `(:uri ,hl))))
(Vp (list 'keymap org-mouse-map 'mouse-face 'highlight
'font-lock-multiline t 'help-echo help
'htmlize-link `(:uri ,hl))))
;; We need to remove the invisible property here. Table narrowing
;; may have made some of this invisible.
(org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
(remove-text-properties (match-beginning 0) (match-end 0)
'(invisible nil))
(if (match-end 3)
(progn
(add-text-properties (match-beginning 0) (match-beginning 3) ip)
(org-rear-nonsticky-at (match-beginning 3))
(add-text-properties (match-beginning 3) (match-end 3) vp)
(org-rear-nonsticky-at (match-end 3))
(add-text-properties (match-end 3) (match-end 0) ip)
(org-rear-nonsticky-at (match-end 0)))
(add-text-properties (match-beginning 0) (match-beginning 1) ip)
(org-rear-nonsticky-at (match-beginning 1))
(add-text-properties (match-beginning 1) (match-end 1) vp)
(org-rear-nonsticky-at (match-end 1))
(add-text-properties (match-end 1) (match-end 0) ip)
(org-rear-nonsticky-at (match-end 0)))
t)))
それは括弧のリンク(例えばの一致を検索し[[target][label]]
、隠して[[target][
追加することにより、一部をip
テキストプロパティに、そしてlinkifies label
追加することによって、vp
テキストプロパティに、そして最終的には、末尾を削除]]
追加することにより、ip
再度、テキストプロパティに。
これはすべて正しいようです。 org-rear-nonsticky-at
プロパティの出血の世話をする必要があります。
この動作はによってトリガーされ(add-text-properties (match-end 3) (match-end 0) ip)
、末尾のを隠し]]
ます。'invisible 'org-link
プロパティのみがこの動作をトリガーし、他のプロパティは無害に見えます。
あなたが上書きする可能性があるorg-activate-bracket-links
ようにip
、もはやセット'invisible
が、'display ""
同じ効果があり、:
(defun org-activate-bracket-links (limit)
"Run through the buffer and add overlays to bracketed links."
(if (and (re-search-forward org-bracket-link-regexp limit t)
(not (org-in-src-block-p)))
(let* ((hl (org-match-string-no-properties 1))
(help (concat "LINK: " (save-match-data (org-link-unescape hl))))
(ip (org-maybe-intangible
(list 'display ""
'keymap org-mouse-map 'mouse-face 'highlight
'font-lock-multiline t 'help-echo help
'htmlize-link `(:uri ,hl))))
(Vp (list 'keymap org-mouse-map 'mouse-face 'highlight
'font-lock-multiline t 'help-echo help
'htmlize-link `(:uri ,hl))))
;; We need to remove the invisible property here. Table narrowing
;; may have made some of this invisible.
(org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
(remove-text-properties (match-beginning 0) (match-end 0)
'(invisible nil))
(if (match-end 3)
(progn
(add-text-properties (match-beginning 0) (match-beginning 3) ip)
(org-rear-nonsticky-at (match-beginning 3))
(add-text-properties (match-beginning 3) (match-end 3) vp)
(org-rear-nonsticky-at (match-end 3))
(add-text-properties (match-end 3) (match-end 0) ip)
(org-rear-nonsticky-at (match-end 0)))
(add-text-properties (match-beginning 0) (match-beginning 1) ip)
(org-rear-nonsticky-at (match-beginning 1))
(add-text-properties (match-beginning 1) (match-end 1) vp)
(org-rear-nonsticky-at (match-end 1))
(add-text-properties (match-end 1) (match-end 0) ip)
(org-rear-nonsticky-at (match-end 0)))
t)))
明らかに、これはいハックです。しかし、それは私のために働いて、あなたのために働くかもしれません。私はまだバグレポートを提出することをお勧めします。