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

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

[elpa] externals/gnorb 3fb0aed 438/449: [gnorb] Fixes to link scanning,


From: Stefan Monnier
Subject: [elpa] externals/gnorb 3fb0aed 438/449: [gnorb] Fixes to link scanning, bump to 1.6.6
Date: Fri, 27 Nov 2020 23:16:28 -0500 (EST)

branch: externals/gnorb
commit 3fb0aed2128211b0e54409b3e3d2fe491c3c5a0f
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    [gnorb] Fixes to link scanning, bump to 1.6.6
    
    * packages/gnorb/gnorb-utils.el (gnorb-scan-links): split-string
    splits on *all* occurances of the separator -- we only wanted to split
    on the first occurance.
---
 gnorb-utils.el | 17 +++++++++++------
 gnorb.el       |  2 +-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnorb-utils.el b/gnorb-utils.el
index fb85d54..a4fcf34 100644
--- a/gnorb-utils.el
+++ b/gnorb-utils.el
@@ -481,12 +481,17 @@ to those symbols."
   (unless (= (point) bound)
     (let ((alist (mapcar #'list (copy-sequence types))))
       (while (re-search-forward org-link-any-re bound t)
-       (pcase-let* ((`(,type ,link) (split-string
-                                     (match-string-no-properties 2)
-                                     ":"))
-                    (sym (intern-soft type)))
-         (when (and sym (memq sym types))
-           (push link (alist-get sym alist)))))
+       (let ((link (or
+                    ;; Bracket link.
+                    (match-string-no-properties 2)
+                    ;; "Bare" link.
+                    (match-string-no-properties 0)))
+             sym)
+         (when (string-match "\\([^:]+\\):\\(.+\\)" link)
+           (setq sym (intern-soft (match-string 1 link))
+                 link (match-string 2 link))
+           (when (and sym (memq sym types))
+             (push link (alist-get sym alist))))))
       alist)))
 
 (defun gnorb-msg-id-to-link (msg-id &optional server-group)
diff --git a/gnorb.el b/gnorb.el
index 0c9edfb..8a9cf45 100644
--- a/gnorb.el
+++ b/gnorb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2018-2020  Free Software Foundation, Inc.
 
-;; Version: 1.6.5
+;; Version: 1.6.6
 ;; Package-Requires: ((cl-lib "0.5"))
 
 ;; Maintainer: Eric Abrahamsen <eric@ericabrahamsen.net>



reply via email to

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