Skip to content

Commit 3858a97

Browse files
committed
* lisp/ol.el (org-insert-link): Fix edge case when ALL-PREFIXES is nil
Fix `rx-to-string' error when no link types are registered in Org. See https://orgmode.org/list/8bbccdb4-52f4-b9b5-eb10-252bb15108ec@gmail.com
1 parent 2bbb92a commit 3858a97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lisp/ol.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1976,7 +1976,8 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
19761976
(unless auto-desc
19771977
(let* ((type
19781978
(cond
1979-
((string-match (rx-to-string `(: string-start (submatch (or ,@all-prefixes)) ":")) link)
1979+
((and all-prefixes
1980+
(string-match (rx-to-string `(: string-start (submatch (or ,@all-prefixes)) ":")) link))
19801981
(match-string 1 link))
19811982
((file-name-absolute-p link) "file")
19821983
((string-match "\\`\\.\\.?/" link) "file")))

0 commit comments

Comments
 (0)