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

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

[elpa] master 3ded0a6: [gnorb] Update to use org-link-any-re, bump to 1.


From: Eric Abrahamsen
Subject: [elpa] master 3ded0a6: [gnorb] Update to use org-link-any-re, bump to 1.6.5
Date: Fri, 7 Feb 2020 16:57:39 -0500 (EST)

branch: master
commit 3ded0a6992c8ff7ef31d85fdfe1c34534d1b03cc
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    [gnorb] Update to use org-link-any-re, bump to 1.6.5
    
    * packages/gnorb/gnorb-org.el (gnorb-org-popup-bbdb): At some point
    org-bracket-link-analytic-regexp was made an alias for
    org-link-bracket-re, but of course the match groups weren't the same
    so it was just broken. Switch directly to using org-link-any-re.
    * packages/gnorb/gnorb-utils.el (gnorb-scan-links): Ditto.
---
 packages/gnorb/gnorb-org.el   |  8 ++++----
 packages/gnorb/gnorb-utils.el | 14 +++++++-------
 packages/gnorb/gnorb.el       |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/packages/gnorb/gnorb-org.el b/packages/gnorb/gnorb-org.el
index 81cb176..7f51bb2 100644
--- a/packages/gnorb/gnorb-org.el
+++ b/packages/gnorb/gnorb-org.el
@@ -779,10 +779,10 @@ search."
             (let ((bound (org-element-property
                           :end (org-element-at-point)))
                   desc rec)
-              (while (re-search-forward
-                      org-bracket-link-analytic-regexp bound t)
-                (when (string-match-p "bbdb" (match-string 2))
-                  (setq desc (match-string 5)
+              (while (re-search-forward org-link-any-re bound t)
+                (when (string-match-p "bbdb" (car (split-string
+                                                   (match-string 2) ":")))
+                  (setq desc (match-string 3)
                         rec (bbdb-search (bbdb-records) desc desc desc)
                         recs (append recs rec))))))))
     (if recs
diff --git a/packages/gnorb/gnorb-utils.el b/packages/gnorb/gnorb-utils.el
index ce5ebc3..fb85d54 100644
--- a/packages/gnorb/gnorb-utils.el
+++ b/packages/gnorb/gnorb-utils.el
@@ -473,19 +473,19 @@ TYPES is a list of symbols; we search for all links 
corresponding
 to those symbols."
   ;; It may be excessive to examine *all* links, rather than just
   ;; creating a specialized regexp for the links we want, but it's
-  ;; nice to be lazy and use `org-bracket-link-analytic-regexp', that
-  ;; seems safer.
+  ;; nice to be lazy and use `org-link-any-re', that seems safer.
 
   ;; This function should also *not* be responsible for unescaping
   ;; links -- we don't know what they're going to be used for, and
   ;; unescaped is safer.
   (unless (= (point) bound)
     (let ((alist (mapcar #'list (copy-sequence types))))
-      (while (re-search-forward org-bracket-link-analytic-regexp bound t)
-       (let* ((type (match-string-no-properties 2))
-              (link (match-string-no-properties 3))
-              (sym (intern-soft type)))
-         (when (memq sym 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)))))
       alist)))
 
diff --git a/packages/gnorb/gnorb.el b/packages/gnorb/gnorb.el
index b7eed14..64b0354 100644
--- a/packages/gnorb/gnorb.el
+++ b/packages/gnorb/gnorb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2018-2020  Free Software Foundation, Inc.
 
-;; Version: 1.6.4
+;; Version: 1.6.5
 ;; Package-Requires: ((cl-lib "0.5"))
 
 ;; Maintainer: Eric Abrahamsen <address@hidden>



reply via email to

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