[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb f3f3bf2 128/449: Fix Agenda BBDB popup for search
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb f3f3bf2 128/449: Fix Agenda BBDB popup for searches with no tags |
Date: |
Fri, 27 Nov 2020 23:15:23 -0500 (EST) |
branch: externals/gnorb
commit f3f3bf20e24fec8eb3e0958c84d2422f346f84d7
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Fix Agenda BBDB popup for searches with no tags
lisp/gnorb-org.el: (gnorb-org-popup-bbdb) Previously, if there were no
tags in the agenda search, *all* BBDB records with
org-tags fields were popped up. Oops.
---
lisp/gnorb-org.el | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index 82a4ffa..08708fd 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -779,17 +779,18 @@ search."
(push (mapconcat 'identity (nreverse acc) "") out-or))
(setq str (mapconcat 'identity (nreverse out-or) "|"))
(setq tag-clause (cdr (org-make-tags-matcher str)))
- (setq recs
- (remove-if-not
- (lambda (r)
- (let ((rec-tags (bbdb-record-xfield
- r gnorb-bbdb-org-tag-field)))
- (and rec-tags
- (let ((tags-list (org-split-string rec-tags ":"))
- (case-fold-search t)
- (org-trust-scanner-tags t))
- (eval tag-clause)))))
- (bbdb-records)))))
+ (unless (equal str "")
+ (setq recs
+ (remove-if-not
+ (lambda (r)
+ (let ((rec-tags (bbdb-record-xfield
+ r gnorb-bbdb-org-tag-field)))
+ (and rec-tags
+ (let ((tags-list (org-split-string rec-tags ":"))
+ (case-fold-search t)
+ (org-trust-scanner-tags t))
+ (eval tag-clause)))))
+ (bbdb-records))))))
((eq major-mode 'org-mode)
(save-excursion
(org-back-to-heading)
@@ -798,10 +799,10 @@ search."
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))))))))
+ (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)
- [elpa] externals/gnorb 7f67221 098/449: Allow for more "query" types in nnir-run-gnorb, (continued)
- [elpa] externals/gnorb 7f67221 098/449: Allow for more "query" types in nnir-run-gnorb, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d394ed3 099/449: Let nnir-run-gnorb handle gnus version 5.13, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e3db6ae 111/449: Return visit candidates correctly., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 4a845bd 116/449: Who knew there's actually a version= function?, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 85797d0 120/449: Be more careful about what MIME parts we attach, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e4ab4d5 122/449: Finer control over how attachments are saved, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5d20bb5 125/449: Clean up saved sent-message info, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 908cdee 107/449: Slight improvement to point placement in new messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a083a99 114/449: First draft: BBDB field for saving links to messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e33a758 127/449: Clearer docstring, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f3f3bf2 128/449: Fix Agenda BBDB popup for searches with no tags,
Stefan Monnier <=
- [elpa] externals/gnorb 7e9235f 138/449: First highly ugly version of gnorb-gnus-view, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a51a99d 142/449: Speedier display of messages in nnir search, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0b7c640 074/449: Make use of the multivalued property functions, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f3e56d2 042/449: gnorb-org-mail-todos -- new docstring and default, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8f598e1 044/449: Delete previous commented function, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b5d3731 046/449: What on earth was that still doing there?, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0db3991 051/449: Move mail search backend stuff to gnorb-gnus, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9fff78a 057/449: Changing email TODO handling to operate by org ID, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 30afb67 068/449: Various docstring and comment edits., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7052248 069/449: New generalized function gnorb-trigger-todo-action, Stefan Monnier, 2020/11/27