summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bog-tests.el14
-rw-r--r--bog.el4
2 files changed, 9 insertions, 9 deletions
diff --git a/bog-tests.el b/bog-tests.el
index 5b0cd79..524bdd2 100644
--- a/bog-tests.el
+++ b/bog-tests.el
@@ -44,27 +44,27 @@
(goto-char (point-min))
(should (equal (bog-citekey-at-point) citekey)))))
-;; `bog-citekey-heading'
+;; `bog-citekey-from-heading-title'
-(ert-deftest bog-citekey-heading-current-level ()
+(ert-deftest bog-citekey-from-heading-title-current-level ()
(let ((citekey "name2010word"))
(with-temp-buffer
(insert (format "\n* top level\n\n** %s\n\nsome text\n"
citekey))
(org-mode)
(show-all)
- (should (equal (bog-citekey-heading) citekey)))))
+ (should (equal (bog-citekey-from-heading-title) citekey)))))
-(ert-deftest bog-citekey-heading-in-parent ()
+(ert-deftest bog-citekey-from-heading-title-in-parent ()
(let ((citekey "name2010word"))
(with-temp-buffer
(insert (format "\n* top level\n\n** %s\n\n*** subheading\n\nsome text\n"
citekey))
(org-mode)
(show-all)
- (should (equal (bog-citekey-heading) citekey)))))
+ (should (equal (bog-citekey-from-heading-title) citekey)))))
-(ert-deftest bog-citekey-heading-on-heading ()
+(ert-deftest bog-citekey-from-heading-title-on-heading ()
(let ((citekey "name2010word"))
(with-temp-buffer
(insert (format "\n* top level\n\n** %s\n\nsome text\n"
@@ -72,7 +72,7 @@
(org-mode)
(show-all)
(re-search-backward bog-citekey-format)
- (should (equal (bog-citekey-heading) citekey)))))
+ (should (equal (bog-citekey-from-heading-title) citekey)))))
(ert-deftest bog-citekey-action-in-normal-text ()
(let ((citekey "name2010word"))
diff --git a/bog.el b/bog.el
index 44514f5..0b97b40 100644
--- a/bog.el
+++ b/bog.el
@@ -114,7 +114,7 @@ from the first parent heading that matches `bog-citekey-format'.
ACTION will be called with the resulting citekey as an argument."
(let* ((citekey (and ask-citekey (funcall ask-func)))
(citekey (or (bog-citekey-at-point)
- (bog-citekey-heading))))
+ (bog-citekey-from-heading-title))))
(funcall action citekey)))
(defun bog-select-citekey (citekeys)
@@ -141,7 +141,7 @@ year, and the first meaningful word in the title)."
(bog-citekey-only-p maybe-citekey))
maybe-citekey)))
-(defun bog-citekey-heading ()
+(defun bog-citekey-from-heading-title ()
"Return first org heading that matches `bog-citekey-format'."
(save-excursion
(save-restriction