[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb bfac92e 2/3: Do a better job of protecting against
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb bfac92e 2/3: Do a better job of protecting against bogus Org links |
Date: |
Mon, 23 Mar 2020 13:07:33 -0400 (EDT) |
branch: externals/ebdb
commit bfac92ec42feae6d40d5ab15fead38ed40096d16
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Do a better job of protecting against bogus Org links
* ebdb-org.el (ebdb-org-retrieve): If the "field symbol" isn't a
symbol at all, don't feed it to `child-of-class-p'.
---
ebdb-org.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/ebdb-org.el b/ebdb-org.el
index 72887b1..8f49dc8 100644
--- a/ebdb-org.el
+++ b/ebdb-org.el
@@ -109,8 +109,12 @@
(`("address" ,key) (ebdb-search (ebdb-records) `((ebdb-field-address
,key))))
(`("notes" ,key) (ebdb-search (ebdb-records) `((ebdb-field-notes ,key))))
(`("tags" ,key) (ebdb-search (ebdb-records) `((ebdb-org-field-tags ,key))))
- (`(,(and field (guard (child-of-class-p (intern-soft field) 'ebdb-field)))
,key)
- (ebdb-search (ebdb-records) `((,(intern-soft field) ,key))))
+ (`(,(and field
+ (let field-sym (intern-soft field))
+ (and field-sym
+ (guard (child-of-class-p field-sym 'ebdb-field))))
+ ,key)
+ (ebdb-search (ebdb-records) `((,field-sym ,key))))
(`(,other _) (error "Unknown field search prefix: %s" other))))
(defun ebdb-org-export (path desc format)