summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-05-22 21:15:57 -0400
committerKyle Meyer <kyle@kyleam.com>2015-05-22 21:15:57 -0400
commit2df81a94b718544b8c621d59ce84bdca35d18ae6 (patch)
treef008d3a65c67bbc82de0d032ecbd45eb99478dd4
parent6064ff94f3a90dd39d88b0cd6de02c67e779fe6b (diff)
downloadbog-2df81a94b718544b8c621d59ce84bdca35d18ae6.tar.gz
Pass alists directly to completing-read
Doh, I didn't know you could do that. Also, use assoc-string instead of assoc.
-rw-r--r--bog.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/bog.el b/bog.el
index 483f5d6..9d61c23 100644
--- a/bog.el
+++ b/bog.el
@@ -558,9 +558,8 @@ If the citekey prompt is slow to appear, consider enabling the
(mapcar (lambda (path)
(cons (file-name-nondirectory path) path))
citekey-files))
- (fname (org-icompleting-read "Select file: "
- (mapcar #'car fname-paths))))
- (setq citekey-file (cdr (assoc fname fname-paths))))))
+ (fname (org-icompleting-read "Select file: " fname-paths)))
+ (setq citekey-file (cdr (assoc-string fname fname-paths))))))
(org-open-file citekey-file)))
(defun bog-citekey-files (citekey)
@@ -1035,9 +1034,8 @@ level `bog-refile-maxlevel' are considered."
(let ((note-paths (mapcar (lambda (path)
(cons (file-name-nondirectory path) path))
(bog-notes))))
- (cdr (assoc (org-icompleting-read "File: "
- (mapcar #'car note-paths))
- note-paths))))
+ (cdr (assoc-string (org-icompleting-read "File: " note-paths)
+ note-paths))))
(defmacro bog--with-search-lprops (&rest body)
"Execute BODY with Bog-related agenda values.