-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nothing happens on clicking a cite link #787
Comments
Can you post the contents of the org-file that causes the error? If you run M-x org-ref in that file, does it have any output? What happens when you try to open a pdf? |
Hi!
Yes, a message is printed to the messages buffer:
Well, I go to helm-bibtex directly, stand on a source and hit TAB, then f2 |
an update: helm-bibtex does work (for opening pdfs from its menu), but cite links still don't.
|
I am seeing a similar error on opening Traceback from opening the cite link:
|
can you send me a small org file and bib file that shows this issue? |
The org file
the bib file @book{ahrensHowTakeSmart2017,
title = {How to Take Smart Notes: One Simple Technique to Boost Writing, Learning and Thinking: For Students, Academics and Nonfiction Book Writers},
shorttitle = {How to Take Smart Notes},
author = {Ahrens, Sönke},
date = {2017},
publisher = {{CreateSpace}},
location = {{North Charleston, SC}},
file = {/Users/user/Zotero/storage/NZ6D82FC/Ahrens - 2017 - How to take smart notes one simple technique to b.pdf},
isbn = {978-1-5428-6650-7},
langid = {english},
pagetotal = {170}
}
@thesis{lynaghComputationalAnalysisProtein2010,
title = {Computational Analysis of Protein Structures: Data Visualization, Vector Quantization, and Spectral Clustering},
author = {Lynagh, Kevin},
date = {2010},
institution = {{Reed College}},
file = {/Users/user/Zotero/storage/CNU3NH74/beautiful.pdf},
keywords = {algorithms,beautiful,biology,chemistry,computer science,LaTeX,typography},
type = {Bachelor Thesis}
} |
The @thesis entry is not recognized by bibtex as a valid type, so it cannot find that entry. In the BibTeX dialect you get:
One way you can probably solve this is to run this:
If you update to the new commit, you should be able to fix this with a line like this at the top of your bib file % -- mode:bibtex; eval: (bibtex-set-dialect 'biblatex t); -- or these at the bottom: @comment Local Variables: |
It would also help to see the bibtex file. |
Thanks for the shove! Sounds obvious in retrospect... I will go with the |
@J0ns4 and @fleimgruber I have pushed a totally new |
The new |
Hi,
I don't get any more informative error message from the newer version, but
I have found something strange - when I hit enter over a cite link in
org-ref's manual the actions menu pops up like it should, but for my own
links I still get '''org-ref-cite-candidates: Wrong type argument: stringp,
nil'''.
Does this help to make sense of something?
Thanks!
…On Sat, 2 Jan 2021 at 19:54, John Kitchin ***@***.***> wrote:
Closed #787 <#787>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#787 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEL3S3ERYJGGUNNI3IVLKVLSX5MWPANCNFSM4QSYIVLA>
.
|
|
I don't get a buffer, just the message at the bottom of the screen: I checked the repo, and the last commit there is 7adb762 from Dec. 31... The following is the file (though I see the same behavior in all of my file):
and this is the .bib file:
|
@jonathan-sahar-tau as you do not have a bibliography link in the .org file, e.g. Also, could you evaluate |
Thanks for the quick response!
```
org-ref-default-bibliography is a variable defined in org-ref-core.el.
Value
"~/google_drive/.notes/.bibliography/references.bib"
```
the backtrace shows:
```
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
insert-file-contents(nil)
org-ref-cite-candidates()
org-ref-cite-click-helm(nil)
funcall(org-ref-cite-click-helm nil)
(lambda (_) (funcall org-ref-cite-onclick-function
nil))("amir19_simul_thoug_measur_study_inter")
funcall((lambda (_) (funcall org-ref-cite-onclick-function nil))
"amir19_simul_thoug_measur_study_inter")
(condition-case nil (funcall (org-link-get-parameter type :follow) path
arg) (wrong-number-of-arguments (funcall (org-link-get-parameter type
:follow) path)))
(progn (condition-case nil (funcall (org-link-get-parameter type :follow)
path arg) (wrong-number-of-arguments (funcall (org-link-get-parameter type
:follow) path))))
(if (functionp f) (progn (condition-case nil (funcall
(org-link-get-parameter type :follow) path arg) (wrong-number-of-arguments
(funcall (org-link-get-parameter type :follow) path)))))
(let ((f (org-link-get-parameter type :follow))) (if (functionp f) (progn
(condition-case nil (funcall (org-link-get-parameter type :follow) path
arg) (wrong-number-of-arguments (funcall (org-link-get-parameter type
:follow) path))))))
(cond ((equal type (quote "file")) (let* ((option (org-element-property
:search-option link)) (path (if option (concat path "::" option) path)))
(org-link-open-as-file path (let* ((val (org-element-property :application
link))) (cond (arg arg) ((equal val ...) (quote emacs)) ((equal val ...)
(quote system)) (t nil)))))) ((member type (quote ("radio" "fuzzy"
"custom-id" "coderef"))) (if (run-hook-with-args-until-success (quote
org-open-link-functions) path) nil (if (not arg) (org-mark-ring-push)
(switch-to-buffer-other-window (org-link--buffer-for-internals))) (let
((destination (save-excursion (save-restriction ... ... ...)))) (if (and
(<= (point-min) destination) (>= (point-max) destination)) nil (widen))
(goto-char destination)))) (t (let ((f (org-link-get-parameter type
:follow))) (if (functionp f) (progn (condition-case nil (funcall
(org-link-get-parameter type :follow) path arg) (wrong-number-of-arguments
(funcall ... path))))))))
(let ((type (org-element-property :type link)) (path
(org-element-property :path link))) (cond ((equal type (quote "file"))
(let* ((option (org-element-property :search-option link)) (path (if option
(concat path "::" option) path))) (org-link-open-as-file path (let* ((val
...)) (cond (arg arg) (... ...) (... ...) (t nil)))))) ((member type (quote
("radio" "fuzzy" "custom-id" "coderef"))) (if
(run-hook-with-args-until-success (quote org-open-link-functions) path) nil
(if (not arg) (org-mark-ring-push) (switch-to-buffer-other-window
(org-link--buffer-for-internals))) (let ((destination (save-excursion
...))) (if (and (<= ... destination) (>= ... destination)) nil (widen))
(goto-char destination)))) (t (let ((f (org-link-get-parameter type
:follow))) (if (functionp f) (progn (condition-case nil (funcall ... path
arg) (wrong-number-of-arguments ...))))))))
org-link-open((link (:type "cite" :path
"amir19_simul_thoug_measur_study_inter" :format plain :raw-link
"cite:amir19_simul_thoug_measur_study_inter" :application nil
:search-option nil :begin 293 :end 335 :contents-begin nil :contents-end
nil :post-blank 0 :parent (paragraph (:begin 293 :end 335 :contents-begin
293 :contents-end 335 :post-blank 0 :post-affiliated 293 :parent nil))))
nil)
(cond ((not type) (user-error "No link found")) ((memq type (quote
(comment comment-block node-property keyword))) (call-interactively
(function org-open-at-point-global))) ((memq type (quote (headline
inlinetask))) (org-match-line org-complex-heading-regexp) (let ((tags-beg
(match-beginning 5)) (tags-end (match-end 5))) (if (and tags-beg (>=
(point) tags-beg) (< (point) tags-end)) (org-tags-view arg (save-excursion
(let* (... ...) (buffer-substring ... ...)))) (let* ((val
(org-offer-links-in-entry ... ... arg))) (if (consp val) (let* (...) (if
... ... ...)) nil))))) ((or (eq type (quote footnote-reference)) (and (eq
type (quote footnote-definition)) (save-excursion (skip-chars-forward "
\011") (let ((begin ...)) (if begin (< ... begin) (= ... ...))))))
(org-footnote-action)) ((and (eq type (quote planning)) (org-in-regexp
org-ts-regexp-both nil t)) (org-follow-timestamp-link)) ((and (eq type
(quote clock)) value (>= (point) (org-element-property :begin value)) (<=
(point) (org-element-property :end value))) (org-follow-timestamp-link))
((eq type (quote src-block)) (org-babel-open-src-block-result)) ((>=
(point) (save-excursion (goto-char (org-element-property :end context))
(skip-chars-backward " \011") (point))) (user-error "No link found")) ((eq
type (quote inline-src-block)) (org-babel-open-src-block-result)) ((eq type
(quote timestamp)) (org-follow-timestamp-link)) ((eq type (quote link))
(org-link-open context arg)) (t (user-error "No link found")))
(let* ((context (org-element-lineage (org-element-context) (quote (clock
comment comment-block footnote-definition footnote-reference headline
inline-src-block inlinetask keyword link node-property planning src-block
timestamp)) t)) (type (org-element-type context)) (value
(org-element-property :value context))) (cond ((not type) (user-error "No
link found")) ((memq type (quote (comment comment-block node-property
keyword))) (call-interactively (function org-open-at-point-global))) ((memq
type (quote (headline inlinetask))) (org-match-line
org-complex-heading-regexp) (let ((tags-beg (match-beginning 5)) (tags-end
(match-end 5))) (if (and tags-beg (>= (point) tags-beg) (< (point)
tags-end)) (org-tags-view arg (save-excursion (let* ... ...))) (let* ((val
...)) (if (consp val) (let* ... ...) nil))))) ((or (eq type (quote
footnote-reference)) (and (eq type (quote footnote-definition))
(save-excursion (skip-chars-forward " \011") (let (...) (if begin ...
...))))) (org-footnote-action)) ((and (eq type (quote planning))
(org-in-regexp org-ts-regexp-both nil t)) (org-follow-timestamp-link))
((and (eq type (quote clock)) value (>= (point) (org-element-property
:begin value)) (<= (point) (org-element-property :end value)))
(org-follow-timestamp-link)) ((eq type (quote src-block))
(org-babel-open-src-block-result)) ((>= (point) (save-excursion (goto-char
(org-element-property :end context)) (skip-chars-backward " \011")
(point))) (user-error "No link found")) ((eq type (quote inline-src-block))
(org-babel-open-src-block-result)) ((eq type (quote timestamp))
(org-follow-timestamp-link)) ((eq type (quote link)) (org-link-open context
arg)) (t (user-error "No link found"))))
(if (run-hook-with-args-until-success (quote
org-open-at-point-functions)) nil (let* ((context (org-element-lineage
(org-element-context) (quote (clock comment comment-block
footnote-definition footnote-reference headline inline-src-block inlinetask
keyword link node-property planning src-block timestamp)) t)) (type
(org-element-type context)) (value (org-element-property :value context)))
(cond ((not type) (user-error "No link found")) ((memq type (quote (comment
comment-block node-property keyword))) (call-interactively (function
org-open-at-point-global))) ((memq type (quote (headline inlinetask)))
(org-match-line org-complex-heading-regexp) (let ((tags-beg
(match-beginning 5)) (tags-end (match-end 5))) (if (and tags-beg (>= ...
tags-beg) (< ... tags-end)) (org-tags-view arg (save-excursion ...)) (let*
(...) (if ... ... nil))))) ((or (eq type (quote footnote-reference)) (and
(eq type (quote footnote-definition)) (save-excursion (skip-chars-forward "
\011") (let ... ...)))) (org-footnote-action)) ((and (eq type (quote
planning)) (org-in-regexp org-ts-regexp-both nil t))
(org-follow-timestamp-link)) ((and (eq type (quote clock)) value (>=
(point) (org-element-property :begin value)) (<= (point)
(org-element-property :end value))) (org-follow-timestamp-link)) ((eq type
(quote src-block)) (org-babel-open-src-block-result)) ((>= (point)
(save-excursion (goto-char (org-element-property :end context))
(skip-chars-backward " \011") (point))) (user-error "No link found")) ((eq
type (quote inline-src-block)) (org-babel-open-src-block-result)) ((eq type
(quote timestamp)) (org-follow-timestamp-link)) ((eq type (quote link))
(org-link-open context arg)) (t (user-error "No link found")))))
org-open-at-point(nil)
```
…On Mon, 4 Jan 2021 at 13:47, fleimgruber ***@***.***> wrote:
@jonathan-sahar-tau <https://github.com/jonathan-sahar-tau> as you do not
have a bibliography link in the .org file, e.g. bibliography:library.bib,
the first question would probably be whether org-ref picks up the .bib file
you want. What is the value of org-ref-default-bibliography?
Also, could you evaluate (setq debug-on-error t) and provide the contents
of the *Backtrace* buffer to see where the error comes from within org-ref
?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#787 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEL3S3E3NJDK34UTMDADUUTSYGTE5ANCNFSM4QSYIVLA>
.
|
(which is the correct value) |
It should be a list, as in ("~/google_drive/.notes/.bibliography/references.bib") and not a string. That is most likely the problem. |
Amazing, it works!
Thank you so much for your patience - apologies for the uninspiring
underlying problem :))
…On Mon, 4 Jan 2021 at 15:23, John Kitchin ***@***.***> wrote:
It should be a list, as in
("~/google_drive/.notes/.bibliography/references.bib") and not a string.
That is most likely the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#787 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEL3S3BVXPLCDG766M2UM33SYG6ORANCNFSM4QSYIVLA>
.
|
I apologize for opening an issue for this, but I'm really stuck and I can't get ahead..
I can insert bibliography links with org-ref-insert -link, but when hitting 'return' with the point on a link I get a message saying: "wrong type argument stringp, nil", with no reference to the function that throws the error, so I don't even know where to begin investigating... querying what 'return' does in that context only gives the general "org-dwim at point".
An additional problem which may be related, is that I can't get helm-bibtex to open the related pdf in emacs (something which used to work for me and broke somehow)
These are the relevant lines from my config (relating to org-ref and helm bibtex) :
I'd appreciate any help, thanks!
The text was updated successfully, but these errors were encountered: