emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-ref "no key found"
@ 2014-08-29 14:54 Julian M. Burgos
  2014-08-29 18:58 ` John Kitchin
  0 siblings, 1 reply; 12+ messages in thread
From: Julian M. Burgos @ 2014-08-29 14:54 UTC (permalink / raw)
  To: emacs-orgmode

Hello everyone,

I am playing around with Joh Kitchin's excellent org-ref, and I am
having a few issues.  In my .emacs file I have set up the values for the
org-ref-bibliography-notes, org-ref-default-bibliography, and
org-ref-pdf-directory.

With this I can access my .bib database and use org-ref-insert-cite link
to add a citation link with no problems.  But when I press enter on the
cite link, I get the following message:

no key found
 (No key found) (p)df (u)rl (n)otes (q) quit

If I press "p" I get the pdf file, but if I press "n" I get the
following message: 

"Wrong type argument: stringp, nil".

Any ideas how to solve this?

Many thanks,

Julian

-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

* Re: org-ref "no key found"
  2014-08-29 18:58 ` John Kitchin
@ 2014-08-29 18:23   ` Julian M. Burgos
  2014-08-30 12:58     ` John Kitchin
  0 siblings, 1 reply; 12+ messages in thread
From: Julian M. Burgos @ 2014-08-29 18:23 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

Hi John, 

No, they still do not work even after I click on the bibliography link
and get my .bib file opened.

Julian

John Kitchin writes:

> "Julian M. Burgos" <julian@hafro.is> writes:
>
> If you click on the bibliography link to open the file, and then go back
> to your org-file, do the cite links work?
>
> I suspect the notes problem is related to the no key found problem.
>
>> Hello everyone,
>>
>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>> having a few issues.  In my .emacs file I have set up the values for the
>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>> org-ref-pdf-directory.
>>
>> With this I can access my .bib database and use org-ref-insert-cite link
>> to add a citation link with no problems.  But when I press enter on the
>> cite link, I get the following message:
>>
>> no key found
>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>
>> If I press "p" I get the pdf file, but if I press "n" I get the
>> following message: 
>>
>> "Wrong type argument: stringp, nil".
>>
>> Any ideas how to solve this?
>>
>> Many thanks,
>>
>> Julian


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

* Re: org-ref "no key found"
  2014-08-29 14:54 org-ref "no key found" Julian M. Burgos
@ 2014-08-29 18:58 ` John Kitchin
  2014-08-29 18:23   ` Julian M. Burgos
  0 siblings, 1 reply; 12+ messages in thread
From: John Kitchin @ 2014-08-29 18:58 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-orgmode

"Julian M. Burgos" <julian@hafro.is> writes:

If you click on the bibliography link to open the file, and then go back
to your org-file, do the cite links work?

I suspect the notes problem is related to the no key found problem.

> Hello everyone,
>
> I am playing around with Joh Kitchin's excellent org-ref, and I am
> having a few issues.  In my .emacs file I have set up the values for the
> org-ref-bibliography-notes, org-ref-default-bibliography, and
> org-ref-pdf-directory.
>
> With this I can access my .bib database and use org-ref-insert-cite link
> to add a citation link with no problems.  But when I press enter on the
> cite link, I get the following message:
>
> no key found
>  (No key found) (p)df (u)rl (n)otes (q) quit
>
> If I press "p" I get the pdf file, but if I press "n" I get the
> following message: 
>
> "Wrong type argument: stringp, nil".
>
> Any ideas how to solve this?
>
> Many thanks,
>
> Julian

-- 
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

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

* Re: org-ref "no key found"
  2014-08-29 18:23   ` Julian M. Burgos
@ 2014-08-30 12:58     ` John Kitchin
  2014-08-30 22:18       ` Julian M. Burgos
  0 siblings, 1 reply; 12+ messages in thread
From: John Kitchin @ 2014-08-30 12:58 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-orgmode

that is odd. this means org-ref is not finding the key you clicked
on. could you send me a small example that reproduces your problem (an
org-file and the bib file)?

"Julian M. Burgos" <julian@hafro.is> writes:

> Hi John, 
>
> No, they still do not work even after I click on the bibliography link
> and get my .bib file opened.
>
> Julian
>
> John Kitchin writes:
>
>> "Julian M. Burgos" <julian@hafro.is> writes:
>>
>> If you click on the bibliography link to open the file, and then go back
>> to your org-file, do the cite links work?
>>
>> I suspect the notes problem is related to the no key found problem.
>>
>>> Hello everyone,
>>>
>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>> having a few issues.  In my .emacs file I have set up the values for the
>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>> org-ref-pdf-directory.
>>>
>>> With this I can access my .bib database and use org-ref-insert-cite link
>>> to add a citation link with no problems.  But when I press enter on the
>>> cite link, I get the following message:
>>>
>>> no key found
>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>
>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>> following message: 
>>>
>>> "Wrong type argument: stringp, nil".
>>>
>>> Any ideas how to solve this?
>>>
>>> Many thanks,
>>>
>>> Julian

-- 
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

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

* Re: org-ref "no key found"
  2014-08-30 12:58     ` John Kitchin
@ 2014-08-30 22:18       ` Julian M. Burgos
  2014-09-08  9:17         ` Julian M. Burgos
  0 siblings, 1 reply; 12+ messages in thread
From: Julian M. Burgos @ 2014-08-30 22:18 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

John, for some weird reason everything seems to be working now.  Thanks
for your help... I will let you know if I break it again.

John Kitchin writes:

> that is odd. this means org-ref is not finding the key you clicked
> on. could you send me a small example that reproduces your problem (an
> org-file and the bib file)?
>
> "Julian M. Burgos" <julian@hafro.is> writes:
>
>> Hi John, 
>>
>> No, they still do not work even after I click on the bibliography link
>> and get my .bib file opened.
>>
>> Julian
>>
>> John Kitchin writes:
>>
>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>
>>> If you click on the bibliography link to open the file, and then go back
>>> to your org-file, do the cite links work?
>>>
>>> I suspect the notes problem is related to the no key found problem.
>>>
>>>> Hello everyone,
>>>>
>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>> org-ref-pdf-directory.
>>>>
>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>> to add a citation link with no problems.  But when I press enter on the
>>>> cite link, I get the following message:
>>>>
>>>> no key found
>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>
>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>> following message: 
>>>>
>>>> "Wrong type argument: stringp, nil".
>>>>
>>>> Any ideas how to solve this?
>>>>
>>>> Many thanks,
>>>>
>>>> Julian


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

