From fab789a8758570d838dde74305fedeed106439b7 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 12 Feb 2014 00:53:49 -0500 Subject: BUG: Fix logic in citekey selection `bog-citekey-action' should not try to select a citekey from the note context when ASK-FUNC returns non-nil. --- bog-tests.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bog-tests.el') diff --git a/bog-tests.el b/bog-tests.el index b6d8ef0..6f64593 100644 --- a/bog-tests.el +++ b/bog-tests.el @@ -139,6 +139,16 @@ (show-all) (should-error (bog-citekey-action nil nil nil)))) +(ert-deftest bog-citekey-action-askfunc () + (let* ((citekey "name2010word") + (ask-func '(lambda () citekey)) + (action '(lambda (ck) ck))) + (with-temp-buffer + (insert "\n* top level\n\n** second\n\n") + (org-mode) + (show-all) + (should (equal (bog-citekey-action action ask-func t) citekey))))) + ;;; BibTeX functions -- cgit v1.2.3