Di bawah ini adalah versi yang dimodifikasi org-make-link-regexp
yang akan memungkinkan satu tingkat kurung kurung persegi di dalam deskripsi:
(defun org-make-link-regexps ()
"Update the link regular expressions.
This should be called after the variable `org-link-types' has changed."
(setq org-link-types-re
(concat
"\\`\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):")
org-link-re-with-space
(concat
"<?\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
"\\([^" org-non-link-chars " ]"
"[^" org-non-link-chars "]*"
"[^" org-non-link-chars " ]\\)>?")
org-link-re-with-space2
(concat
"<?\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
"\\([^" org-non-link-chars " ]"
"[^\t\n\r]*"
"[^" org-non-link-chars " ]\\)>?")
org-link-re-with-space3
(concat
"<?\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
"\\([^" org-non-link-chars " ]"
"[^\t\n\r]*\\)")
org-angle-link-re
(concat
"<\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
"\\([^" org-non-link-chars " ]"
"[^" org-non-link-chars "]*"
"\\)>")
org-plain-link-re
(concat
"\\<\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
(org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)"))
;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
org-bracket-link-regexp
;; "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
"\\[\\[\\([^][]+\\)\\]\\(\\[\\([^[]*?\\[[^]]*?\\][^]]*?\\|[^][]+\\)\\]\\)?\\]"
org-bracket-link-analytic-regexp
(concat
"\\[\\["
"\\(\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):\\)?"
"\\([^]]+\\)"
"\\]"
"\\(\\[" "\\([^[]*?\\[[^]]*?\\][^]]*?\\|[^]]+\\)" "\\]\\)?"
;; "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
"\\]")
org-bracket-link-analytic-regexp++
(concat
"\\[\\["
"\\(\\(" (mapconcat 'regexp-quote (cons "coderef" org-link-types) "\\|") "\\):\\)?"
"\\([^]]+\\)"
"\\]"
"\\(\\[" "\\([^]]+\\)" "\\]\\)?"
"\\]")
org-any-link-re
(concat "\\(" org-bracket-link-regexp "\\)\\|\\("
org-angle-link-re "\\)\\|\\("
org-plain-link-re "\\)")))
Tetapi seperti yang disebutkan di atas, ini tidak menyelesaikan masalah pengeditan tautan (Org masih ingin mengganti tanda kurung dengan kurung kurawal.) Ini juga hanya dapat menangani satu level bersarang dari satu grup kurung.
org-make-link-regexps
, tetapi secara umum itu tidak dapat dilakukan dengan pengaturan saat ini.