emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-ref is not using default bibliography file
@ 2015-12-12 16:43 Kai Chen
  2015-12-12 18:15 ` John Kitchin
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Chen @ 2015-12-12 16:43 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]

Dear list,

I just got to know org-ref, and I followed the github help page to manually
install the package and set the default path similar to the configuration
provided in the follow link:
https://github.com/jkitchin/org-ref

And I installed all the dependency packages like helm-bibtex, hydra etc.

But when I am citing (using "C-c ]") an existing entry which is in the
default references.bib file, I can see the entry after I stroke the
command, but after I selected it and pressed enter, when the cursor is on
the link, the mini-buffer says:
!!! No entry found !!!
But previously the org-ref-helm-insert-cite-link properly showed that
entry. This can only work when I manually add a bibliography link at the
bottom of the file, which means org-ref is not using the default
bibliography file.

So what should I check to fix this issue?

Thanks for your help!

The following is my configuration of org-ref:

#+BEGIN_SRC emacs-lisp
  (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))

  (setq reftex-default-bibliography (concat my-dropbox-path
"bibliography/references.bib"))

  ;; see org-ref for use of these variables
  (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
notes.org")
        org-ref-default-bibliography (concat my-dropbox-path
"bibliography/references.bib")
        org-ref-pdf-directory (concat my-dropbox-path
"bibliography/bibtex-pdfs/"))

  ;; *** helm-bibtex

  (setq helm-bibtex-bibliography (concat my-dropbox-path
"bibliography/references.bib"))
  (setq helm-bibtex-library-path (concat my-dropbox-path
"bibliography/bibtex-pdfs"))

  ;; open pdf with system pdf viewer (works on mac)
  (when (eq system-type 'darwin)
    (setq helm-bibtex-pdf-open-function
      (lambda (fpath)
        (start-process "open" "*open*" "open" fpath))))

  ;; alternative
  ;; (setq helm-bibtex-pdf-open-function 'org-open-file)

  (setq helm-bibtex-notes-path (concat my-dropbox-path
"bibliography/helm-bibtex-notes"))

  (global-set-key [f10] 'org-ref-open-bibtex-notes)
  (global-set-key [f11] 'org-ref-open-bibtex-pdf)
  (global-set-key [f12] 'org-ref-open-in-browser)

  (add-to-list 'load-path org-ref-path)

  ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
key-chord
  ;; in your load-path
  ;; auto-install dependencies
  (require 'org-ref)

  ;; optional but very useful libraries in org-ref
  (require 'doi-utils)
  (require 'jmax-bibtex)
  (require 'pubmed)
  (require 'arxiv)
  (require 'sci-id)

#+END_SRC


-- 
Regards

Multi-Agent System Lab
University of Science and Technology of China

K.Chen

[-- Attachment #2: Type: text/html, Size: 3403 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: org-ref is not using default bibliography file
  2015-12-12 16:43 org-ref is not using default bibliography file Kai Chen
@ 2015-12-12 18:15 ` John Kitchin
  2015-12-13  3:11   ` Kai Chen
  0 siblings, 1 reply; 7+ messages in thread
From: John Kitchin @ 2015-12-12 18:15 UTC (permalink / raw)
  To: Kai Chen; +Cc: emacs-orgmode

That sounds odd.

What is the output of this src block in your file?

#+BEGIN_SRC emacs-lisp
(org-ref-find-bibliography)
#+END_SRC



Kai Chen writes:

> Dear list,
>
> I just got to know org-ref, and I followed the github help page to manually
> install the package and set the default path similar to the configuration
> provided in the follow link:
> https://github.com/jkitchin/org-ref
>
> And I installed all the dependency packages like helm-bibtex, hydra etc.
>
> But when I am citing (using "C-c ]") an existing entry which is in the
> default references.bib file, I can see the entry after I stroke the
> command, but after I selected it and pressed enter, when the cursor is on
> the link, the mini-buffer says:
> !!! No entry found !!!
> But previously the org-ref-helm-insert-cite-link properly showed that
> entry. This can only work when I manually add a bibliography link at the
> bottom of the file, which means org-ref is not using the default
> bibliography file.
>
> So what should I check to fix this issue?
>
> Thanks for your help!
>
> The following is my configuration of org-ref:
>
> #+BEGIN_SRC emacs-lisp
>   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>
>   (setq reftex-default-bibliography (concat my-dropbox-path
> "bibliography/references.bib"))
>
>   ;; see org-ref for use of these variables
>   (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
> notes.org")
>         org-ref-default-bibliography (concat my-dropbox-path
> "bibliography/references.bib")
>         org-ref-pdf-directory (concat my-dropbox-path
> "bibliography/bibtex-pdfs/"))
>
>   ;; *** helm-bibtex
>
>   (setq helm-bibtex-bibliography (concat my-dropbox-path
> "bibliography/references.bib"))
>   (setq helm-bibtex-library-path (concat my-dropbox-path
> "bibliography/bibtex-pdfs"))
>
>   ;; open pdf with system pdf viewer (works on mac)
>   (when (eq system-type 'darwin)
>     (setq helm-bibtex-pdf-open-function
>       (lambda (fpath)
>         (start-process "open" "*open*" "open" fpath))))
>
>   ;; alternative
>   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>
>   (setq helm-bibtex-notes-path (concat my-dropbox-path
> "bibliography/helm-bibtex-notes"))
>
>   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>   (global-set-key [f12] 'org-ref-open-in-browser)
>
>   (add-to-list 'load-path org-ref-path)
>
>   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
> key-chord
>   ;; in your load-path
>   ;; auto-install dependencies
>   (require 'org-ref)
>
>   ;; optional but very useful libraries in org-ref
>   (require 'doi-utils)
>   (require 'jmax-bibtex)
>   (require 'pubmed)
>   (require 'arxiv)
>   (require 'sci-id)
>
> #+END_SRC

--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: org-ref is not using default bibliography file
  2015-12-12 18:15 ` John Kitchin
@ 2015-12-13  3:11   ` Kai Chen
  2015-12-13  3:29     ` Kai Chen
  2015-12-13  3:36     ` John Kitchin
  0 siblings, 2 replies; 7+ messages in thread
From: Kai Chen @ 2015-12-13  3:11 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3863 bytes --]

Thanks for your suggestion! The problem lies in a variable I set which
points to the directory of my Dropbox folder, to ensure emacs portable on
different OS.

When I have the bibliography link in the org file, the
(org-ref-find-bibliography) will return the absolute path to the .bib file,
which in my case is
/home/kai/Dropbox/bibliography/references.bib
But if I do not have the link, it returns
~/Dropbox/bibliography/references.bib

It seems some modules are resolving the '~' while some others are not.

Cheers,
Kai


On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin <jkitchin@andrew.cmu.edu>
wrote:

> That sounds odd.
>
> What is the output of this src block in your file?
>
> #+BEGIN_SRC emacs-lisp
> (org-ref-find-bibliography)
> #+END_SRC
>
>
>
> Kai Chen writes:
>
> > Dear list,
> >
> > I just got to know org-ref, and I followed the github help page to
> manually
> > install the package and set the default path similar to the configuration
> > provided in the follow link:
> > https://github.com/jkitchin/org-ref
> >
> > And I installed all the dependency packages like helm-bibtex, hydra etc.
> >
> > But when I am citing (using "C-c ]") an existing entry which is in the
> > default references.bib file, I can see the entry after I stroke the
> > command, but after I selected it and pressed enter, when the cursor is on
> > the link, the mini-buffer says:
> > !!! No entry found !!!
> > But previously the org-ref-helm-insert-cite-link properly showed that
> > entry. This can only work when I manually add a bibliography link at the
> > bottom of the file, which means org-ref is not using the default
> > bibliography file.
> >
> > So what should I check to fix this issue?
> >
> > Thanks for your help!
> >
> > The following is my configuration of org-ref:
> >
> > #+BEGIN_SRC emacs-lisp
> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
> >
> >   (setq reftex-default-bibliography (concat my-dropbox-path
> > "bibliography/references.bib"))
> >
> >   ;; see org-ref for use of these variables
> >   (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
> > notes.org")
> >         org-ref-default-bibliography (concat my-dropbox-path
> > "bibliography/references.bib")
> >         org-ref-pdf-directory (concat my-dropbox-path
> > "bibliography/bibtex-pdfs/"))
> >
> >   ;; *** helm-bibtex
> >
> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
> > "bibliography/references.bib"))
> >   (setq helm-bibtex-library-path (concat my-dropbox-path
> > "bibliography/bibtex-pdfs"))
> >
> >   ;; open pdf with system pdf viewer (works on mac)
> >   (when (eq system-type 'darwin)
> >     (setq helm-bibtex-pdf-open-function
> >       (lambda (fpath)
> >         (start-process "open" "*open*" "open" fpath))))
> >
> >   ;; alternative
> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
> >
> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
> > "bibliography/helm-bibtex-notes"))
> >
> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
> >   (global-set-key [f12] 'org-ref-open-in-browser)
> >
> >   (add-to-list 'load-path org-ref-path)
> >
> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
> > key-chord
> >   ;; in your load-path
> >   ;; auto-install dependencies
> >   (require 'org-ref)
> >
> >   ;; optional but very useful libraries in org-ref
> >   (require 'doi-utils)
> >   (require 'jmax-bibtex)
> >   (require 'pubmed)
> >   (require 'arxiv)
> >   (require 'sci-id)
> >
> > #+END_SRC
>
> --
> 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
>
>


-- 
Regards

Multi-Agent System Lab
University of Science and Technology of China

K.Chen

[-- Attachment #2: Type: text/html, Size: 5548 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: org-ref is not using default bibliography file
  2015-12-13  3:11   ` Kai Chen
