Re: [Ebib-users] Ebib setup
Brought to you by:
joostkremers
From: <ts...@ts...> - 2014-03-10 16:42:20
|
Hi Joost, Joost Kremers <joo...@fa...> writes: > Hi Tom, > > On Sat, Mar 08 2014, Thomas S. Dye <ts...@ts...> wrote: >> I have this Org mode source code block that I evaluate as a local >> variable. >> >> #+name: ebib-setup >> #+begin_src emacs-lisp >> (autoload 'ebib "ebib" "Ebib, a BibTeX database manager." t) >> (dolist (hook '(org-mode-hook)) >> (add-hook hook (lambda () (local-set-key "\C-cb" 'ebib-insert-bibtex-key)))) >> (setq ebib-bib-search-dirs (quote ("./"))) >> (setq ebib-preload-bib-files (quote ("local.bib"))) >> (setq ebib-local-bibtex-filenames (quote ("local.bib"))) >> (setq ebib-citation-commands >> (quote ((org-mode (("cite" "[[cite:%K][%A]]")))))) >> #+end_src >> >> My question: Is it useful to set ebib-local-bibtex-filenames in this >> way? > > Well, since you say you evaluate that block as a local variable, it's > probably the only setting that is truly unproblematic. :-) The other > settings are all global settings, they need to be set only once, when > Emacs (or Ebib) is started. `ebib-local-bibtex-filenames' is a > buffer-local variable, so it's fine to set it anew for each buffer. > > The other variables won't do much harm if you set them again, though > they may not necessarily do what you expect if you load a second file > with different values. `ebib-preload-bib-files', for example, is only > used the first time Ebib is started. So if you load another org file > that has a different valu for it, Ebib won't load the new file unless > you first quit Ebib altogether. > > So I guess it depends a bit on how you use the code whether it will work > well or whether it'll cause confusing problems. Though mostly I think > things'll be fine. > > Best, > > Joost > > > > BTW, you can change the `%A' in ebib-citaton-commands to `%D' to get a > somewhat more intuitive prompt when you put a citation in the text. Thanks for your help. I'll make clear that the sequence is 1) load file, 2) start Ebib. I didn't know about %D--this makes Ebib seem at home with Org mode. Very nice! All the best, Tom -- T.S. Dye & Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com |