diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-05-22 21:15:57 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-05-22 21:15:57 -0400 |
commit | 2df81a94b718544b8c621d59ce84bdca35d18ae6 (patch) | |
tree | f008d3a65c67bbc82de0d032ecbd45eb99478dd4 | |
parent | 6064ff94f3a90dd39d88b0cd6de02c67e779fe6b (diff) | |
download | bog-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.el | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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. |