From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: bibtex setup .dir-locals.el Date: Wed, 31 Oct 2018 11:27:54 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHsPg-0005SQ-DV for emacs-orgmode@gnu.org; Wed, 31 Oct 2018 11:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHsPc-0006xW-6u for emacs-orgmode@gnu.org; Wed, 31 Oct 2018 11:28:08 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:46439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHsPa-0006l9-CU for emacs-orgmode@gnu.org; Wed, 31 Oct 2018 11:28:04 -0400 Received: by mail-ed1-x52d.google.com with SMTP id f8-v6so1632293edt.13 for ; Wed, 31 Oct 2018 08:28:00 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: edgar@openmail.cc Cc: emacs-orgmode@gnu.org That looks right. I have this in a .dir-locals.el file and when I use org-ref, it only shows me references from that file. ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((org-mode (org-ref-default-bibliography . ("./References.bib")) (bibtex-completion-bibliography . ("./References.bib")))) You do have to close the org-file, and then reopen it after you make that file, and when I do that I am prompted whether to apply or ignore the settings. It might be simpler to just use a bibliography link in the file though: bibliography:References.bib edgar@openmail.cc writes: > Hello, > > I would like to know how to set my ~References.bib~ as a dir-local variab= le for > use with bibtex (org-ref, reftex). I have this in my ~.dir-locals.el~. It= keeps > showing the global list of references. Thanks! > > #+BEGIN_SRC emacs-lisp > ;;; Directory Local Variables > ;;; For more information see (info "(emacs) Directory Variables") > > ( > (org-mode > (reftex-default-bibliography . ("/Class/Biomat/Hw/Project/References.= bib")) > (org-ref-default-bibliography . ("/Class/Biomat/Hw/Project/References= .bib")) > (bibtex-completion-bibliography . > ("/Class/Biomat/Hw/Project/References.bib")) > (org-ref-bibliography-notes . "/Class/Biomat/Hw/Project/report-biomat= .org") > (bibtex-completion-notes-path . > "/Class/Biomat/Hw/Project/report-biomat.org") > (org-ref-pdf-directory . "/Class/Biomat/Hw/Project/Media/") > (bibtex-completion-library-path . "/Class/Biomat/Hw/Project/Media/") > ) > > (bibtex-mode > (reftex-default-bibliography . ("/Class/Biomat/Hw/Project/References.= bib")) > (org-ref-default-bibliography . ("/Class/Biomat/Hw/Project/References= .bib")) > (bibtex-completion-bibliography . > ("/Class/Biomat/Hw/Project/References.bib")) > > (org-ref-bibliography-notes > . > "/Class/Biomat/Hw/Project/report-biomat.org") > > (bibtex-completion-notes-path > . > "/Class/Biomat/Hw/Project/report-biomat.org") > > (org-ref-pdf-directory > . > "/Class/Biomat/Hw/Project/Media/") > > (bibtex-completion-library-path > . > "/Class/Biomat/Hw/Project/Media/") > ) > ) > #+END_SRC > > As an example: > #+BEGIN_EXAMPLE > reftex-default-bibliography is a variable defined in =E2=80=98reftex-va= rs.el=E2=80=99. > Its value is > ("/Class/Biomat/Hw/Project/References.bib") > Original value was nil > Local in buffer report-biomat.org; global value is > ("//Research/References.bib") > > This variable=E2=80=99s value is directory-local, set by the file > =E2=80=98/Class/Biomat/Hw/Project/.dir-locals.el=E2=80=99. > > Documentation: > List of BibTeX database files which should be used if none are specifie= d. > When =E2=80=98reftex-citation=E2=80=99 is called from a document which = has neither a > =E2=80=98\bibliography{..}=E2=80=99 statement nor a =E2=80=98thebibliog= raphy=E2=80=99 environment, > RefTeX will scan these files instead. Intended for using =E2=80=98reft= ex-citation=E2=80=99 > in non-LaTeX files. The files will be searched along the BIBINPUTS or = TEXBIB > path. > > You can customize this variable. > #+END_EXAMPLE > > My system > #+BEGIN_SRC emacs-lisp > (concat > (emacs-version) "\n" > (org-version) "\n" > (org-ref-version)) > #+END_SRC > > #+RESULTS: > : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) > : of 2018-07-05 > : 9.1.14 > : org-ref: Version 1.1.1 > > ------------------------------------------------- > > ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of t= he NSA's hands! > $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No ba= ndwidth > quotas! > Commercial and Bulk Mail Options! -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu