From 28b53dcc638f24300fd038b494accffc09ff7b3a Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 8 Dec 2014 23:36:01 -0500 Subject: Avoid ambiguous use of 'notes' In general, 'notes' are used to refer to Org file in `bog-note-directory'. Rename `bog-citekey-from-notes' (and related selection functions), which refer to the context around the point in an Org file, not the collection of note files. --- bog-tests.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'bog-tests.el') diff --git a/bog-tests.el b/bog-tests.el index 8263b5d..598dc31 100644 --- a/bog-tests.el +++ b/bog-tests.el @@ -196,36 +196,36 @@ some text some text" (should (equal (bog-citekey-from-tree) citekey))))) -;; `bog-citekey-from-notes' +;; `bog-citekey-from-surroundings' -(ert-deftest bog-citekey-from-notes-on-heading () +(ert-deftest bog-citekey-from-surroundings-on-heading () (let ((citekey "name2010word")) (bog-tests--with-temp-text " * top level ** some text" - (should (equal (bog-citekey-from-notes) citekey))))) + (should (equal (bog-citekey-from-surroundings) citekey))))) -(ert-deftest bog-citekey-from-notes-before-text-citekey () +(ert-deftest bog-citekey-from-surroundings-before-text-citekey () (let ((citekey "name2010word")) (bog-tests--with-temp-text " * top level ** other2000key some text and " - (should (equal (bog-citekey-from-notes) citekey))))) + (should (equal (bog-citekey-from-surroundings) citekey))))) -(ert-deftest bog-citekey-from-notes-after-text-citekey () +(ert-deftest bog-citekey-from-surroundings-after-text-citekey () (let ((citekey "name2010word")) (bog-tests--with-temp-text " * top level ** other2000key some text and " - (should (equal (bog-citekey-from-notes) citekey))))) + (should (equal (bog-citekey-from-surroundings) citekey))))) -(ert-deftest bog-citekey-from-notes-on-text-citekey () +(ert-deftest bog-citekey-from-surroundings-on-text-citekey () (let ((citekey "name2010word")) (bog-tests--with-temp-text " @@ -233,14 +233,14 @@ some text and " ** other2000key some text and " (forward-char) - (should (equal (bog-citekey-from-notes) citekey))))) + (should (equal (bog-citekey-from-surroundings) citekey))))) -(ert-deftest bog-citekey-from-notes-no-citekey () +(ert-deftest bog-citekey-from-surroundings-no-citekey () (bog-tests--with-temp-text " * top level ** second" - (should-not (bog-citekey-from-notes)))) + (should-not (bog-citekey-from-surroundings)))) ;;; File functions -- cgit v1.2.3