emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 3858a97ac3 3/5: * lisp/ol.el (org-insert-link): Fix


From: ELPA Syncer
Subject: [elpa] externals/org 3858a97ac3 3/5: * lisp/ol.el (org-insert-link): Fix edge case when ALL-PREFIXES is nil
Date: Sat, 6 Aug 2022 02:57:51 -0400 (EDT)

branch: externals/org
commit 3858a97ac3d1d466bc9a81daa6445d99db735a49
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    * 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
---
 lisp/ol.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ol.el b/lisp/ol.el
index 04da3a686c..dd60d78f32 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1976,7 +1976,8 @@ Use TAB to complete link prefixes, then RET for 
type-specific completion support
     (unless auto-desc
       (let* ((type
               (cond
-               ((string-match (rx-to-string `(: string-start (submatch (or 
,@all-prefixes)) ":")) link)
+               ((and all-prefixes
+                     (string-match (rx-to-string `(: string-start (submatch 
(or ,@all-prefixes)) ":")) link))
                 (match-string 1 link))
                ((file-name-absolute-p link) "file")
                ((string-match "\\`\\.\\.?/" link) "file")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]