@ 2015-12-13  3:29     ` Kai Chen
  2015-12-13  3:59       ` John Kitchin
  2015-12-13  3:36     ` John Kitchin
  1 sibling, 1 reply; 7+ messages in thread
From: Kai Chen @ 2015-12-13  3:29 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 4782 bytes --]

Well I was wrong, after I expand my-dropbox-path to full path, the problem
is still there.

Here are the results, the upper one is with the bibliography link while the
one at the bottom is without. Only the format changes, one with a quoted |
but another with a leading :
Could this be the cause?

=== From notes.org ===
..... some text with citations
bibliography:/home/kai/Dropbox/bibliography/references.bib

#+BEGIN_SRC emacs-lisp
(org-ref-find-bibliography)
#+END_SRC

#+RESULTS:
| /home/kai/Dropbox/bibliography/references.bib |

: /home/kai/Dropbox/bibliography/references.bib



On Sun, Dec 13, 2015 at 11:11 AM, Kai Chen <chk0105@mail.ustc.edu.cn> wrote:

> Thanks for your suggestion! The problem lies in a variable I set which
> points to the directory of my Dropbox folder, to ensure emacs portable on
> different OS.
>
> When I have the bibliography link in the org file, the
> (org-ref-find-bibliography) will return the absolute path to the .bib file,
> which in my case is
> /home/kai/Dropbox/bibliography/references.bib
> But if I do not have the link, it returns
> ~/Dropbox/bibliography/references.bib
>
> It seems some modules are resolving the '~' while some others are not.
>
> Cheers,
> Kai
>
>
> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
>
>> That sounds odd.
>>
>> What is the output of this src block in your file?
>>
>> #+BEGIN_SRC emacs-lisp
>> (org-ref-find-bibliography)
>> #+END_SRC
>>
>>
>>
>> Kai Chen writes:
>>
>> > Dear list,
>> >
>> > I just got to know org-ref, and I followed the github help page to
>> manually
>> > install the package and set the default path similar to the
>> configuration
>> > provided in the follow link:
>> > https://github.com/jkitchin/org-ref
>> >
>> > And I installed all the dependency packages like helm-bibtex, hydra etc.
>> >
>> > But when I am citing (using "C-c ]") an existing entry which is in the
>> > default references.bib file, I can see the entry after I stroke the
>> > command, but after I selected it and pressed enter, when the cursor is
>> on
>> > the link, the mini-buffer says:
>> > !!! No entry found !!!
>> > But previously the org-ref-helm-insert-cite-link properly showed that
>> > entry. This can only work when I manually add a bibliography link at the
>> > bottom of the file, which means org-ref is not using the default
>> > bibliography file.
>> >
>> > So what should I check to fix this issue?
>> >
>> > Thanks for your help!
>> >
>> > The following is my configuration of org-ref:
>> >
>> > #+BEGIN_SRC emacs-lisp
>> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>> >
>> >   (setq reftex-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >
>> >   ;; see org-ref for use of these variables
>> >   (setq org-ref-bibliography-notes (concat my-dropbox-path
>> "bibliography/
>> > notes.org")
>> >         org-ref-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib")
>> >         org-ref-pdf-directory (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs/"))
>> >
>> >   ;; *** helm-bibtex
>> >
>> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >   (setq helm-bibtex-library-path (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs"))
>> >
>> >   ;; open pdf with system pdf viewer (works on mac)
>> >   (when (eq system-type 'darwin)
>> >     (setq helm-bibtex-pdf-open-function
>> >       (lambda (fpath)
>> >         (start-process "open" "*open*" "open" fpath))))
>> >
>> >   ;; alternative
>> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>> >
>> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
>> > "bibliography/helm-bibtex-notes"))
>> >
>> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>> >   (global-set-key [f12] 'org-ref-open-in-browser)
>> >
>> >   (add-to-list 'load-path org-ref-path)
>> >
>> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
>> > key-chord
>> >   ;; in your load-path
>> >   ;; auto-install dependencies
>> >   (require 'org-ref)
>> >
>> >   ;; optional but very useful libraries in org-ref
>> >   (require 'doi-utils)
>> >   (require 'jmax-bibtex)
>> >   (require 'pubmed)
>> >   (require 'arxiv)
>> >   (require 'sci-id)
>> >
>> > #+END_SRC
>>
>> --
>> 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
>>
>>
>
>
> --
> Regards
>
> Multi-Agent System Lab
> University of Science and Technology of China
>
> K.Chen
>



-- 
Regards

Multi-Agent System Lab
University of Science and Technology of China

K.Chen

[-- Attachment #2: Type: text/html, Size: 6928 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: org-ref is not using default bibliography file
  2015-12-13  3:11   ` Kai Chen
  2015-12-13  3:29     ` Kai Chen
@ 2015-12-13  3:36     ` John Kitchin
  1 sibling, 0 replies; 7+ messages in thread
