Nowadays I often insert @Online
entries into my bibliography files.
Unfortunately, the RefTeX doesn't have the Online-Entry bound to any key by default.
I tried to add something like
;; I often use the "@Online" entry in my bibliographies.
;; Unfortunately, no key binding was defined by default. I think C-c
;; C-e C-o would be a good choice and is still unused.
(define-key reftex-mode-map (kbd "C-c C-e C-O") 'bibtex-Online)
Running eval-last-sexp
(bound to C-xC-e) gave no error, but said bibtex-Online
as expected.
What is my mistake?
EDIT
After having Emacs restarted, the key binding worked, but unfortunately (again!) not in a buffer with a bibliography file! I was working on my LaTeX file and when I tried to insert a new environment by pressing C-cC-e, but instead of asking which environment I was about to insert, Emacs waited for the next keypress an ah voilà, after completing the session with C-o Emacs most happily inserted an template for an Online document (@Online{...}
) into my LaTeX buffer. Yet, still, the key binding didn't work in the bibliography buffer :-(
C-c C-e C-o
would be a good choice and is still unused. From Emacs lisp manual: Don't defineC-c letter
as a key in Lisp programs. Sequences consisting ofC-c
and a letter (either upper or lower case) are reserved for users; they are the only sequences reserved for users, so do not block them.C-c
and a letter (either upper or lower case)" would match e.g.C-c o
orC-c O
. But I usedC-c C-e C-o
, which shouldn't match? At least, I choose it, as all of the bibliography entries are starting withC-c C-e
as a prefix. So i guess, it can't be that false?bibtex
maintainer to possibly add your binding to the mode.C-c o
andC-c O
are already defined by me (and even more important) well trained to me. I understand your hint, that my personal keybinding could rise a conflict, if thebibtex-mode
-maintainer decide, to add exact this keybinding to their package?C-c C-e C-o
and notC-c [oO]
:-)