GithubHelp home page GithubHelp logo

Comments (13)

jkitchin avatar jkitchin commented on September 18, 2024

This has not changed any time recently. What does this command output in a typical org-file for you:

(org-ref-find-bibliography)

and what do you have the variable org-ref-default-bibliography set to in your init file?

from org-ref.

jkitchin avatar jkitchin commented on September 18, 2024

I think I see the issue, BIBINPUTS is some environment variable you have set? and helm-bibtex does not search it. You should use (setq org-ref-default-bibliography '("file1" "file2")) in your init files to set a default set of these. It might be possible to use something like (getenv "BIBINPUTS") and split it as needed to get that list too.

from org-ref.

reconmaster avatar reconmaster commented on September 18, 2024

I have org-ref-default-bibliography set to ("~/dropbox/bibliography/references.bib") as mentioned on the site. Evaluating (org-ref-find-bibliography)returns the same value. The only reason I mentioned BIBINPUTS is when using biblatex, I can do \addbibresource(references) and it will find the correct bib file. I only wondered if the issue is with BIBINPUTS is that the error message I get is the name of the correct file without the proper parent directory information. Maybe it has to do with the way org-ref passes the default bibliography to helm-bibtex? As I mentioned, none of my init file or the org paper has changed, I only upgraded org-ref to this new version supporting helm (which I like btw, just trying to figure out why this broke the C-c ] key).

from org-ref.

jkitchin avatar jkitchin commented on September 18, 2024

Does that file actually exist? If not you should make it be an actual
bibtex file.

On Friday, April 17, 2015, Andrew Davis [email protected] wrote:

I have org-ref-default-bibliography set to
("~/dropbox/bibliography/references.bib") as mentioned on the site.
Evaluating (org-ref-find-bibliography)returns the same value. The only
reason I mentioned BIBINPUTS is when using biblatex, I can do
\addbibresource(references) and it will find the correcct bib file. I
only wondered if the issue is with BIBINPUTS is that the error message I
get is the name of the correct file without the proper parent directory
information. Maybe it has to do with the way org-ref passes the default
bibliography to helm-bibtex? As I mentioned, none of my init file or the
org paper has changed, I only upgraded org-ref to this new version
supporting helm (which I like btw, just trying to figure out why this broke
the C-c ] key).


Reply to this email directly or view it on GitHub
#33 (comment).

John


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

from org-ref.

reconmaster avatar reconmaster commented on September 18, 2024

It's an actual file. helm-bibtex and org-ref can find it when I use the two work around methods mentioned in the original post. I also mentioned none of my setup has changed since I was using your org-ref that initially used reftex and worked. Can you use C-c ] without the bibliography:~/wherever/ref.bib in your file?

from org-ref.

jkitchin avatar jkitchin commented on September 18, 2024

Weird. Yes, I routinely use org ref with no bibliography link.

The files get passed to helm bibtex here
https://github.com/jkitchin/org-ref/blob/master/org-ref.el#L3211

from org-ref.

jkitchin avatar jkitchin commented on September 18, 2024

This sounds very strange. I have these variables set in my init file

(setq reftex-default-bibliography '("~/Dropbox/bibliography/references.bib"))

;; see [[org-ref]] for use of these variables
(setq org-ref-bibliography-notes "/Dropbox/bibliography/notes.org"
org-ref-default-bibliography '("
/Dropbox/bibliography/references.bib")
org-ref-pdf-directory "~/Dropbox/bibliography/bibtex-pdfs/")

(setq helm-bibtex-bibliography "/Dropbox/bibliography/references.bib")
(setq helm-bibtex-library-path "
/Dropbox/bibliography/bibtex-pdfs")

(setq helm-bibtex-pdf-open-function
(lambda (fpath)
(start-process "open" "open" "open" fpath)))

(setq helm-bibtex-notes-path "~/Dropbox/bibliography/helm-bibtex-notes")

I am pretty sure these are not all necessary, and that helm-bibtex-bibliography gets temporarily rebound in the org-ref-helm-insert-cite-link function. But, having it set in init.el enables helm-bibtex to work outside of org-ref.

org-ref should not be affected by BIBINPUTS at all.

from org-ref.

reconmaster avatar reconmaster commented on September 18, 2024

Well it seems to be a problem when org-ref tries to pass its bibliography to helm-bibtex. If I modify the the org-ref-helm-insert-cite-link, C-c ] works as expected. Not familiar enough with elisp or org-ref to understand why the let function is necessary here. If there is a dependency on helm-bibtex, shouldn't correctly setting the helm bibliography be sufficient?

(defun org-ref-helm-insert-cite-link (arg)
  "org-ref function to use helm-bibtex to insert a citation link.
With one prefix arg, insert a ref link.
With two prefix args, insert a label link."
  (interactive "P")
  (cond
   ((equal arg nil)
     (;let ((helm-bibtex-bibliography (org-ref-find-bibliography)))
       helm-bibtex))
   ((equal arg '(4))
    (org-ref-helm-insert-ref-link))
   ((equal arg '(16))
    (org-ref-helm-insert-label-link))))

from org-ref.

jkitchin avatar jkitchin commented on September 18, 2024

I don't understand why it won't for you though. You need the let statement to enable the use of the in document bibliography preferentially, but to fall back on the default if there is no document bibliography. It does that by temporarily redefining the variable. It is not enough to just set the helm bibliography variable for that. And, the variable should take a list of files, which is what it is set to in the let statement.

Can you send me the org file you are having trouble using C-c ] in?

from org-ref.

reconmaster avatar reconmaster commented on September 18, 2024

Thanks for helping me find the problem. I had the following commented out at the end of my *.org file.

# \bibliography{ref}

Org-ref found this and was searching my local directory for the non-existent file. No changes need to be made in org-ref. This was my fault. Thanks John!
-A

from org-ref.

jkitchin avatar jkitchin commented on September 18, 2024

no problem!

from org-ref.

TammoR avatar TammoR commented on September 18, 2024

This is a similar question. I also use ox-bibtex for html export and have

#+BIBLIOGRAPHY: ~/Dropbox/library/library plain limit:t option:-nokeywords option:--no-abstract

at the bottom of my document. Org-ref now tries to use this file and complains. If I change to
#+BIBLIOGRAPHY: /Users/tammruka/Dropbox/library/library**.bib**, org-ref works. But then ox-bibtex does not work anymore.

Any idea how I can get org-ref to use the bibliography file that I provide elsewhere and not get irritated by the

#+BIBLIOGRAPHY:

line?

from org-ref.

jkitchin avatar jkitchin commented on September 18, 2024

The best path is probably for org-ref to not look at the #+BIBLIOGRAPHY line at all. It is not that helpful for exporting from org-ref I think, and is only a last resort anyway. I don't know if anyone relies on it though. Maybe I will try removing that and see if anyone complains...

from org-ref.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.