summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README19
-rw-r--r--README.org19
-rw-r--r--bog-todo.org3
-rw-r--r--bog.el13
4 files changed, 44 insertions, 10 deletions
diff --git a/README b/README
index 8409bc1..684bed6 100644
--- a/README
+++ b/README
@@ -91,10 +91,21 @@ and taking notes with Org, not on writing research articles with Org.
| Article notes
`----
- "name2000word" is the study header. (The default format for the
- citekey is the first author's last name, the year, and then the first
- non-trivial word.) Bog expects the study citekey to be the title or
- property of a heading.
+ "name2000word" is the study header. Bog expects the study citekey to
+ be the title or property of a heading.
+
+ The default format for the citekey is the first author's last name,
+ the year, and then the first non-trivial word. To have BibTeX mode
+ automatically generate a key of this format, the `bibtex=autokey-*'
+ settings can be modified.
+
+ ,----
+ | (setq bibtex-autokey-year-length 4
+ | bibtex-autokey-titleword-length nil
+ | bibtex-autokey-titlewords-stretch 0
+ | bibtex-autokey-titlewords 1
+ | bibtex-autokey-year-title-separator "")
+ `----
If the study was added when checking journals online, I tend to add
the URL right under the heading. However, I often add citekeys from
diff --git a/README.org b/README.org
index 16f8c6b..a3315ec 100644
--- a/README.org
+++ b/README.org
@@ -59,10 +59,21 @@ file studies under.
Article notes
#+end_example
-"name2000word" is the study header. (The default format for the citekey
-is the first author's last name, the year, and then the first
-non-trivial word.) Bog expects the study citekey to be the title or
-property of a heading.
+"name2000word" is the study header. Bog expects the study citekey to be
+the title or property of a heading.
+
+The default format for the citekey is the first author's last name, the
+year, and then the first non-trivial word. To have BibTeX mode
+automatically generate a key of this format, the =bibtex=autokey-*=
+settings can be modified.
+
+#+begin_src emacs-lisp
+ (setq bibtex-autokey-year-length 4
+ bibtex-autokey-titleword-length nil
+ bibtex-autokey-titlewords-stretch 0
+ bibtex-autokey-titlewords 1
+ bibtex-autokey-year-title-separator "")
+#+end_src
If the study was added when checking journals online, I tend to add the
URL right under the heading. However, I often add citekeys from the
diff --git a/bog-todo.org b/bog-todo.org
index fd4a0ae..09bb0b2 100644
--- a/bog-todo.org
+++ b/bog-todo.org
@@ -18,7 +18,8 @@ Perhaps use a cache file. This could be used in
** DONE [#A] Add README
CLOSED: [2014-02-03 Mon 01:53]
-** DOC Describe BibTeX autokey settings for `bog-citekey-format'
+** DONE Describe BibTeX autokey settings for `bog-citekey-format'
+ CLOSED: [2014-02-08 Sat 00:32]
** DOC Mention useful tools
diff --git a/bog.el b/bog.el
index 3a17a9b..4ab2043 100644
--- a/bog.el
+++ b/bog.el
@@ -41,9 +41,20 @@
(defcustom bog-citekey-format
"\\([0-9]*[a-z]+[-a-z]*\\)\\([0-9]\\{4\\}\\)\\([a-z]+\\)"
"Regex used to match study citekey.
+
By default, this matches any sequence of lower case
letters (allowing hyphenation) that is followed by 4 digits and
-then lower case letters."
+then lower case letters.
+
+The default format corresponds to the following BibTeX autokey
+settings:
+
+ (setq bibtex-autokey-year-length 4
+ bibtex-autokey-titleword-length nil
+ bibtex-autokey-titlewords-stretch 0
+ bibtex-autokey-titlewords 1
+ bibtex-autokey-year-title-separator \"\")
+"
:group 'bog
:type 'string)