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

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

[elpa] externals/gnorb a64f652 094/449: Have gnorb-org-popup-bbdb scan t


From: Stefan Monnier
Subject: [elpa] externals/gnorb a64f652 094/449: Have gnorb-org-popup-bbdb scan the whole subtree
Date: Fri, 27 Nov 2020 23:15:15 -0500 (EST)

branch: externals/gnorb
commit a64f652567700d25c23d279c3a415ad2a9e6d810
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Have gnorb-org-popup-bbdb scan the whole subtree
    
    lisp/gnorb-org.el: Not sure why I was limiting it to just the heading.
                   This bring it a little more in line with
                   `gnorb-org-view', and in fact there could be a some
                   sharing of work there
---
 lisp/gnorb-org.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index c69e3f1..6dee6e3 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -654,12 +654,15 @@ search."
          ((eq major-mode 'org-mode)
           (save-excursion
             (org-back-to-heading)
-            (while (re-search-forward
-                    org-bracket-link-analytic-regexp (line-end-position) t)
-              (when (string-match-p "bbdb" (match-string 2))
-                (let* ((desc (match-string 5))
-                       (rec (bbdb-search (bbdb-records) desc desc desc)))
-                  (setq recs (append recs rec))))))))
+            (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)
+                       rec (bbdb-search (bbdb-records) desc desc desc)
+                       recs (append recs rec))))))))
     (if recs
        (bbdb-display-records
         recs gnorb-org-bbdb-popup-layout)



reply via email to

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