From: John Kitchin @ 2015-12-13  3:36 UTC (permalink / raw)
  To: Kai Chen; +Cc: emacs-orgmode

does that mean it is working now?

Kai Chen writes:

> Thanks for your suggestion! The problem lies in a variable I set which
> points to the directory of my Dropbox folder, to ensure emacs portable on
> different OS.
>
> When I have the bibliography link in the org file, the
> (org-ref-find-bibliography) will return the absolute path to the .bib file,
> which in my case is
> /home/kai/Dropbox/bibliography/references.bib
> But if I do not have the link, it returns
> ~/Dropbox/bibliography/references.bib
>
> It seems some modules are resolving the '~' while some others are not.
>
> Cheers,
> Kai
>
>
> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
>
>> That sounds odd.
>>
>> What is the output of this src block in your file?
>>
>> #+BEGIN_SRC emacs-lisp
>> (org-ref-find-bibliography)
>> #+END_SRC
>>
>>
>>
>> Kai Chen writes:
>>
>> > Dear list,
>> >
>> > I just got to know org-ref, and I followed the github help page to
>> manually
>> > install the package and set the default path similar to the configuration
>> > provided in the follow link:
>> > https://github.com/jkitchin/org-ref
>> >
>> > And I installed all the dependency packages like helm-bibtex, hydra etc.
>> >
>> > But when I am citing (using "C-c ]") an existing entry which is in the
>> > default references.bib file, I can see the entry after I stroke the
>> > command, but after I selected it and pressed enter, when the cursor is on
>> > the link, the mini-buffer says:
>> > !!! No entry found !!!
>> > But previously the org-ref-helm-insert-cite-link properly showed that
>> > entry. This can only work when I manually add a bibliography link at the
>> > bottom of the file, which means org-ref is not using the default
>> > bibliography file.
>> >
>> > So what should I check to fix this issue?
>> >
>> > Thanks for your help!
>> >
>> > The following is my configuration of org-ref:
>> >
>> > #+BEGIN_SRC emacs-lisp
>> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>> >
>> >   (setq reftex-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >
>> >   ;; see org-ref for use of these variables
>> >   (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
>> > notes.org")
>> >         org-ref-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib")
>> >         org-ref-pdf-directory (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs/"))
>> >
>> >   ;; *** helm-bibtex
>> >
>> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >   (setq helm-bibtex-library-path (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs"))
>> >
>> >   ;; open pdf with system pdf viewer (works on mac)
>> >   (when (eq system-type 'darwin)
>> >     (setq helm-bibtex-pdf-open-function
>> >       (lambda (fpath)
>> >         (start-process "open" "*open*" "open" fpath))))
>> >
>> >   ;; alternative
>> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>> >
>> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
>> > "bibliography/helm-bibtex-notes"))
>> >
>> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>> >   (global-set-key [f12] 'org-ref-open-in-browser)
>> >
>> >   (add-to-list 'load-path org-ref-path)
>> >
>> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
>> > key-chord
>> >   ;; in your load-path
>> >   ;; auto-install dependencies
>> >   (require 'org-ref)
>> >
>> >   ;; optional but very useful libraries in org-ref
>> >   (require 'doi-utils)
>> >   (require 'jmax-bibtex)
>> >   (require 'pubmed)
>> >   (require 'arxiv)
>> >   (require 'sci-id)
>> >
>> > #+END_SRC
>>
>> --
>> 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
>>
>>

--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: org-ref is not using default bibliography file
  2015-12-13  3:29     ` Kai Chen
@ 2015-12-13  3:59       ` John Kitchin
  2015-12-13  5:10         ` Kai Chen
  0 siblings, 1 reply; 7+ messages in thread
From: John Kitchin @ 2015-12-13  3:59 UTC (permalink / raw)
  To: Kai Chen; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 5498 bytes --]

That probably means some variable should be a list and it isn't, it is just
a string.

On Saturday, December 12, 2015, Kai Chen <chk0105@mail.ustc.edu.cn> wrote:

> Well I was wrong, after I expand my-dropbox-path to full path, the problem
> is still there.
>
> Here are the results, the upper one is with the bibliography link while
> the one at the bottom is without. Only the format changes, one with a
> quoted | but another with a leading :
> Could this be the cause?
>
> === From notes.org ===
> ..... some text with citations
> bibliography:/home/kai/Dropbox/bibliography/references.bib
>
> #+BEGIN_SRC emacs-lisp
> (org-ref-find-bibliography)
> #+END_SRC
>
> #+RESULTS:
> | /home/kai/Dropbox/bibliography/references.bib |
>
> : /home/kai/Dropbox/bibliography/references.bib
>
>
>
> On Sun, Dec 13, 2015 at 11:11 AM, Kai Chen <chk0105@mail.ustc.edu.cn
> <javascript:_e(%7B%7D,'cvml','chk0105@mail.ustc.edu.cn');>> wrote:
>
>> Thanks for your suggestion! The problem lies in a variable I set which
>> points to the directory of my Dropbox folder, to ensure emacs portable on
>> different OS.
>>
>> When I have the bibliography link in the org file, the
>> (org-ref-find-bibliography) will return the absolute path to the .bib file,
>> which in my case is
>> /home/kai/Dropbox/bibliography/references.bib
>> But if I do not have the link, it returns
>> ~/Dropbox/bibliography/references.bib
>>
>> It seems some modules are resolving the '~' while some others are not.
>>
>> Cheers,
>> Kai
>>
>>
>> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin <jkitchin@andrew.cmu.edu
>> <javascript:_e(%7B%7D,'cvml','jkitchin@andrew.cmu.edu');>> wrote:
>>
>>> That sounds odd.
>>>
>>> What is the output of this src block in your file?
>>>
>>> #+BEGIN_SRC emacs-lisp
>>> (org-ref-find-bibliography)
>>> #+END_SRC
>>>
>>>
>>>
>>> Kai Chen writes:
>>>
>>> > Dear list,
>>> >
>>> > I just got to know org-ref, and I followed the github help page to
>>> manually
>>> > install the package and set the default path similar to the
>>> configuration
>>> > provided in the follow link:
>>> > https://github.com/jkitchin/org-ref
>>> >
>>> > And I installed all the dependency packages like helm-bibtex, hydra
>>> etc.
>>> >
>>> > But when I am citing (using "C-c ]") an existing entry which is in the
>>> > default references.bib file, I can see the entry after I stroke the
>>> > command, but after I selected it and pressed enter, when the cursor is
>>> on
>>> > the link, the mini-buffer says:
>>> > !!! No entry found !!!
>>> > But previously the org-ref-helm-insert-cite-link properly showed that
>>> > entry. This can only work when I manually add a bibliography link at
>>> the
>>> > bottom of the file, which means org-ref is not using the default
>>> > bibliography file.
>>> >
>>> > So what should I check to fix this issue?
>>> >
>>> > Thanks for your help!
>>> >
>>> > The following is my configuration of org-ref:
>>> >
>>> > #+BEGIN_SRC emacs-lisp
>>> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>>> >
>>> >   (setq reftex-default-bibliography (concat my-dropbox-path
>>> > "bibliography/references.bib"))
>>> >
>>> >   ;; see org-ref for use of these variables
>>> >   (setq org-ref-bibliography-notes (concat my-dropbox-path
>>> "bibliography/
>>> > notes.org")
>>> >         org-ref-default-bibliography (concat my-dropbox-path
>>> > "bibliography/references.bib")
>>> >         org-ref-pdf-directory (concat my-dropbox-path
>>> > "bibliography/bibtex-pdfs/"))
>>> >
>>> >   ;; *** helm-bibtex
>>> >
>>> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
>>> > "bibliography/references.bib"))
>>> >   (setq helm-bibtex-library-path (concat my-dropbox-path
>>> > "bibliography/bibtex-pdfs"))
>>> >
>>> >   ;; open pdf with system pdf viewer (works on mac)
>>> >   (when (eq system-type 'darwin)
>>> >     (setq helm-bibtex-pdf-open-function
>>> >       (lambda (fpath)
>>> >         (start-process "open" "*open*" "open" fpath))))
>>> >
>>> >   ;; alternative
>>> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>>> >
>>> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
>>> > "bibliography/helm-bibtex-notes"))
>>> >
>>> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>>> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>>> >   (global-set-key [f12] 'org-ref-open-in-browser)
>>> >
>>> >   (add-to-list 'load-path org-ref-path)
>>> >
>>> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
>>> > key-chord
>>> >   ;; in your load-path
>>> >   ;; auto-install dependencies
>>> >   (require 'org-ref)
>>> >
>>> >   ;; optional but very useful libraries in org-ref
>>> >   (require 'doi-utils)
>>> >   (require 'jmax-bibtex)
>>> >   (require 'pubmed)
>>> >   (require 'arxiv)
>>> >   (require 'sci-id)
>>> >
>>> > #+END_SRC
>>>
>>> --
>>> 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
>>>
>>>
>>
>>
>> --
>> Regards
>>
>> Multi-Agent System Lab
>> University of Science and Technology of China
>>
>> K.Chen
>>
>
>
>
> --
> Regards
>
> Multi-Agent System Lab
> University of Science and Technology of China
>
> K.Chen
>


-- 
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

[-- Attachment #2: Type: text/html, Size: 7760 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: org-ref is not using default bibliography file
  2015-12-13  3:59       ` John Kitchin
@ 2015-12-13  5:10         ` Kai Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Kai Chen @ 2015-12-13  5:10 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 5989 bytes --]

Thanks for pointing out!!!

This did the trick for me (using backquote `):

(setq reftex-default-bibliography `(,(concat my-dropbox-path
"bibliography/references.bib")))

Thanks again for your prompt help!

Cheers,
Kai

On Sun, Dec 13, 2015 at 11:59 AM, John Kitchin <jkitchin@andrew.cmu.edu>
wrote:

> That probably means some variable should be a list and it isn't, it is
> just a string.
>
>
> On Saturday, December 12, 2015, Kai Chen <chk0105@mail.ustc.edu.cn> wrote:
>
>> Well I was wrong, after I expand my-dropbox-path to full path, the
>> problem is still there.
>>
>> Here are the results, the upper one is with the bibliography link while
>> the one at the bottom is without. Only the format changes, one with a
>> quoted | but another with a leading :
>> Could this be the cause?
>>
>> === From notes.org ===
>> ..... some text with citations
>> bibliography:/home/kai/Dropbox/bibliography/references.bib
>>
>> #+BEGIN_SRC emacs-lisp
>> (org-ref-find-bibliography)
>> #+END_SRC
>>
>> #+RESULTS:
>> | /home/kai/Dropbox/bibliography/references.bib |
>>
>> : /home/kai/Dropbox/bibliography/references.bib
>>
>>
>>
>> On Sun, Dec 13, 2015 at 11:11 AM, Kai Chen <chk0105@mail.ustc.edu.cn>
>> wrote:
>>
>>> Thanks for your suggestion! The problem lies in a variable I set which
>>> points to the directory of my Dropbox folder, to ensure emacs portable on
>>> different OS.
>>>
>>> When I have the bibliography link in the org file, the
>>> (org-ref-find-bibliography) will return the absolute path to the .bib file,
>>> which in my case is
>>> /home/kai/Dropbox/bibliography/references.bib
>>> But if I do not have the link, it returns
>>> ~/Dropbox/bibliography/references.bib
>>>
>>> It seems some modules are resolving the '~' while some others are not.
>>>
>>> Cheers,
>>> Kai
>>>
>>>
>>> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin <jkitchin@andrew.cmu.edu>
>>> wrote:
>>>
>>>> That sounds odd.
>>>>
>>>> What is the output of this src block in your file?
>>>>
>>>> #+BEGIN_SRC emacs-lisp
>>>> (org-ref-find-bibliography)
>>>> #+END_SRC
>>>>
>>>>
>>>>
>>>> Kai Chen writes:
>>>>
>>>> > Dear list,
>>>> >
>>>> > I just got to know org-ref, and I followed the github help page to
>>>> manually
>>>> > install the package and set the default path similar to the
>>>> configuration
>>>> > provided in the follow link:
>>>> > https://github.com/jkitchin/org-ref
>>>> >
>>>> > And I installed all the dependency packages like helm-bibtex, hydra
>>>> etc.
>>>> >
>>>> > But when I am citing (using "C-c ]") an existing entry which is in the
>>>> > default references.bib file, I can see the entry after I stroke the
>>>> > command, but after I selected it and pressed enter, when the cursor
>>>> is on
>>>> > the link, the mini-buffer says:
>>>> > !!! No entry found !!!
>>>> > But previously the org-ref-helm-insert-cite-link properly showed that
>>>> > entry. This can only work when I manually add a bibliography link at
>>>> the
>>>> > bottom of the file, which means org-ref is not using the default
>>>> > bibliography file.
>>>> >
>>>> > So what should I check to fix this issue?
>>>> >
>>>> > Thanks for your help!
>>>> >
>>>> > The following is my configuration of org-ref:
>>>> >
>>>> > #+BEGIN_SRC emacs-lisp
>>>> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>>>> >
>>>> >   (setq reftex-default-bibliography (concat my-dropbox-path
>>>> > "bibliography/references.bib"))
>>>> >
>>>> >   ;; see org-ref for use of these variables
>>>> >   (setq org-ref-bibliography-notes (concat my-dropbox-path
>>>> "bibliography/
>>>> > notes.org")
>>>> >         org-ref-default-bibliography (concat my-dropbox-path
>>>> > "bibliography/references.bib")
>>>> >         org-ref-pdf-directory (concat my-dropbox-path
>>>> > "bibliography/bibtex-pdfs/"))
>>>> >
>>>> >   ;; *** helm-bibtex
>>>> >
>>>> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
>>>> > "bibliography/references.bib"))
>>>> >   (setq helm-bibtex-library-path (concat my-dropbox-path
>>>> > "bibliography/bibtex-pdfs"))
>>>> >
>>>> >   ;; open pdf with system pdf viewer (works on mac)
>>>> >   (when (eq system-type 'darwin)
>>>> >     (setq helm-bibtex-pdf-open-function
>>>> >       (lambda (fpath)
>>>> >         (start-process "open" "*open*" "open" fpath))))
>>>> >
>>>> >   ;; alternative
>>>> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>>>> >
>>>> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
>>>> > "bibliography/helm-bibtex-notes"))
>>>> >
>>>> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>>>> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>>>> >   (global-set-key [f12] 'org-ref-open-in-browser)
>>>> >
>>>> >   (add-to-list 'load-path org-ref-path)
>>>> >
>>>> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
>>>> > key-chord
>>>> >   ;; in your load-path
>>>> >   ;; auto-install dependencies
>>>> >   (require 'org-ref)
>>>> >
>>>> >   ;; optional but very useful libraries in org-ref
>>>> >   (require 'doi-utils)
>>>> >   (require 'jmax-bibtex)
>>>> >   (require 'pubmed)
>>>> >   (require 'arxiv)
>>>> >   (require 'sci-id)
>>>> >
>>>> > #+END_SRC
>>>>
>>>> --
>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards
>>>
>>> Multi-Agent System Lab
>>> University of Science and Technology of China
>>>
>>> K.Chen
>>>
>>
>>
>>
>> --
>> Regards
>>
>> Multi-Agent System Lab
>> University of Science and Technology of China
>>
>> K.Chen
>>
>
>
> --
> 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
>
>
>


-- 
Regards

Multi-Agent System Lab
University of Science and Technology of China

K.Chen

[-- Attachment #2: Type: text/html, Size: 8607 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-13  5:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-12 16:43 org-ref is not using default bibliography file Kai Chen
2015-12-12 18:15 ` John Kitchin
2015-12-13  3:11   ` Kai Chen
2015-12-13  3:29     ` Kai Chen
2015-12-13  3:59       ` John Kitchin
2015-12-13  5:10         ` Kai Chen
2015-12-13  3:36     ` John Kitchin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).