* Re: org-ref "no key found"
  2014-08-30 22:18       ` Julian M. Burgos
@ 2014-09-08  9:17         ` Julian M. Burgos
  2014-09-12 11:08           ` Julian M. Burgos
  0 siblings, 1 reply; 12+ messages in thread
From: Julian M. Burgos @ 2014-09-08  9:17 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-orgmode, John Kitchin

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

Hi John, 
I think I can replicate the org-ref bug now (if it is a bug).  This is the situation:

a) If I open emacs, load a file that already has some link, and click on
the link (or place the cursor on it and press enter) I get the "no key
found" message and I cannot open the notes file (I get a "Wrong type
argument: stringp, nil"), although the link to the pdf file works.  If I open more
than one file, links do not work in any of them.  At this point if I
check the value of the "org-ref-default-bibliography" variable, I get
the correct path and filename of my .bib file.

b) If I insert a new citation (using Ctrl-]) in any of the documents,
links work as they should in all documents (this is, I get the title and
I can open the notes file).  

I should say that I am not using the org-ref-insert-bibliography-link
function, because I use biblatex and I prefer to insert the Latex
\printbibliography command.  But if use it and insert the bibliography
link, the behaviour does not change.

This is what I have in my .emacs file that is related to RefTex and org-ref:

--------------------------------------------------------------------------------------
;; Load RefTex
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
(autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode

;; Make RefTeX faster
(setq reftex-enable-partial-scans t)
(setq reftex-save-parse-info t)
(setq reftex-use-multiple-selection-buffers t)
(setq reftex-plug-into-AUCTeX t)

(setq reftex-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib"))
(setq reftex-sort-bibtex-matches "author")   ; Sort entries found in BibTex database 
(setq bibtex-dialect "biblatex")

--------------------------------------------------------------------------------------
(require 'org-ref)

(setq org-ref-bibliography-notes "/home/julian/Documents/org files/notes.org"
      org-ref-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib")
      org-ref-pdf-directory "/home/julian/Documents/Refs/")

(setq org-ref-default-citation-link "parencite")
--------------------------------------------------------------------------------------

I am sending you very simple .org and .bib files that (in my computer)
reproduce this behaviour.  In this file I did use
org-ref-insert-bibliography-link.  Let me know if I can give you any other information.  

All the best,

Julian


[-- Attachment #2: trial.bib --]
[-- Type: application/octet-stream, Size: 1094 bytes --]

@Article{Brown2011a,
  Title                    = {Quantitative approaches in climate change ecology},
  Author                   = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
  Journaltitle             = {Global Change Biology},
  Year                     = {2011},

  Crossref                 = {burnhm},
  File                     = {:Brown2011a.pdf:PDF},
  Publisher                = {Wiley Online Library}
}

@Article{Hobbs2006,
  Title                    = {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching},
  Author                   = {Hobbs, N.T. and Hilborn, R.},
  Journaltitle             = {Ecological Applications},
  Year                     = {2006},
  Number                   = {1},
  Pages                    = {5--19},
  Volume                   = {16},

  Crossref                 = {Quick2010},
  File                     = {:Hobbs2006.pdf:PDF},
  Publisher                = {Eco Soc America}
}

[-- Attachment #3: trial.org --]
[-- Type: application/vnd.lotus-organizer, Size: 91 bytes --]

[-- Attachment #4: Type: text/plain, Size: 1931 bytes --]



Julian M. Burgos writes:

> John, for some weird reason everything seems to be working now.  Thanks
> for your help... I will let you know if I break it again.
>
> John Kitchin writes:
>
>> that is odd. this means org-ref is not finding the key you clicked
>> on. could you send me a small example that reproduces your problem (an
>> org-file and the bib file)?
>>
>> "Julian M. Burgos" <julian@hafro.is> writes:
>>
>>> Hi John, 
>>>
>>> No, they still do not work even after I click on the bibliography link
>>> and get my .bib file opened.
>>>
>>> Julian
>>>
>>> John Kitchin writes:
>>>
>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>
>>>> If you click on the bibliography link to open the file, and then go back
>>>> to your org-file, do the cite links work?
>>>>
>>>> I suspect the notes problem is related to the no key found problem.
>>>>
>>>>> Hello everyone,
>>>>>
>>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>>> org-ref-pdf-directory.
>>>>>
>>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>>> to add a citation link with no problems.  But when I press enter on the
>>>>> cite link, I get the following message:
>>>>>
>>>>> no key found
>>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>>
>>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>>> following message: 
>>>>>
>>>>> "Wrong type argument: stringp, nil".
>>>>>
>>>>> Any ideas how to solve this?
>>>>>
>>>>> Many thanks,
>>>>>
>>>>> Julian


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

* Re: org-ref "no key found"
  2014-09-08  9:17         ` Julian M. Burgos
@ 2014-09-12 11:08           ` Julian M. Burgos
  2014-09-13 16:18             ` John Kitchin
  0 siblings, 1 reply; 12+ messages in thread
From: Julian M. Burgos @ 2014-09-12 11:08 UTC (permalink / raw)
  To: emacs-orgmode, John Kitchin

Hi John,

I am resending this... I think it did not went through the previous
time.

I think I can replicate the org-ref bug now (if it is a bug).  This is
the situation:

a) If I open emacs, load a file that already has some link, and click on
the link (or place the cursor on it and press enter) I get the "no key
found" message and I cannot open the notes file (I get a "Wrong type
argument: stringp, nil"), although the link to the pdf file works.  If I
open more than one file, links do not work in any of them.  At this
point if I check the value of the "org-ref-default-bibliography"
variable, I get the correct path and filename of my .bib file.

b) If I insert a new citation (using Ctrl-]) in any of the documents,
links work as they should in all documents (this is, I get the title and
I can open the notes file).
>
I should say that I am not using the org-ref-insert-bibliography-link
function, because I use biblatex and I prefer to insert the Latex
\printbibliography command.  But if use it and insert the bibliography
link, the behaviour does not change.

This is what I have in my .emacs file that is related to RefTex and
org-ref:

--------------------------------------------------------------------------------------
;; Load RefTex
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
(autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode

;; Make RefTeX faster
(setq reftex-enable-partial-scans t)
(setq reftex-save-parse-info t)
(setq reftex-use-multiple-selection-buffers t)
(setq reftex-plug-into-AUCTeX t)

(setq reftex-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib"))
(setq reftex-sort-bibtex-matches "author")   ; Sort entries found in BibTex database 
(setq bibtex-dialect "biblatex")

--------------------------------------------------------------------------------------
(require 'org-ref)

(setq org-ref-bibliography-notes "/home/julian/Documents/org files/notes.org"
      org-ref-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib")
      org-ref-pdf-directory "/home/julian/Documents/Refs/")
 (setq org-ref-default-citation-link "parencite")
 --------------------------------------------------------------------------------------

Below I am sending you very simple .org and .bib files that (in my computer)
reproduce this behaviour.  In this file I did use
org-ref-insert-bibliography-link.  Let me know if I can give you any other information.  

All the best,

Julian

--Start trial.org file ----------------------------------------------------------------

* Trial
Some references
parencite:Brown2011a,Hobbs2006

bibliography:~/Documents/trial.bib

--End trial.org file ---------------------------------------------------------------------


--Start trial.bib file ----------------------------------------------------------------

Article{Brown2011a,
  Title                    = {Quantitative approaches in climate change ecology},
  Author                   = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
  Journaltitle             = {Global Change Biology},
  Year                     = {2011},

  Crossref                 = {burnhm},
  File                     = {:Brown2011a.pdf:PDF},
  Publisher                = {Wiley Online Library}
}

@Article{Hobbs2006,
  Title                    = {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching},
  Author                   = {Hobbs, N.T. and Hilborn, R.},
  Journaltitle             = {Ecological Applications},
  Year                     = {2006},
  Number                   = {1},
  Pages                    = {5--19},
  Volume                   = {16},

  Crossref                 = {Quick2010},
  File                     = {:Hobbs2006.pdf:PDF},
  Publisher                = {Eco Soc America}
}

--End trial.bib file ---------------------------------------------------------------------




> Julian M. Burgos writes:
>
>> John, for some weird reason everything seems to be working now.  Thanks
>> for your help... I will let you know if I break it again.
>>
>> John Kitchin writes:
>>
>>> that is odd. this means org-ref is not finding the key you clicked
>>> on. could you send me a small example that reproduces your problem (an
>>> org-file and the bib file)?
>>>
>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>
>>>> Hi John, 
>>>>
>>>> No, they still do not work even after I click on the bibliography link
>>>> and get my .bib file opened.
>>>>
>>>> Julian
>>>>
>>>> John Kitchin writes:
>>>>
>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>
>>>>> If you click on the bibliography link to open the file, and then go back
>>>>> to your org-file, do the cite links work?
>>>>>
>>>>> I suspect the notes problem is related to the no key found problem.
>>>>>
>>>>>> Hello everyone,
>>>>>>
>>>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>>>> org-ref-pdf-directory.
>>>>>>
>>>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>>>> to add a citation link with no problems.  But when I press enter on the
>>>>>> cite link, I get the following message:
>>>>>>
>>>>>> no key found
>>>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>>>
>>>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>>>> following message: 
>>>>>>
>>>>>> "Wrong type argument: stringp, nil".
>>>>>>
>>>>>> Any ideas how to solve this?
>>>>>>
>>>>>> Many thanks,
>>>>>>
>>>>>> Julian


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

* Re: org-ref "no key found"
  2014-09-12 11:08           ` Julian M. Burgos
@ 2014-09-13 16:18             ` John Kitchin
  2014-09-15  9:16               ` Julian M. Burgos
  0 siblings, 1 reply; 12+ messages in thread
From: John Kitchin @ 2014-09-13 16:18 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-orgmode

No problem. Thanks for the tips to replicate this. It was pretty helpful
in solving the problem (and thanks again to Nick who pointed me towards
edebug-defun a while ago!)

I think I have fixed this. The problem was org-ref was not finding a key
that exists in a file. the way that is done all over org-ref is to
insert the contents of the bibfile in temp buffer, and then use
bibtex-search-entry on that buffer. It works like a charm usually, but
not in the replicated steps you have below. once it works once, though,
it seems to always work. 

Anyway, I think it is fixed now. there is a new version at
https://github.com/jkitchin/jmax/blob/master/org/org-ref.org

Thanks for reporting the bug!

"Julian M. Burgos" <julian@hafro.is> writes:

> Hi John,
>
> I am resending this... I think it did not went through the previous
> time.
>
> I think I can replicate the org-ref bug now (if it is a bug).  This is
> the situation:
>
> a) If I open emacs, load a file that already has some link, and click on
> the link (or place the cursor on it and press enter) I get the "no key
> found" message and I cannot open the notes file (I get a "Wrong type
> argument: stringp, nil"), although the link to the pdf file works.  If I
> open more than one file, links do not work in any of them.  At this
> point if I check the value of the "org-ref-default-bibliography"
> variable, I get the correct path and filename of my .bib file.
>
> b) If I insert a new citation (using Ctrl-]) in any of the documents,
> links work as they should in all documents (this is, I get the title and
> I can open the notes file).
>>
> I should say that I am not using the org-ref-insert-bibliography-link
> function, because I use biblatex and I prefer to insert the Latex
> \printbibliography command.  But if use it and insert the bibliography
> link, the behaviour does not change.
>
> This is what I have in my .emacs file that is related to RefTex and
> org-ref:
>
> --------------------------------------------------------------------------------------
> ;; Load RefTex
> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
> (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
> (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
> (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
> (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
> (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
>
> ;; Make RefTeX faster
> (setq reftex-enable-partial-scans t)
> (setq reftex-save-parse-info t)
> (setq reftex-use-multiple-selection-buffers t)
> (setq reftex-plug-into-AUCTeX t)
>
> (setq reftex-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib"))
> (setq reftex-sort-bibtex-matches "author")   ; Sort entries found in BibTex database 
> (setq bibtex-dialect "biblatex")
>
> --------------------------------------------------------------------------------------
> (require 'org-ref)
>
> (setq org-ref-bibliography-notes "/home/julian/Documents/org files/notes.org"
>       org-ref-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib")
>       org-ref-pdf-directory "/home/julian/Documents/Refs/")
>  (setq org-ref-default-citation-link "parencite")
>  --------------------------------------------------------------------------------------
>
> Below I am sending you very simple .org and .bib files that (in my computer)
> reproduce this behaviour.  In this file I did use
> org-ref-insert-bibliography-link.  Let me know if I can give you any other information.  
>
> All the best,
>
> Julian
>
> --Start trial.org file ----------------------------------------------------------------
>
> * Trial
> Some references
> parencite:Brown2011a,Hobbs2006
>
> bibliography:~/Documents/trial.bib
>
> --End trial.org file ---------------------------------------------------------------------
>
>
> --Start trial.bib file ----------------------------------------------------------------
>
> Article{Brown2011a,
>   Title                    = {Quantitative approaches in climate change ecology},
>   Author                   = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
>   Journaltitle             = {Global Change Biology},
>   Year                     = {2011},
>
>   Crossref                 = {burnhm},
>   File                     = {:Brown2011a.pdf:PDF},
>   Publisher                = {Wiley Online Library}
> }
>
> @Article{Hobbs2006,
>   Title                    = {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching},
>   Author                   = {Hobbs, N.T. and Hilborn, R.},
>   Journaltitle             = {Ecological Applications},
>   Year                     = {2006},
>   Number                   = {1},
>   Pages                    = {5--19},
>   Volume                   = {16},
>
>   Crossref                 = {Quick2010},
>   File                     = {:Hobbs2006.pdf:PDF},
>   Publisher                = {Eco Soc America}
> }
>
> --End trial.bib file ---------------------------------------------------------------------
>
>
>
>
>> Julian M. Burgos writes:
>>
>>> John, for some weird reason everything seems to be working now.  Thanks
>>> for your help... I will let you know if I break it again.
>>>
>>> John Kitchin writes:
>>>
>>>> that is odd. this means org-ref is not finding the key you clicked
>>>> on. could you send me a small example that reproduces your problem (an
>>>> org-file and the bib file)?
>>>>
>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>
>>>>> Hi John, 
>>>>>
>>>>> No, they still do not work even after I click on the bibliography link
>>>>> and get my .bib file opened.
>>>>>
>>>>> Julian
>>>>>
>>>>> John Kitchin writes:
>>>>>
>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>
>>>>>> If you click on the bibliography link to open the file, and then go back
>>>>>> to your org-file, do the cite links work?
>>>>>>
>>>>>> I suspect the notes problem is related to the no key found problem.
>>>>>>
>>>>>>> Hello everyone,
>>>>>>>
>>>>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>>>>> org-ref-pdf-directory.
>>>>>>>
>>>>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>>>>> to add a citation link with no problems.  But when I press enter on the
>>>>>>> cite link, I get the following message:
>>>>>>>
>>>>>>> no key found
>>>>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>>>>
>>>>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>>>>> following message: 
>>>>>>>
>>>>>>> "Wrong type argument: stringp, nil".
>>>>>>>
>>>>>>> Any ideas how to solve this?
>>>>>>>
>>>>>>> Many thanks,
>>>>>>>
>>>>>>> Julian

-- 
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

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

* Re: org-ref "no key found"
  2014-09-13 16:18             ` John Kitchin
@ 2014-09-15  9:16               ` Julian M. Burgos
  2014-09-15 10:17                 ` Julian M. Burgos
  0 siblings, 1 reply; 12+ messages in thread
From: Julian M. Burgos @ 2014-09-15  9:16 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

Excellent! Many thanks... now it works like a charm.

John Kitchin writes:

> No problem. Thanks for the tips to replicate this. It was pretty helpful
> in solving the problem (and thanks again to Nick who pointed me towards
> edebug-defun a while ago!)
>
> I think I have fixed this. The problem was org-ref was not finding a key
> that exists in a file. the way that is done all over org-ref is to
> insert the contents of the bibfile in temp buffer, and then use
> bibtex-search-entry on that buffer. It works like a charm usually, but
> not in the replicated steps you have below. once it works once, though,
> it seems to always work. 
>
> Anyway, I think it is fixed now. there is a new version at
> https://github.com/jkitchin/jmax/blob/master/org/org-ref.org
>
> Thanks for reporting the bug!
>
> "Julian M. Burgos" <julian@hafro.is> writes:
>
>> Hi John,
>>
>> I am resending this... I think it did not went through the previous
>> time.
>>
>> I think I can replicate the org-ref bug now (if it is a bug).  This is
>> the situation:
>>
>> a) If I open emacs, load a file that already has some link, and click on
>> the link (or place the cursor on it and press enter) I get the "no key
>> found" message and I cannot open the notes file (I get a "Wrong type
>> argument: stringp, nil"), although the link to the pdf file works.  If I
>> open more than one file, links do not work in any of them.  At this
>> point if I check the value of the "org-ref-default-bibliography"
>> variable, I get the correct path and filename of my .bib file.
>>
>> b) If I insert a new citation (using Ctrl-]) in any of the documents,
>> links work as they should in all documents (this is, I get the title and
>> I can open the notes file).
>>>
>> I should say that I am not using the org-ref-insert-bibliography-link
>> function, because I use biblatex and I prefer to insert the Latex
>> \printbibliography command.  But if use it and insert the bibliography
>> link, the behaviour does not change.
>>
>> This is what I have in my .emacs file that is related to RefTex and
>> org-ref:
>>
>> --------------------------------------------------------------------------------------
>> ;; Load RefTex
>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>> (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
>> (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
>> (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
>> (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>> (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
>>
>> ;; Make RefTeX faster
>> (setq reftex-enable-partial-scans t)
>> (setq reftex-save-parse-info t)
>> (setq reftex-use-multiple-selection-buffers t)
>> (setq reftex-plug-into-AUCTeX t)
>>
>> (setq reftex-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib"))
>> (setq reftex-sort-bibtex-matches "author")   ; Sort entries found in BibTex database 
>> (setq bibtex-dialect "biblatex")
>>
>> --------------------------------------------------------------------------------------
>> (require 'org-ref)
>>
>> (setq org-ref-bibliography-notes "/home/julian/Documents/org files/notes.org"
>>       org-ref-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib")
>>       org-ref-pdf-directory "/home/julian/Documents/Refs/")
>>  (setq org-ref-default-citation-link "parencite")
>>  --------------------------------------------------------------------------------------
>>
>> Below I am sending you very simple .org and .bib files that (in my computer)
>> reproduce this behaviour.  In this file I did use
>> org-ref-insert-bibliography-link.  Let me know if I can give you any other information.  
>>
>> All the best,
>>
>> Julian
>>
>> --Start trial.org file ----------------------------------------------------------------
>>
>> * Trial
>> Some references
>> parencite:Brown2011a,Hobbs2006
>>
>> bibliography:~/Documents/trial.bib
>>
>> --End trial.org file ---------------------------------------------------------------------
>>
>>
>> --Start trial.bib file ----------------------------------------------------------------
>>
>> Article{Brown2011a,
>>   Title                    = {Quantitative approaches in climate change ecology},
>>   Author                   = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
>>   Journaltitle             = {Global Change Biology},
>>   Year                     = {2011},
>>
>>   Crossref                 = {burnhm},
>>   File                     = {:Brown2011a.pdf:PDF},
>>   Publisher                = {Wiley Online Library}
>> }
>>
>> @Article{Hobbs2006,
>>   Title                    = {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching},
>>   Author                   = {Hobbs, N.T. and Hilborn, R.},
>>   Journaltitle             = {Ecological Applications},
>>   Year                     = {2006},
>>   Number                   = {1},
>>   Pages                    = {5--19},
>>   Volume                   = {16},
>>
>>   Crossref                 = {Quick2010},
>>   File                     = {:Hobbs2006.pdf:PDF},
>>   Publisher                = {Eco Soc America}
>> }
>>
>> --End trial.bib file ---------------------------------------------------------------------
>>
>>
>>
>>
>>> Julian M. Burgos writes:
>>>
>>>> John, for some weird reason everything seems to be working now.  Thanks
>>>> for your help... I will let you know if I break it again.
>>>>
>>>> John Kitchin writes:
>>>>
>>>>> that is odd. this means org-ref is not finding the key you clicked
>>>>> on. could you send me a small example that reproduces your problem (an
>>>>> org-file and the bib file)?
>>>>>
>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>
>>>>>> Hi John, 
>>>>>>
>>>>>> No, they still do not work even after I click on the bibliography link
>>>>>> and get my .bib file opened.
>>>>>>
>>>>>> Julian
>>>>>>
>>>>>> John Kitchin writes:
>>>>>>
>>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>>
>>>>>>> If you click on the bibliography link to open the file, and then go back
>>>>>>> to your org-file, do the cite links work?
>>>>>>>
>>>>>>> I suspect the notes problem is related to the no key found problem.
>>>>>>>
>>>>>>>> Hello everyone,
>>>>>>>>
>>>>>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>>>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>>>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>>>>>> org-ref-pdf-directory.
>>>>>>>>
>>>>>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>>>>>> to add a citation link with no problems.  But when I press enter on the
>>>>>>>> cite link, I get the following message:
>>>>>>>>
>>>>>>>> no key found
>>>>>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>>>>>
>>>>>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>>>>>> following message: 
>>>>>>>>
>>>>>>>> "Wrong type argument: stringp, nil".
>>>>>>>>
>>>>>>>> Any ideas how to solve this?
>>>>>>>>
>>>>>>>> Many thanks,
>>>>>>>>
>>>>>>>> Julian


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

* Re: org-ref "no key found"
  2014-09-15  9:16               ` Julian M. Burgos
@ 2014-09-15 10:17                 ` Julian M. Burgos
  2014-09-16  2:49                   ` John Kitchin
  0 siblings, 1 reply; 12+ messages in thread
From: Julian M. Burgos @ 2014-09-15 10:17 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-orgmode, John Kitchin

John, another issue...a really minor one, and I am not sure if it is
org-ref related.  When I open the notes file, the org faces are not
applied evenly.  In particular, 

a) Text after #TITLE: or #AUTHOR appears as regular text.  If I use M-x
describe face, I get "default".  If modify in any way the face changes
to "org-document-info" as it should be.

b) Within the heading of each reference, the "TODO" statement appears
with the same face as the rest of the heading (org-level-2 face).

c) Links to pdf files appear like this, with default face:
 
[[cite:Collie2000]] [[file:/home/julian/Documents/Refs/Collie2000.pdf][pdf]]

And not as clickable links 
cite:Collie2000 pdf (underlined, in blue, with org-link face)

Again, as soon as I change anything the org-link face is applied and I
get a clickable link.

Of all this, the pdf links are the real issue, as they are
non-functional until I edit them.

Strangely, :PROPERTIES: and :END: appear in their correct face.  Also,
if I "fix" the faces (editing the text or pressing enter so I get the
right faces) and close the notes files, I get the same wriong faces when I
reopen the file.

Does this makes sense?  Do you know what could be the issue?
Many thanks again,

Julian


Julian M. Burgos writes:

> Excellent! Many thanks... now it works like a charm.
>
> John Kitchin writes:
>
>> No problem. Thanks for the tips to replicate this. It was pretty helpful
>> in solving the problem (and thanks again to Nick who pointed me towards
>> edebug-defun a while ago!)
>>
>> I think I have fixed this. The problem was org-ref was not finding a key
>> that exists in a file. the way that is done all over org-ref is to
>> insert the contents of the bibfile in temp buffer, and then use
>> bibtex-search-entry on that buffer. It works like a charm usually, but
>> not in the replicated steps you have below. once it works once, though,
>> it seems to always work. 
>>
>> Anyway, I think it is fixed now. there is a new version at
>> https://github.com/jkitchin/jmax/blob/master/org/org-ref.org
>>
>> Thanks for reporting the bug!
>>
>> "Julian M. Burgos" <julian@hafro.is> writes:
>>
>>> Hi John,
>>>
>>> I am resending this... I think it did not went through the previous
>>> time.
>>>
>>> I think I can replicate the org-ref bug now (if it is a bug).  This is
>>> the situation:
>>>
>>> a) If I open emacs, load a file that already has some link, and click on
>>> the link (or place the cursor on it and press enter) I get the "no key
>>> found" message and I cannot open the notes file (I get a "Wrong type
>>> argument: stringp, nil"), although the link to the pdf file works.  If I
>>> open more than one file, links do not work in any of them.  At this
>>> point if I check the value of the "org-ref-default-bibliography"
>>> variable, I get the correct path and filename of my .bib file.
>>>
>>> b) If I insert a new citation (using Ctrl-]) in any of the documents,
>>> links work as they should in all documents (this is, I get the title and
>>> I can open the notes file).
>>>>
>>> I should say that I am not using the org-ref-insert-bibliography-link
>>> function, because I use biblatex and I prefer to insert the Latex
>>> \printbibliography command.  But if use it and insert the bibliography
>>> link, the behaviour does not change.
>>>
>>> This is what I have in my .emacs file that is related to RefTex and
>>> org-ref:
>>>
>>> --------------------------------------------------------------------------------------
>>> ;; Load RefTex
>>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>>> (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
>>> (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
>>> (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
>>> (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
>>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>>> (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
>>>
>>> ;; Make RefTeX faster
>>> (setq reftex-enable-partial-scans t)
>>> (setq reftex-save-parse-info t)
>>> (setq reftex-use-multiple-selection-buffers t)
>>> (setq reftex-plug-into-AUCTeX t)
>>>
>>> (setq reftex-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib"))
>>> (setq reftex-sort-bibtex-matches "author")   ; Sort entries found in BibTex database 
>>> (setq bibtex-dialect "biblatex")
>>>
>>> --------------------------------------------------------------------------------------
>>> (require 'org-ref)
>>>
>>> (setq org-ref-bibliography-notes "/home/julian/Documents/org files/notes.org"
>>>       org-ref-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib")
>>>       org-ref-pdf-directory "/home/julian/Documents/Refs/")
>>>  (setq org-ref-default-citation-link "parencite")
>>>  --------------------------------------------------------------------------------------
>>>
>>> Below I am sending you very simple .org and .bib files that (in my computer)
>>> reproduce this behaviour.  In this file I did use
>>> org-ref-insert-bibliography-link.  Let me know if I can give you any other information.  
>>>
>>> All the best,
>>>
>>> Julian
>>>
>>> --Start trial.org file ----------------------------------------------------------------
>>>
>>> * Trial
>>> Some references
>>> parencite:Brown2011a,Hobbs2006
>>>
>>> bibliography:~/Documents/trial.bib
>>>
>>> --End trial.org file ---------------------------------------------------------------------
>>>
>>>
>>> --Start trial.bib file ----------------------------------------------------------------
>>>
>>> Article{Brown2011a,
>>>   Title                    = {Quantitative approaches in climate change ecology},
>>>   Author                   = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
>>>   Journaltitle             = {Global Change Biology},
>>>   Year                     = {2011},
>>>
>>>   Crossref                 = {burnhm},
>>>   File                     = {:Brown2011a.pdf:PDF},
>>>   Publisher                = {Wiley Online Library}
>>> }
>>>
>>> @Article{Hobbs2006,
>>>   Title                    = {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching},
>>>   Author                   = {Hobbs, N.T. and Hilborn, R.},
>>>   Journaltitle             = {Ecological Applications},
>>>   Year                     = {2006},
>>>   Number                   = {1},
>>>   Pages                    = {5--19},
>>>   Volume                   = {16},
>>>
>>>   Crossref                 = {Quick2010},
>>>   File                     = {:Hobbs2006.pdf:PDF},
>>>   Publisher                = {Eco Soc America}
>>> }
>>>
>>> --End trial.bib file ---------------------------------------------------------------------
>>>
>>>
>>>
>>>
>>>> Julian M. Burgos writes:
>>>>
>>>>> John, for some weird reason everything seems to be working now.  Thanks
>>>>> for your help... I will let you know if I break it again.
>>>>>
>>>>> John Kitchin writes:
>>>>>
>>>>>> that is odd. this means org-ref is not finding the key you clicked
>>>>>> on. could you send me a small example that reproduces your problem (an
>>>>>> org-file and the bib file)?
>>>>>>
>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>
>>>>>>> Hi John, 
>>>>>>>
>>>>>>> No, they still do not work even after I click on the bibliography link
>>>>>>> and get my .bib file opened.
>>>>>>>
>>>>>>> Julian
>>>>>>>
>>>>>>> John Kitchin writes:
>>>>>>>
>>>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>>>
>>>>>>>> If you click on the bibliography link to open the file, and then go back
>>>>>>>> to your org-file, do the cite links work?
>>>>>>>>
>>>>>>>> I suspect the notes problem is related to the no key found problem.
>>>>>>>>
>>>>>>>>> Hello everyone,
>>>>>>>>>
>>>>>>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>>>>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>>>>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>>>>>>> org-ref-pdf-directory.
>>>>>>>>>
>>>>>>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>>>>>>> to add a citation link with no problems.  But when I press enter on the
>>>>>>>>> cite link, I get the following message:
>>>>>>>>>
>>>>>>>>> no key found
>>>>>>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>>>>>>
>>>>>>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>>>>>>> following message: 
>>>>>>>>>
>>>>>>>>> "Wrong type argument: stringp, nil".
>>>>>>>>>
>>>>>>>>> Any ideas how to solve this?
>>>>>>>>>
>>>>>>>>> Many thanks,
>>>>>>>>>
>>>>>>>>> Julian


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

* Re: org-ref "no key found"
  2014-09-15 10:17                 ` Julian M. Burgos
@ 2014-09-16  2:49                   ` John Kitchin
  2014-09-16  9:42                     ` Julian M. Burgos
  0 siblings, 1 reply; 12+ messages in thread
From: John Kitchin @ 2014-09-16  2:49 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: emacs-orgmode


If you look in your messages do you see something like jit-lock errors?
I do not recall exactly what the errors are but the ones I have seen
that resemble what you describe have jit in them. 

I saw this recently in an ELPA version (maybe around Sept 1), and it went away when I updated
the ELPA org version to the most recent one.


"Julian M. Burgos" <julian@hafro.is> writes:

> John, another issue...a really minor one, and I am not sure if it is
> org-ref related.  When I open the notes file, the org faces are not
> applied evenly.  In particular, 
>
> a) Text after #TITLE: or #AUTHOR appears as regular text.  If I use M-x
> describe face, I get "default".  If modify in any way the face changes
> to "org-document-info" as it should be.
>
> b) Within the heading of each reference, the "TODO" statement appears
> with the same face as the rest of the heading (org-level-2 face).
>
> c) Links to pdf files appear like this, with default face:
>  
> [[cite:Collie2000]] [[file:/home/julian/Documents/Refs/Collie2000.pdf][pdf]]
>
> And not as clickable links 
> cite:Collie2000 pdf (underlined, in blue, with org-link face)
>
> Again, as soon as I change anything the org-link face is applied and I
> get a clickable link.
>
> Of all this, the pdf links are the real issue, as they are
> non-functional until I edit them.
>
> Strangely, :PROPERTIES: and :END: appear in their correct face.  Also,
> if I "fix" the faces (editing the text or pressing enter so I get the
> right faces) and close the notes files, I get the same wriong faces when I
> reopen the file.
>
> Does this makes sense?  Do you know what could be the issue?
> Many thanks again,
>
> Julian
>
>
> Julian M. Burgos writes:
>
>> Excellent! Many thanks... now it works like a charm.
>>
>> John Kitchin writes:
>>
>>> No problem. Thanks for the tips to replicate this. It was pretty helpful
>>> in solving the problem (and thanks again to Nick who pointed me towards
>>> edebug-defun a while ago!)
>>>
>>> I think I have fixed this. The problem was org-ref was not finding a key
>>> that exists in a file. the way that is done all over org-ref is to
>>> insert the contents of the bibfile in temp buffer, and then use
>>> bibtex-search-entry on that buffer. It works like a charm usually, but
>>> not in the replicated steps you have below. once it works once, though,
>>> it seems to always work. 
>>>
>>> Anyway, I think it is fixed now. there is a new version at
>>> https://github.com/jkitchin/jmax/blob/master/org/org-ref.org
>>>
>>> Thanks for reporting the bug!
>>>
>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>
>>>> Hi John,
>>>>
>>>> I am resending this... I think it did not went through the previous
>>>> time.
>>>>
>>>> I think I can replicate the org-ref bug now (if it is a bug).  This is
>>>> the situation:
>>>>
>>>> a) If I open emacs, load a file that already has some link, and click on
>>>> the link (or place the cursor on it and press enter) I get the "no key
>>>> found" message and I cannot open the notes file (I get a "Wrong type
>>>> argument: stringp, nil"), although the link to the pdf file works.  If I
>>>> open more than one file, links do not work in any of them.  At this
>>>> point if I check the value of the "org-ref-default-bibliography"
>>>> variable, I get the correct path and filename of my .bib file.
>>>>
>>>> b) If I insert a new citation (using Ctrl-]) in any of the documents,
>>>> links work as they should in all documents (this is, I get the title and
>>>> I can open the notes file).
>>>>>
>>>> I should say that I am not using the org-ref-insert-bibliography-link
>>>> function, because I use biblatex and I prefer to insert the Latex
>>>> \printbibliography command.  But if use it and insert the bibliography
>>>> link, the behaviour does not change.
>>>>
>>>> This is what I have in my .emacs file that is related to RefTex and
>>>> org-ref:
>>>>
>>>> --------------------------------------------------------------------------------------
>>>> ;; Load RefTex
>>>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>>>> (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
>>>> (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
>>>> (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
>>>> (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
>>>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>>>> (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
>>>>
>>>> ;; Make RefTeX faster
>>>> (setq reftex-enable-partial-scans t)
>>>> (setq reftex-save-parse-info t)
>>>> (setq reftex-use-multiple-selection-buffers t)
>>>> (setq reftex-plug-into-AUCTeX t)
>>>>
>>>> (setq reftex-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib"))
>>>> (setq reftex-sort-bibtex-matches "author")   ; Sort entries found in BibTex database 
>>>> (setq bibtex-dialect "biblatex")
>>>>
>>>> --------------------------------------------------------------------------------------
>>>> (require 'org-ref)
>>>>
>>>> (setq org-ref-bibliography-notes "/home/julian/Documents/org files/notes.org"
>>>>       org-ref-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib")
>>>>       org-ref-pdf-directory "/home/julian/Documents/Refs/")
>>>>  (setq org-ref-default-citation-link "parencite")
>>>>  --------------------------------------------------------------------------------------
>>>>
>>>> Below I am sending you very simple .org and .bib files that (in my computer)
>>>> reproduce this behaviour.  In this file I did use
>>>> org-ref-insert-bibliography-link.  Let me know if I can give you any other information.  
>>>>
>>>> All the best,
>>>>
>>>> Julian
>>>>
>>>> --Start trial.org file ----------------------------------------------------------------
>>>>
>>>> * Trial
>>>> Some references
>>>> parencite:Brown2011a,Hobbs2006
>>>>
>>>> bibliography:~/Documents/trial.bib
>>>>
>>>> --End trial.org file ---------------------------------------------------------------------
>>>>
>>>>
>>>> --Start trial.bib file ----------------------------------------------------------------
>>>>
>>>> Article{Brown2011a,
>>>>   Title                    = {Quantitative approaches in climate change ecology},
>>>>   Author                   = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
>>>>   Journaltitle             = {Global Change Biology},
>>>>   Year                     = {2011},
>>>>
>>>>   Crossref                 = {burnhm},
>>>>   File                     = {:Brown2011a.pdf:PDF},
>>>>   Publisher                = {Wiley Online Library}
>>>> }
>>>>
>>>> @Article{Hobbs2006,
>>>>   Title                    = {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching},
>>>>   Author                   = {Hobbs, N.T. and Hilborn, R.},
>>>>   Journaltitle             = {Ecological Applications},
>>>>   Year                     = {2006},
>>>>   Number                   = {1},
>>>>   Pages                    = {5--19},
>>>>   Volume                   = {16},
>>>>
>>>>   Crossref                 = {Quick2010},
>>>>   File                     = {:Hobbs2006.pdf:PDF},
>>>>   Publisher                = {Eco Soc America}
>>>> }
>>>>
>>>> --End trial.bib file ---------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>>
>>>>> Julian M. Burgos writes:
>>>>>
>>>>>> John, for some weird reason everything seems to be working now.  Thanks
>>>>>> for your help... I will let you know if I break it again.
>>>>>>
>>>>>> John Kitchin writes:
>>>>>>
>>>>>>> that is odd. this means org-ref is not finding the key you clicked
>>>>>>> on. could you send me a small example that reproduces your problem (an
>>>>>>> org-file and the bib file)?
>>>>>>>
>>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>>
>>>>>>>> Hi John, 
>>>>>>>>
>>>>>>>> No, they still do not work even after I click on the bibliography link
>>>>>>>> and get my .bib file opened.
>>>>>>>>
>>>>>>>> Julian
>>>>>>>>
>>>>>>>> John Kitchin writes:
>>>>>>>>
>>>>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>>>>
>>>>>>>>> If you click on the bibliography link to open the file, and then go back
>>>>>>>>> to your org-file, do the cite links work?
>>>>>>>>>
>>>>>>>>> I suspect the notes problem is related to the no key found problem.
>>>>>>>>>
>>>>>>>>>> Hello everyone,
>>>>>>>>>>
>>>>>>>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>>>>>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>>>>>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>>>>>>>> org-ref-pdf-directory.
>>>>>>>>>>
>>>>>>>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>>>>>>>> to add a citation link with no problems.  But when I press enter on the
>>>>>>>>>> cite link, I get the following message:
>>>>>>>>>>
>>>>>>>>>> no key found
>>>>>>>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>>>>>>>
>>>>>>>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>>>>>>>> following message: 
>>>>>>>>>>
>>>>>>>>>> "Wrong type argument: stringp, nil".
>>>>>>>>>>
>>>>>>>>>> Any ideas how to solve this?
>>>>>>>>>>
>>>>>>>>>> Many thanks,
>>>>>>>>>>
>>>>>>>>>> Julian

-- 
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

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

* Re: org-ref "no key found"
  2014-09-16  2:49                   ` John Kitchin
@ 2014-09-16  9:42                     ` Julian M. Burgos
  0 siblings, 0 replies; 12+ messages in thread
From: Julian M. Burgos @ 2014-09-16  9:42 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode

Yes, you were right.  An update of org-mode fixed everything.  Thanks again!

John Kitchin writes:

> If you look in your messages do you see something like jit-lock errors?
> I do not recall exactly what the errors are but the ones I have seen
> that resemble what you describe have jit in them. 
>
> I saw this recently in an ELPA version (maybe around Sept 1), and it went away when I updated
> the ELPA org version to the most recent one.
>
>
> "Julian M. Burgos" <julian@hafro.is> writes:
>
>> John, another issue...a really minor one, and I am not sure if it is
>> org-ref related.  When I open the notes file, the org faces are not
>> applied evenly.  In particular, 
>>
>> a) Text after #TITLE: or #AUTHOR appears as regular text.  If I use M-x
>> describe face, I get "default".  If modify in any way the face changes
>> to "org-document-info" as it should be.
>>
>> b) Within the heading of each reference, the "TODO" statement appears
>> with the same face as the rest of the heading (org-level-2 face).
>>
>> c) Links to pdf files appear like this, with default face:
>>  
>> [[cite:Collie2000]] [[file:/home/julian/Documents/Refs/Collie2000.pdf][pdf]]
>>
>> And not as clickable links 
>> cite:Collie2000 pdf (underlined, in blue, with org-link face)
>>
>> Again, as soon as I change anything the org-link face is applied and I
>> get a clickable link.
>>
>> Of all this, the pdf links are the real issue, as they are
>> non-functional until I edit them.
>>
>> Strangely, :PROPERTIES: and :END: appear in their correct face.  Also,
>> if I "fix" the faces (editing the text or pressing enter so I get the
>> right faces) and close the notes files, I get the same wriong faces when I
>> reopen the file.
>>
>> Does this makes sense?  Do you know what could be the issue?
>> Many thanks again,
>>
>> Julian
>>
>>
>> Julian M. Burgos writes:
>>
>>> Excellent! Many thanks... now it works like a charm.
>>>
>>> John Kitchin writes:
>>>
>>>> No problem. Thanks for the tips to replicate this. It was pretty helpful
>>>> in solving the problem (and thanks again to Nick who pointed me towards
>>>> edebug-defun a while ago!)
>>>>
>>>> I think I have fixed this. The problem was org-ref was not finding a key
>>>> that exists in a file. the way that is done all over org-ref is to
>>>> insert the contents of the bibfile in temp buffer, and then use
>>>> bibtex-search-entry on that buffer. It works like a charm usually, but
>>>> not in the replicated steps you have below. once it works once, though,
>>>> it seems to always work. 
>>>>
>>>> Anyway, I think it is fixed now. there is a new version at
>>>> https://github.com/jkitchin/jmax/blob/master/org/org-ref.org
>>>>
>>>> Thanks for reporting the bug!
>>>>
>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>
>>>>> Hi John,
>>>>>
>>>>> I am resending this... I think it did not went through the previous
>>>>> time.
>>>>>
>>>>> I think I can replicate the org-ref bug now (if it is a bug).  This is
>>>>> the situation:
>>>>>
>>>>> a) If I open emacs, load a file that already has some link, and click on
>>>>> the link (or place the cursor on it and press enter) I get the "no key
>>>>> found" message and I cannot open the notes file (I get a "Wrong type
>>>>> argument: stringp, nil"), although the link to the pdf file works.  If I
>>>>> open more than one file, links do not work in any of them.  At this
>>>>> point if I check the value of the "org-ref-default-bibliography"
>>>>> variable, I get the correct path and filename of my .bib file.
>>>>>
>>>>> b) If I insert a new citation (using Ctrl-]) in any of the documents,
>>>>> links work as they should in all documents (this is, I get the title and
>>>>> I can open the notes file).
>>>>>>
>>>>> I should say that I am not using the org-ref-insert-bibliography-link
>>>>> function, because I use biblatex and I prefer to insert the Latex
>>>>> \printbibliography command.  But if use it and insert the bibliography
>>>>> link, the behaviour does not change.
>>>>>
>>>>> This is what I have in my .emacs file that is related to RefTex and
>>>>> org-ref:
>>>>>
>>>>> --------------------------------------------------------------------------------------
>>>>> ;; Load RefTex
>>>>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>>>>> (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
>>>>> (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
>>>>> (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
>>>>> (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
>>>>> (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
>>>>> (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
>>>>>
>>>>> ;; Make RefTeX faster
>>>>> (setq reftex-enable-partial-scans t)
>>>>> (setq reftex-save-parse-info t)
>>>>> (setq reftex-use-multiple-selection-buffers t)
>>>>> (setq reftex-plug-into-AUCTeX t)
>>>>>
>>>>> (setq reftex-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib"))
>>>>> (setq reftex-sort-bibtex-matches "author")   ; Sort entries found in BibTex database 
>>>>> (setq bibtex-dialect "biblatex")
>>>>>
>>>>> --------------------------------------------------------------------------------------
>>>>> (require 'org-ref)
>>>>>
>>>>> (setq org-ref-bibliography-notes "/home/julian/Documents/org files/notes.org"
>>>>>       org-ref-default-bibliography '("/home/julian/Documents/Refs/BibTex/references.bib")
>>>>>       org-ref-pdf-directory "/home/julian/Documents/Refs/")
>>>>>  (setq org-ref-default-citation-link "parencite")
>>>>>  --------------------------------------------------------------------------------------
>>>>>
>>>>> Below I am sending you very simple .org and .bib files that (in my computer)
>>>>> reproduce this behaviour.  In this file I did use
>>>>> org-ref-insert-bibliography-link.  Let me know if I can give you any other information.  
>>>>>
>>>>> All the best,
>>>>>
>>>>> Julian
>>>>>
>>>>> --Start trial.org file ----------------------------------------------------------------
>>>>>
>>>>> * Trial
>>>>> Some references
>>>>> parencite:Brown2011a,Hobbs2006
>>>>>
>>>>> bibliography:~/Documents/trial.bib
>>>>>
>>>>> --End trial.org file ---------------------------------------------------------------------
>>>>>
>>>>>
>>>>> --Start trial.bib file ----------------------------------------------------------------
>>>>>
>>>>> Article{Brown2011a,
>>>>>   Title                    = {Quantitative approaches in climate change ecology},
>>>>>   Author                   = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
>>>>>   Journaltitle             = {Global Change Biology},
>>>>>   Year                     = {2011},
>>>>>
>>>>>   Crossref                 = {burnhm},
>>>>>   File                     = {:Brown2011a.pdf:PDF},
>>>>>   Publisher                = {Wiley Online Library}
>>>>> }
>>>>>
>>>>> @Article{Hobbs2006,
>>>>>   Title                    = {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching},
>>>>>   Author                   = {Hobbs, N.T. and Hilborn, R.},
>>>>>   Journaltitle             = {Ecological Applications},
>>>>>   Year                     = {2006},
>>>>>   Number                   = {1},
>>>>>   Pages                    = {5--19},
>>>>>   Volume                   = {16},
>>>>>
>>>>>   Crossref                 = {Quick2010},
>>>>>   File                     = {:Hobbs2006.pdf:PDF},
>>>>>   Publisher                = {Eco Soc America}
>>>>> }
>>>>>
>>>>> --End trial.bib file ---------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Julian M. Burgos writes:
>>>>>>
>>>>>>> John, for some weird reason everything seems to be working now.  Thanks
>>>>>>> for your help... I will let you know if I break it again.
>>>>>>>
>>>>>>> John Kitchin writes:
>>>>>>>
>>>>>>>> that is odd. this means org-ref is not finding the key you clicked
>>>>>>>> on. could you send me a small example that reproduces your problem (an
>>>>>>>> org-file and the bib file)?
>>>>>>>>
>>>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>>>
>>>>>>>>> Hi John, 
>>>>>>>>>
>>>>>>>>> No, they still do not work even after I click on the bibliography link
>>>>>>>>> and get my .bib file opened.
>>>>>>>>>
>>>>>>>>> Julian
>>>>>>>>>
>>>>>>>>> John Kitchin writes:
>>>>>>>>>
>>>>>>>>>> "Julian M. Burgos" <julian@hafro.is> writes:
>>>>>>>>>>
>>>>>>>>>> If you click on the bibliography link to open the file, and then go back
>>>>>>>>>> to your org-file, do the cite links work?
>>>>>>>>>>
>>>>>>>>>> I suspect the notes problem is related to the no key found problem.
>>>>>>>>>>
>>>>>>>>>>> Hello everyone,
>>>>>>>>>>>
>>>>>>>>>>> I am playing around with Joh Kitchin's excellent org-ref, and I am
>>>>>>>>>>> having a few issues.  In my .emacs file I have set up the values for the
>>>>>>>>>>> org-ref-bibliography-notes, org-ref-default-bibliography, and
>>>>>>>>>>> org-ref-pdf-directory.
>>>>>>>>>>>
>>>>>>>>>>> With this I can access my .bib database and use org-ref-insert-cite link
>>>>>>>>>>> to add a citation link with no problems.  But when I press enter on the
>>>>>>>>>>> cite link, I get the following message:
>>>>>>>>>>>
>>>>>>>>>>> no key found
>>>>>>>>>>>  (No key found) (p)df (u)rl (n)otes (q) quit
>>>>>>>>>>>
>>>>>>>>>>> If I press "p" I get the pdf file, but if I press "n" I get the
>>>>>>>>>>> following message: 
>>>>>>>>>>>
>>>>>>>>>>> "Wrong type argument: stringp, nil".
>>>>>>>>>>>
>>>>>>>>>>> Any ideas how to solve this?
>>>>>>>>>>>
>>>>>>>>>>> Many thanks,
>>>>>>>>>>>
>>>>>>>>>>> Julian


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian@hafro.is

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

end of thread, other threads:[~2014-09-16 10:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-29 14:54 org-ref "no key found" Julian M. Burgos
2014-08-29 18:58 ` John Kitchin
2014-08-29 18:23   ` Julian M. Burgos
2014-08-30 12:58     ` John Kitchin
2014-08-30 22:18       ` Julian M. Burgos
2014-09-08  9:17         ` Julian M. Burgos
2014-09-12 11:08           ` Julian M. Burgos
2014-09-13 16:18             ` John Kitchin
2014-09-15  9:16               ` Julian M. Burgos
2014-09-15 10:17                 ` Julian M. Burgos
2014-09-16  2:49                   ` John Kitchin
2014-09-16  9:42                     ` Julian M. Burgos

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