jkitchin / org-ref

org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools to go with it.
GNU General Public License v3.0
1.35k stars 242 forks source link

nothing happens on clicking a cite link #787

Closed JonatanSahar closed 3 years ago

JonatanSahar commented 3 years ago

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

(require 'org-ref)

(setq
 org-ref-bibliography-notes "~/google_drive/.notes/.bibliography/bibliography_notes.org"
 org-ref-default-bibliography "~/google_drive/.notes/.bibliography/references.bib"
 org-ref-pdf-directory "~/google_drive/.notes/.bibliography/bibtex_pdf/"
 org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex
 org-ref-note-title-format "* TODO %y - %t\n :PROPERTIES:\n  :Custom_ID: %k\n  :NOTER_DOCUMENT: %F\n :ROAM_KEY: cite:%k\n  :AUTHOR: %9a\n  :JOURNAL: %j\n  :YEAR: %y\n  :VOLUME: %v\n  :PAGES: %p\n  :DOI: %D\n  :URL: %U\n :END:\n\n"
 org-ref-notes-directory "~/google_drive/.notes/literature-notes/"
 org-ref-notes-function 'orb-edit-notes)

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

(setq
    bibtex-completion-bibliography "~/google_drive/.notes/.bibliography/references.bib"
    bibtex-completion-library-path '( "~/google_drive/.notes/.bibliography/bibtex_pdf/")
    bibtex-completion-notes-path "~/google_drive/.notes/literature-notes/"
    bibtex-completion-pdf-field "File"
    bibtex-completion-find-additional-pdfs t)

I'd appreciate any help, thanks!

jkitchin commented 3 years ago

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?

JonatanSahar commented 3 years ago

Hi! These are the contents of the file:

#+TITLE: hubs are related to early myelination
There is evidence that hubs in the infant brain ([[file:
2020-07-28-infant_connectome.org][§:infant connectome]]) form in areas
which myelinate early in development, such as the cerebellum - where most
of the hubs were found in cite:heuvel18_hubs_human_fetal_brain_networ - and
other cortical areas which are known to myelinate early.

There are also more hubs in the left hemisphere, which are known to
myelinate more quickly (earlier?) than the right. (see [[file:
2020-08-05-asymmetry_in_the_developing_brain.org][§:asymmetry in the
developing brain]]) There's also evidence that neuronal activity stimulates
the formation of myelin (cite:turk19_funct_connec_fetal_brain), and it's
interesting to think what's the causal relationship there
([[file:2020-08-05-unanswered_(research)_
questions.sync-conflict-20200805-132316-DDBHED7.org][§:Unanswered
(research) questions]]): it seem plausible that areas which are meant to be
hubs would need, and also foster, an environment of better neuronal
conductivity.

Also interesting to think about the connection with spontaneous firings (see
[[file:
2020-08-05-there_s_possibly_a_connection_between_hubs_and_spontaneous_activity.org][§:there's
possibly a connection between hubs and spontaneous activity]]),
especially with regards to the formation of myelin. why are these areas more
active to begin with? ([[file:2020-08-05-unanswered_(research)_
questions.sync-conflict-20200805-132316-DDBHED7.org][§:Unanswered
(research) questions]])

Apparently, most studies haven't looked for hubs in fetal brains, why?
([[file:2020-08-05-unanswered_(research)_
questions.sync-conflict-20200805-132316-DDBHED7.org][§:Unanswered
(research) questions]])

Yes, a message is printed to the messages buffer:

if: Wrong type argument: stringp, 126

Well, I go to helm-bibtex directly, stand on a source and hit TAB, then f2 for opening a PDF and nothing happens whatsoever - not even a message.

JonatanSahar commented 3 years ago

an update: helm-bibtex does work (for opening pdfs from its menu), but cite links still don't. I see that the citation is read correctly - I get the expanded form of the citation under the modline, but calling (M-x) org-ref on the citation (with debug on error enabled) gives:

Debugger entered--Lisp error: (wrong-type-argument stringp 126)
  file-exists-p(126)
  (if (file-exists-p bibfile) nil (let* ((var (cons (format "%s does not exist." bibfile) (function (lambda nil (message "Non-existent bibfile.")))))) (if (memql var bib-candidates) (with-no-warnings bib-candidates) (setq bib-candidates (cons var bib-candidates)))))
  (closure ((biblatex-used) (biblatex-required) (cleveref-used) (cleveref-required) (natbib-used) (natbib-required) (unreferenced-labels) (bib-candidates ("No bibliographystyle found." closure #2 nil (switch-to-buffer "*org-ref*") (erase-buffer) (insert "No bibliography style found. This may be ok, if your latex class style sets that up, but if not this is an error. Try adding something like:\nbibliographystyle:unsrt\nat the end of you file.\n") (org-mode)) ("Using these bibtex files: ~/google_drive/.notes/.bibliography/references.bib" closure #2 nil nil)) (bad-files) (bad-labels) (bad-refs) (bad-citations ("makinTenCommonStatistical2019" . #<marker at 450 in projects.org>) ("bidermanEvidenceImplicitNot2018" . #<marker at 401 in projects.org>) ("mudrikERPEvidenceContext2010" . #<marker at 270 in projects.org>)) (cb . #<buffer projects.org>) t) (bibfile) (if (file-exists-p bibfile) nil (let* ((var (cons (format "%s does not exist." bibfile) (function (lambda nil ...))))) (if (memql var bib-candidates) (with-no-warnings bib-candidates) (setq bib-candidates (cons var bib-candidates))))))(126)
  mapc((closure ((biblatex-used) (biblatex-required) (cleveref-used) (cleveref-required) (natbib-used) (natbib-required) (unreferenced-labels) (bib-candidates ("No bibliographystyle found." closure #3 nil (switch-to-buffer "*org-ref*") (erase-buffer) (insert "No bibliography style found. This may be ok, if your latex class style sets that up, but if not this is an error. Try adding something like:\nbibliographystyle:unsrt\nat the end of you file.\n") (org-mode)) ("Using these bibtex files: ~/google_drive/.notes/.bibliography/references.bib" closure #3 nil nil)) (bad-files) (bad-labels) (bad-refs) (bad-citations ("makinTenCommonStatistical2019" . #<marker at 450 in projects.org>) ("bidermanEvidenceImplicitNot2018" . #<marker at 401 in projects.org>) ("mudrikERPEvidenceContext2010" . #<marker at 270 in projects.org>)) (cb . #<buffer projects.org>) t) (bibfile) (if (file-exists-p bibfile) nil (let* ((var (cons (format "%s does not exist." bibfile) (function ...)))) (if (memql var bib-candidates) (with-no-warnings bib-candidates) (setq bib-candidates (cons var bib-candidates)))))) "~/google_drive/.notes/.bibliography/references.bib")
  (let ((cb (current-buffer)) (bad-citations (org-ref-bad-cite-candidates)) (bad-refs (org-ref-bad-ref-candidates)) (bad-labels (org-ref-bad-label-candidates)) (bad-files (org-ref-bad-file-link-candidates)) (bib-candidates (quote nil)) (unreferenced-labels (quote nil)) natbib-required natbib-used cleveref-required cleveref-used biblatex-required biblatex-used (org-latex-prefer-user-labels (and (boundp (quote org-latex-prefer-user-labels)) org-latex-prefer-user-labels))) (org-element-map (org-element-parse-buffer) (quote link) (function (lambda (link) (if (member (org-element-property :type link) org-ref-natbib-types) (progn (setq natbib-required t))) (if (member (org-element-property :type link) org-ref-biblatex-types) (progn (setq biblatex-required t))) (if (member (org-element-property :type link) (quote ("cref" "Cref"))) (progn (setq cleveref-required t))))) nil t) (setq natbib-used (or (member "natbib" (mapcar (function (lambda (x) (if ... ...))) org-latex-default-packages-alist)) (member "natbib" (mapcar (function (lambda (x) (if ... ...))) org-latex-packages-alist)) (save-excursion (goto-char (point-min)) (re-search-forward "{natbib}" nil t)))) (setq biblatex-used (or (member "biblatex" (mapcar (function (lambda (x) (if ... ...))) org-latex-default-packages-alist)) (member "biblatex" (mapcar (function (lambda (x) (if ... ...))) org-latex-packages-alist)) (save-excursion (goto-char (point-min)) (re-search-forward "{biblatex}" nil t)))) (setq cleveref-used (or (member "cleveref" (mapcar (function (lambda (x) (if ... ...))) org-latex-default-packages-alist)) (member "cleveref" (mapcar (function (lambda (x) (if ... ...))) org-latex-packages-alist)) (save-excursion (goto-char (point-min)) (re-search-forward "{cleveref}" nil t)))) (let* ((var (cons (format "Using these bibtex files: %s" (org-ref-find-bibliography)) (function (lambda nil nil))))) (if (memql var bib-candidates) (with-no-warnings bib-candidates) (setq bib-candidates (cons var bib-candidates)))) (save-excursion (goto-char 0) (if (re-search-forward "bibliographystyle:\\|\\\\bibliographystyle{" nil t) nil (let* ((var (cons "No bibliographystyle found." (function ...)))) (if (memql var bib-candidates) (with-no-warnings bib-candidates) (setq bib-candidates (cons var bib-candidates)))))) (save-excursion (goto-char 0) (if (re-search-forward "bibliographystyle:" nil t) (progn (let ((path (org-element-property :path ...))) (if (= 0 (shell-command ...)) nil (let* (...) (if ... ... ...))))))) (let* ((bib-links (-filter (function (lambda (el) (string= ... "bibliography"))) (org-element-map (org-element-parse-buffer) (quote link) (quote identity)))) (n-bib-links (length bib-links))) (if (> n-bib-links 1) (progn (mapc (function (lambda (link) (setq bib-candidates ...))) bib-links)))) (mapc (function (lambda (bibfile) (if (file-exists-p bibfile) nil (let* ((var ...)) (if (memql var bib-candidates) (with-no-warnings bib-candidates) (setq bib-candidates ...)))))) (org-ref-find-bibliography)) (let ((bibfiles (mapcar (quote expand-file-name) (org-ref-find-bibliography)))) (mapc (function (lambda (bibfile) (if (string-match " " bibfile) (progn (let* ... ...))))) bibfiles)) (let ((bibfiles (mapcar (quote expand-file-name) (org-ref-find-bibliography)))) (mapc (function (lambda (bibfile) (if (save-current-buffer (set-buffer ...) (bibtex-validate)) nil (let* (...) (if ... ... ...))))) bibfiles)) (save-excursion (save-restriction (widen) (goto-char (point-min)) (let ((matches (quote nil))) (while (re-search-forward "[^#+]label:\\([a-zA-Z0-9:-]*\\)" nil t) (let* ((var ...)) (if (memql var matches) (with-no-warnings matches) (setq matches ...)))) (save-excursion (goto-char (point-min)) (while (re-search-forward "^#\\+label:\\s-+\\(.*\\)\\b" nil t) (if (let ... ...) nil (let* ... ...)))) (save-excursion (goto-char (point-min)) (while (re-search-forward "\\\\label{\\([a-zA-Z0-9:-]*\\)}" nil t) (let* (...) (if ... ... ...)))) (let* ((--cl-var-- (org-element-map ... ... ...)) (cell nil)) (while (consp --cl-var--) (setq cell (car --cl-var--)) (let* (...) (if ... ... ...)) (setq --cl-var-- (cdr --cl-var--))) nil) (org-map-entries (function (lambda nil (let ... ...)))) (goto-char (point-min)) (while (re-search-forward "^#\\+name:\\s-+\\(.*\\)" nil t) (let* ((var ...)) (if (memql var matches) (with-no-warnings matches) (setq matches ...)))) (let ((refs (org-element-map ... ... ...))) (let* ((--cl-var-- matches) (p nil) (label nil)) (while (consp --cl-var--) (setq p ... label ...) (if ... ...) (setq --cl-var-- ...)) nil))))) (helm :sources (list (cons (quote (name . "Bad citations")) (cons (cons (quote candidates) bad-citations) (quote ((action lambda ... ... ... ...))))) (cons (quote (name . "Multiply defined labels")) (cons (cons (quote candidates) bad-labels) (quote ((action lambda ... ... ... ...))))) (cons (quote (name . "Bad ref links")) (cons (cons (quote candidates) bad-refs) (quote ((action lambda ... ... ... ...))))) (cons (quote (name . "Bad file links")) (cons (cons (quote candidates) bad-files) (quote ((lambda ... ... ... ...))))) (cons (quote (name . "Labels with no ref links")) (cons (cons (quote candidates) unreferenced-labels) (quote ((action lambda ... ... ... ...))))) (list (quote (name . "Bibliography")) (cons (quote candidates) bib-candidates) (cons (quote action) (cons (quote lambda) (cons (quote ...) (cons ... ...))))) (cons (quote (name . "Miscellaneous")) (cons (list (quote candidates) (format "org-latex-prefer-user-labels = %s" org-latex-prefer-user-labels) (format "bibtex-dialect = %s" bibtex-dialect) (format "biblatex is%srequired." (if biblatex-required " " " not ")) (format "biblatex is%sused." (if biblatex-used " " " not ")) (format "org-version = %s" (org-version)) (format "completion backend = %s" org-ref-completion-library) (format "org-latex-pdf-process is defined as %s" org-latex-pdf-process) (format "natbib is%srequired." (if natbib-required " " " not ")) (format "natbib is%sused." (if natbib-used " " " not ")) (format "cleveref is%srequired." (if cleveref-required " " " not ")) (format "cleveref is%sused." (if cleveref-used " " " not "))) (quote ((action))))) (list (quote (name . "Utilities")) (quote (candidates ("Check buffer again" . org-ref) ("Insert citation" . helm-bibtex) ("Insert label link" . org-ref-helm-insert-label-link) ("Insert ref link" . org-ref-helm-insert-ref-link) ("List of figures" . org-ref-list-of-figures) ("List of tables" . org-ref-list-of-tables) ("Table of contents" . helm-org-in-buffer-headings))) (cons (quote action) (cons (quote lambda) (cons (quote ...) (cons ... ...))))) (list (quote (name . "Document utilities")) (quote (candidates ("Spell check document" . ispell))) (cons (quote action) (cons (quote lambda) (cons (quote ...) (cons ... ...))))) (list (quote (name . "Export functions")) (quote (candidates ("Extract cited entries" . org-ref-extract-bibtex-entries) ("Export to html and open" lambda nil (org-open-file ...)) ("Export to pdf and open" lambda nil (org-open-file ...)) ("Export to manuscript pdf and open" . ox-manuscript-export-and-build-and-open) ("Export submission manuscript pdf and open" . ox-manuscript-build-submission-manuscript-and-open))) (cons (quote action) (cons (quote lambda) (cons (quote ...) (cons ... ...))))))))
  org-ref()
  funcall-interactively(org-ref)
  call-interactively(org-ref record nil)
  command-execute(org-ref record)
  counsel-M-x-action("org-ref")
  ivy-call()
  ivy-read("M-x " ("org-ref" "org-ref-insert-link" "my/org-archive-done-tasks" "my/org-faces" "helm-bibtex" "org-noter" "org-roam-db-build-cache" "olivetti-mode" "visual-fill-column-mode" "ivy-bibtex" "helm-M-x" "org-roam-mode" "visual-line-mode" "org-ref-insert-ref-link" "org-ref-helm-insert-ref-link" "ace-window" "org-pomodoro" "helm-org-rifle" "+workspace/save" "orb-note-actions" "org-roam-db-clear" "orb-insert-non-ref" "org-ref-bibtex-pdf" "org-roam-build-cache" "org-roam-diagnostics" "dtrt-indent-highlight" "view-echo-area-messages" "org-ref-bibtex-hydra/helm-bibtex-and-exit" "cd" "jb" "5x5" "amx" "arp" "dbx" "dig" "erc" "ert" "eww" "ftp" "gdb" "irc" "jdb" "man" "mpc" "orc" "orn" "oro" "orp" "oru" "pdb" ...) :predicate #f(compiled-function (x) #<bytecode 0x24a4529>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
fleimgruber commented 3 years ago

I am seeing a similar error on opening cite: links (traceback below). org-ref shows the cite link in question under the "Bad citations" section, but the "Bibliography" section points to the .bib file that does have that cite key in it (triple-checked). There is one other cite link that works and another that does not work either in this .org file. How to debug this further?

Traceback from opening the cite link:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  insert-file-contents(nil)
  (progn (insert-file-contents bibfile) (bibtex-set-dialect (parsebib-find-bibtex-dialect) t) (bibtex-search-entry key) (bibtex-autokey-get-field "url"))
  (unwind-protect (progn (insert-file-contents bibfile) (bibtex-set-dialect (parsebib-find-bibtex-dialect) t) (bibtex-search-entry key) (bibtex-autokey-get-field "url")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents bibfile) (bibtex-set-dialect (parsebib-find-bibtex-dialect) t) (bibtex-search-entry key) (bibtex-autokey-get-field "url")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents bibfile) (bibtex-set-dialect (parsebib-find-bibtex-dialect) t) (bibtex-search-entry key) (bibtex-autokey-get-field "url")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (save-excursion (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents bibfile) (bibtex-set-dialect (parsebib-find-bibtex-dialect) t) (bibtex-search-entry key) (bibtex-autokey-get-field "url")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
  (let* ((results (org-ref-get-bibtex-key-and-file)) (key (car results)) (bibfile (cdr results)) (bibtex-completion-bibliography (list bibfile)) (entry (bibtex-completion-get-entry key)) (pdf-file (funcall org-ref-get-pdf-filename-function key)) (pdf-bibtex-completion (car (bibtex-completion-find-pdf key))) (notes-p (cdr (assoc "=has-note=" entry))) (url (save-excursion (let (...) (save-current-buffer ... ...)))) (doi (save-excursion (let (...) (save-current-buffer ... ...)))) (candidates '(("Quit" . org-ref-citation-at-point) ("Open bibtex entry" . org-ref-open-citation-at-point)))) (if (string= doi "") (progn (setq doi nil))) (if (string= url "") (progn (setq url nil))) (cond ((file-exists-p pdf-file) (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates)))) (pdf-bibtex-completion (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates)))) (t (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))))) (if notes-p (if (memql '("Open notes" . org-ref-open-notes-at-point) candidates) (with-no-warnings candidates) (setq candidates (cons '... candidates))) (if (memql '("Add notes" . org-ref-open-notes-at-point) candidates) (with-no-warnings candidates) (setq candidates (cons '... candidates)))) (if (or url doi) (progn (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))))) (if doi (progn (mapc #'(lambda ... ...) '(... ... ... ... ... ...)))) (if (memql '("Insert new citation" lambda nil (org-ref-helm-insert-cite-link nil)) candidates) (with-no-warnings candidates) (setq candidates (cons '("Insert new citation" lambda nil ...) candidates))) (if (memql '("Delete key at point" . org-ref-delete-key-at-point) candidates) (with-no-warnings candidates) (setq candidates (cons '("Delete key at point" . org-ref-delete-key-at-point) candidates))) (if (memql '("Replace key at point" . org-ref-replace-key-at-point) candidates) (with-no-warnings candidates) (setq candidates (cons '("Replace key at point" . org-ref-replace-key-at-point) candidates))) (if (memql '("Delete citation at point" . org-ref-delete-cite-at-point) candidates) (with-no-warnings candidates) (setq candidates (cons '("Delete citation at point" . org-ref-delete-cite-at-point) candidates))) (if bibtex-completion-cite-prompt-for-optional-arguments (progn (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))))) (if (memql '("Sort keys by year" . org-ref-sort-citation-link) candidates) (with-no-warnings candidates) (setq candidates (cons '("Sort keys by year" . org-ref-sort-citation-link) candidates))) (if (memql '("Copy formatted citation to clipboard" . org-ref-copy-cite-as-summary) candidates) (with-no-warnings candidates) (setq candidates (cons '("Copy formatted citation to clipboard" . org-ref-copy-cite-as-summary) candidates))) (if (memql '("Copy key to clipboard" lambda nil (kill-new ...)) candidates) (with-no-warnings candidates) (setq candidates (cons '("Copy key to clipboard" lambda nil ...) candidates))) (if (memql '("Copy bibtex entry to file" . org-ref-copy-entry-at-point-to-file) candidates) (with-no-warnings candidates) (setq candidates (cons '("Copy bibtex entry to file" . org-ref-copy-entry-at-point-to-file) candidates))) (if (memql '("Email bibtex entry and pdf" lambda nil (save-excursion ... ...)) candidates) (with-no-warnings candidates) (setq candidates (cons '("Email bibtex entry and pdf" lambda nil ...) candidates))) (if (and (boundp '*scopus-api-key*) *scopus-api-key*) (progn (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))) (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))) (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))) (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))) (if (memql '... candidates) (with-no-warnings candidates) (setq candidates (cons ... candidates))))) (let* ((i 0) (--cl-var-- (reverse candidates)) (cell nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq cell (car --cl-var--)) (setq --cl-var-- (cons (cons ... ...) --cl-var--)) (setq i (+ i 1)) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--)))
  org-ref-cite-candidates()
  (let ((name (org-ref-format-entry (org-ref-get-bibtex-key-under-cursor))) (candidates (org-ref-cite-candidates)) (cb (current-buffer))) (helm :sources (list (list (cons 'name name) (cons 'candidates candidates) (cons 'action (cons 'lambda (cons '... (cons ... ...))))) (list '(name . "User functions") (cons 'candidates org-ref-helm-user-candidates) (cons 'action (cons 'lambda (cons '... (cons ... ...))))))))
  org-ref-cite-click-helm(nil)
  funcall(org-ref-cite-click-helm nil)
  (lambda (_) (funcall org-ref-cite-onclick-function nil))("lynaghComputationalAnalysisProtein2010")
  org-link-open((link (:type "cite" :path "lynaghComputationalAnalysisProtein2010" :format plain :raw-link "cite:lynaghComputationalAnalysisProtein2010" :application nil :search-option nil :begin 773101 :end 773144 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph (:begin 773101 :end 773146 :contents-begin 773101 :contents-end 773145 :post-blank 1 :post-affiliated 773101 :parent nil)))) nil)
  org-open-at-point(nil)
  funcall-interactively(org-open-at-point nil)
  call-interactively(org-open-at-point nil nil)
  command-execute(org-open-at-point)
jkitchin commented 3 years ago

can you send me a small org file and bib file that shows this issue?

fleimgruber commented 3 years ago

The org file

cite:ahrensHowTakeSmart2017

cite:lynaghComputationalAnalysisProtein2010

bibliographystyle:plain
bibliography:lib-issue.bib

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}
}
jkitchin commented 3 years ago

The @thesis entry is not recognized by bibtex as a valid type, so it cannot find that entry. In the BibTeX dialect you get:

@PhdThesis{,
  author =   {},
  title =    {},
  school =   {},
  year =     {},
  OPTkey =   {},
  OPTtype =      {},
  OPTaddress =   {},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {}
}

@MastersThesis{,
  author =   {},
  title =    {},
  school =   {},
  year =     {},
  OPTkey =   {},
  OPTtype =      {},
  OPTaddress =   {},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {}
}

One way you can probably solve this is to run this:

(bibtex-set-dialect 'biblatex) in your init file to tell bibtex to use biblatex as the dialect (where thesis is defined). I have pushed a fix to use local variables also.

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: @Comment bibtex-dialect: biblatex @Comment End:

jkitchin commented 3 years ago

Hi! These are the contents of the file:

#+TITLE: hubs are related to early myelination
There is evidence that hubs in the infant brain ([[file:
2020-07-28-infant_connectome.org][§:infant connectome]]) form in areas
which myelinate early in development, such as the cerebellum - where most
of the hubs were found in cite:heuvel18_hubs_human_fetal_brain_networ - and
other cortical areas which are known to myelinate early.

There are also more hubs in the left hemisphere, which are known to
myelinate more quickly (earlier?) than the right. (see [[file:
2020-08-05-asymmetry_in_the_developing_brain.org][§:asymmetry in the
developing brain]]) There's also evidence that neuronal activity stimulates
the formation of myelin (cite:turk19_funct_connec_fetal_brain), and it's
interesting to think what's the causal relationship there
([[file:2020-08-05-unanswered_(research)_
questions.sync-conflict-20200805-132316-DDBHED7.org][§:Unanswered
(research) questions]]): it seem plausible that areas which are meant to be
hubs would need, and also foster, an environment of better neuronal
conductivity.

Also interesting to think about the connection with spontaneous firings (see
[[file:
2020-08-05-there_s_possibly_a_connection_between_hubs_and_spontaneous_activity.org][§:there's
possibly a connection between hubs and spontaneous activity]]),
especially with regards to the formation of myelin. why are these areas more
active to begin with? ([[file:2020-08-05-unanswered_(research)_
questions.sync-conflict-20200805-132316-DDBHED7.org][§:Unanswered
(research) questions]])

Apparently, most studies haven't looked for hubs in fetal brains, why?
([[file:2020-08-05-unanswered_(research)_
questions.sync-conflict-20200805-132316-DDBHED7.org][§:Unanswered
(research) questions]])

Yes, a message is printed to the messages buffer:

if: Wrong type argument: stringp, 126

Well, I go to helm-bibtex directly, stand on a source and hit TAB, then f2 for opening a PDF and nothing happens whatsoever - not even a message.

It would also help to see the bibtex file.

fleimgruber commented 3 years ago

Thanks for the shove! Sounds obvious in retrospect... I will go with the bibtex-set-dialect for now, as the .bib file is auto-generated on a regular basis (by Zotero using the "Better BibTeX" plugin). Thanks for all your work and support on org-ref!

jkitchin commented 3 years ago

@J0ns4 and @fleimgruber I have pushed a totally new org-ref command that might help identify these issues. I guess it will be up on melpa by tomorrow. With the new version just run M-x org-ref in the org file, and maybe it will identify the issue (s).

fleimgruber commented 3 years ago

The new org-ref command indeed identifies the issues and gives details on where the issues are; quite useful.

JonatanSahar commented 3 years ago

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 notifications@github.com wrote:

Closed #787 https://github.com/jkitchin/org-ref/issues/787.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jkitchin/org-ref/issues/787#event-4161869287, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEL3S3ERYJGGUNNI3IVLKVLSX5MWPANCNFSM4QSYIVLA .

jkitchin commented 3 years ago
  1. Can you paste the contents of the buffer that M-x org-ref creates here?
  2. Can you put the org-file and bibfile where you have a problem here?
jonathan-sahar-tau commented 3 years ago

I don't get a buffer, just the message at the bottom of the screen: org-ref-cite-candidates: Wrong type argument: stringp, nil

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

#+TITLE: Integrated information theory: from consciousness to its physical substrate
#+ROAM_KEY: cite:tononiIntegratedInformationTheory2016

:PROPERTIES:
:Custom_ID: tononiIntegratedInformationTheory2016
:URL:
:AUTHOR: Tononi, G., Boly, M., Massimini, M., & Koch, C.

cite:amir19_simul_thoug_measur_study_inter

and this is the .bib file:

@article{alon09_how_to_choos_good_scien_probl,
  title = {How to Choose a Good Scientific Problem},
  author = {Alon, Uri},
  year = {2009},
  volume = {35},
  pages = {726--728},
  doi = {10.1016/j.molcel.2009.09.013},
  date_added = {Wed Aug 12 15:36:54 2020},
  journal = {Molecular Cell},
  number = {6}
}

@article{amir19_simul_thoug_measur_study_inter,
  title = {Simulating Thoughts to Measure and Study Internal Attention in Mental Health},
  author = {Amir, Iftach and Ruimi, Liad and Bernstein, Amit},
  year = {2019},
  doi = {10.31234/osf.io/vu8sa},
  date_added = {Thu Jun 18 18:42:21 2020}
}

@article{aydemirDecisionTreeStructure2014a,
  title = {Decision Tree Structure Based Classification of {{EEG}} Signals Recorded during Two Dimensional Cursor Movement Imagery},
  author = {Aydemir, Onder and Kayikcioglu, Temel},
  year = {2014},
  month = may,
  volume = {229},
  pages = {68--75},
  issn = {01650270},
  doi = {10.1016/j.jneumeth.2014.04.007},
  abstract = {Background: I},
  file = {C\:\\Users\\Jonathan\\Documents\\zotero\\storage\\7WCPXF2S\\Aydemir and Kayikcioglu - 2014 - Decision tree structure based classification of EE.pdf},
  journal = {Journal of Neuroscience Methods},
  language = {en}
}

@article{baeDissociableDecodingSpatial2018,
  title = {Dissociable {{Decoding}} of {{Spatial Attention}} and {{Working Memory}} from {{EEG Oscillations}} and {{Sustained Potentials}}},
  author = {Bae, Gi-Yeul and Luck, Steven J.},
  year = {2018},
  month = jan,
  volume = {38},
  pages = {409--422},
  issn = {0270-6474, 1529-2401},
  doi = {10.1523/JNEUROSCI.2860-17.2017},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Bae_Luck_2018_Dissociable Decoding of Spatial Attention and Working Memory from EEG2.pdf},
  journal = {The Journal of Neuroscience},
  language = {en},
  number = {2}
}

@article{baeDissociableDecodingSpatial2018cPresentation,
  title = {Dissociable {{Decoding}} Ofof {{EEG}} - Presentation},
  author = {Bae, Gi-Yeul and Luck, Steven J.},
  year = {2018},
  month = jan,
  volume = {38},
  pages = {409--422},
  issn = {0270-6474, 1529-2401},
  doi = {10.1523/JNEUROSCI.2860-17.2017},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Bae_Luck_2018_Dissociable Decoding of Spatial Attention and Working Memory from EEG.pdf},
  journal = {The Journal of Neuroscience},
  language = {en},
  number = {2}
}

@article{bidermanEvidenceImplicitNot2018,
  title = {Evidence for {{Implicit}}\textemdash{{But Not Unconscious}}\textemdash{{Processing}} of {{Object}}-{{Scene Relations}}},
  author = {Biderman, Natalie and Mudrik, Liad},
  year = {2018},
  month = feb,
  volume = {29},
  pages = {266--277},
  issn = {0956-7976, 1467-9280},
  doi = {10.1177/0956797617735745},
  abstract = {Is consciousness.},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Biderman_Mudrik_2018_Evidence for Implicit―But Not Unconscious―Processing of Object-Scene Relations.pdf},
  journal = {Psychological Science},
  language = {en},
  number = {2}
}

@article{carhart-harris14_entrop_brain,
  title = {The Entropic Brain: A Theory of Conscious States Informed by Neuroimaging Research with Psychedelic Drugs},
  author = {{Carhart-Harris}, Robin L. and Leech, Robert and Hellyer, Peter J. and Shanahan, Murray and Feilding, Amanda and Tagliazucchi, Enzo and Chialvo, Dante R. and Nutt, David},
  year = {2014},
  volume = {8},
  pages = {nil},
  doi = {10.3389/fnhum.2014.00020},
  date_added = {Wed Jun 10 09:48:40 2020},
  journal = {Frontiers in Human Neuroscience},
  number = {nil}
}

@article{cohen17_role_oxytoc_modul_inter_space,
  title = {The Role of Oxytocin in Modulating Interpersonal Space: A Pharmacological Fmri Study},
  author = {Cohen, Daniela and Perry, Anat and Gilam, Gadi and Mayseless, Naama and Gonen, Tal and Hendler, Talma and {Shamay-Tsoory}, Simone G.},
  year = {2017},
  volume = {76},
  pages = {77--83},
  doi = {10.1016/j.psyneuen.2016.10.021},
  date_added = {Sun May 24 16:03:55 2020},
  journal = {Psychoneuroendocrinology},
  number = {nil}
}

@article{fischman19_seein_without_self,
  title = {Seeing without Self: {{Discovering}} New Meaning with Psychedelic-Assisted Psychotherapy},
  author = {Fischman, Lawrence G.},
  year = {2019},
  volume = {21},
  pages = {53--78},
  doi = {10.1080/15294145.2019.1689528},
  date_added = {Fri Jun 5 13:35:55 2020},
  journal = {Neuropsychoanalysis},
  number = {2}
}

@article{grazianoConsciousnessAttentionSchema2020,
  title = {Consciousness and the Attention Schema: {{Why}} It Has to Be Right},
  shorttitle = {Consciousness and the Attention Schema},
  author = {Graziano, Michael S. A.},
  year = {2020},
  month = may,
  volume = {37},
  pages = {224--233},
  issn = {0264-3294, 1464-0627},
  doi = {10.1080/02643294.2020.1761782},
  abstract = {This article descri},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Graziano_2020_Consciousness and the attention schema.pdf},
  journal = {Cognitive Neuropsychology},
  language = {en},
  number = {3-4}
}

@article{grazianoStandardModelConsciousness2020,
  title = {Toward a Standard Model of Consciousness: {{Reconciling}} the Attention Schema, Global Workspace, Higher-Order Thought, and Illusionist Theories},
  shorttitle = {Toward a Standard Model of Consciousness},
  author = {Graziano, Michael S. A. and Guterstam, Arvid and Bio, Branden J. and Wilterson, Andrew I.},
  year = {2020},
  month = may,
  volume = {37},
  pages = {155--172},
  issn = {0264-3294, 1464-0627},
  doi = {10.1080/02643294.2019.1670630},
  abstract = {in.},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Graziano et al_2020_Toward a standard model of consciousness.pdf},
  journal = {Cognitive Neuropsychology},
  language = {en},
  number = {3-4}
}

@article{hacmun18_princ_art_therap_virtual_realit,
  title = {The Principles of Art Therapy in Virtual Reality},
  author = {Hacmun, Irit and Regev, Dafna and Salomon, Roy},
  year = {2018},
  volume = {9},
  pages = {nil},
  doi = {10.3389/fpsyg.2018.02082},
  date_added = {Sun May 24 13:15:41 2020},
  journal = {Frontiers in Psychology},
  number = {nil}
}

@article{heuvel18_hubs_human_fetal_brain_networ,
  title = {Hubs in the Human Fetal Brain Network},
  author = {{van den Heuvel}, Marion I. and Turk, Elise and Manning, Janessa H. and Hect, Jasmine and {Hernandez-Andrade}, Edgar and Hassan, Sonia S. and Romero, Roberto and {van den Heuvel}, Martijn P. and Thomason, Moriah E.},
  year = {2018},
  volume = {30},
  pages = {108--115},
  doi = {10.1016/j.dcn.2018.02.001},
  date_added = {Mon Jul 27 12:41:08 2020},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\van den Heuvel et al_2018_Hubs in the human fetal brain network.pdf},
  journal = {Developmental Cognitive Neuroscience},
  number = {nil}
}

@article{howell19_unc_baby_connec_projec_bcp,
  title = {The Unc/Umn Baby Connectome Project ({{BCP}}): An Overview of the Study Design and Protocol Development},
  author = {Howell, Brittany R. and Styner, Martin A. and Gao, Wei and Yap, Pew-Thian and Wang, Li and Baluyot, Kristine and Yacoub, Essa and Chen, Geng and Potts, Taylor and Salzwedel, Andrew and Li, Gang and Gilmore, John H. and Piven, Joseph and Smith, J. Keith and Shen, Dinggang and Ugurbil, Kamil and Zhu, Hongtu and Lin, Weili and Elison, Jed T.},
  year = {2019},
  volume = {185},
  pages = {891--905},
  doi = {10.1016/j.neuroimage.2018.03.049},
  date_added = {Mon Jul 27 12:53:25 2020},
  journal = {NeuroImage},
  number = {nil}
}

@article{ivancovsky18_trans_direc_curren_stimul_target,
  title = {Transcranial Direct Current Stimulation ({{tDCS}}) Targeting the Left Inferior Frontal Gyrus: {{Effects}} on Creativity across Cultures},
  author = {Ivancovsky, Tal and Kurman, Jenny and Morio, Hiroaki and {Shamay-Tsoory}, Simone},
  year = {2018},
  volume = {14},
  pages = {277--285},
  doi = {10.1080/17470919.2018.1464505},
  date_added = {Sun May 24 16:18:45 2020},
  journal = {Social Neuroscience},
  number = {3}
}

@article{krugwasser19_bound_self,
  title = {The Boundaries of the Self: The Sense of Agency across Different Sensorimotor Aspects},
  author = {Krugwasser, Amit Regev and Harel, Eiran V. and Salomon, Roy},
  year = {2019},
  volume = {19},
  pages = {14},
  doi = {10.1167/19.4.14},
  date_added = {Sun May 24 12:59:21 2020},
  journal = {Journal of Vision},
  number = {4}
}

@article{makinTenCommonStatistical2019,
  title = {Ten Common Statistical Mistakes to Watch out for When Writing or Reviewing a Manuscript},
  author = {Makin, Tamar R and {Orban de Xivry}, Jean-Jacques},
  year = {2019},
  month = oct,
  volume = {8},
  pages = {e48175},
  issn = {2050-084X},
  doi = {10.7554/eLife.48175},
  abstract = {Inspiree.},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Makin_Orban de Xivry_2019_Ten common statistical mistakes to watch out for when writing or reviewing a.pdf},
  journal = {eLife},
  language = {en}
}

@article{milliere18_psych_medit_self_consc,
  title = {Psychedelics, Meditation, and Self-Consciousness},
  author = {Milli{\`e}re, Rapha{\"e}l and {Carhart-Harris}, Robin L. and Roseman, Leor and Trautwein, Fynn-Mathis and {Berkovich-Ohana}, Aviva},
  year = {2018},
  volume = {9},
  pages = {nil},
  doi = {10.3389/fpsyg.2018.01475},
  date_added = {Mon Jun 29 17:55:31 2020},
  journal = {Frontiers in Psychology},
  number = {nil}
}

@article{mudrikERPEvidenceContext2010,
  title = {{{ERP}} Evidence for Context Congruity Effects during Simultaneous Object\textendash Scene Processing},
  author = {Mudrik, Liad and Lamy, Dominique and Deouell, Leon Y.},
  year = {2010},
  month = jan,
  volume = {48},
  pages = {507--517},
  issn = {00283932},
  doi = {10.1016/j.neuropsychologia.2009.10.011},
  abstract = {Contextuision-making.},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Mudrik et al_2010_ERP evidence for context congruity effects during simultaneous object–scene.pdf},
  journal = {Neuropsychologia},
  language = {en},
  number = {2}
}

@article{nivPrimacyBehavioralResearch,
  title = {The Primacy of Behavioral Research for Understanding the Brain},
  author = {Niv, Yael},
  pages = {18},
  abstract = {Undeo erroneously place neural data on a pedestal and consider behavior to be subsidiary.},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Niv_The primacy of behavioral research for understanding the brain.pdf},
  language = {en}
}

@article{oizumiPhenomenologyMechanismsConsciousness2014,
  title = {From the {{Phenomenology}} to the {{Mechanisms}} of {{Consciousness}}: {{Integrated Information Theory}} 3.0},
  shorttitle = {From the {{Phenomenology}} to the {{Mechanisms}} of {{Consciousness}}},
  author = {Oizumi, Masafumi and Albantakis, Larissa and Tononi, Giulio},
  editor = {Sporns, Olaf},
  year = {2014},
  month = may,
  volume = {10},
  pages = {e1003588},
  issn = {1553-7358},
  doi = {10.1371/journal.pcbi.1003588},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Oizumi et al_2014_From the Phenomenology to the Mechanisms of Consciousness.pdf},
  journal = {PLoS Computational Biology},
  language = {en},
  number = {5}
}

@article{royDeepLearningbasedElectroencephalography2019,
  title = {Deep Learning-Based Electroencephalography Analysis: A Systematic Review},
  shorttitle = {Deep Learning-Based Electroencephalography Analysis},
  author = {Roy, Yannick and Banville, Hubert and Albuquerque, Isabela and Gramfort, Alexandre and Falk, Tiago H and Faubert, Jocelyn},
  year = {2019},
  month = aug,
  volume = {16},
  pages = {051001},
  issn = {1741-2552},
  doi = {10.1088/1741-2552/ab260c},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Roy et al_2019_Deep learning-based electroencephalography analysis.pdf},
  journal = {Journal of Neural Engineering},
  number = {5}
}

@article{salomon17_uncon_integ_multis_bodil_input,
  title = {Unconscious Integration of Multisensory Bodily Inputs in the Peripersonal Space Shapes Bodily Self-Consciousness},
  author = {Salomon, Roy and Noel, Jean-Paul and {\L}ukowska, Marta and Faivre, Nathan and Metzinger, Thomas and Serino, Andrea and Blanke, Olaf},
  year = {2017},
  volume = {166},
  pages = {174--183},
  doi = {10.1016/j.cognition.2017.05.028},
  date_added = {Sun May 24 13:11:00 2020},
  journal = {Cognition},
  number = {nil}
}

@article{schirrmeisterDeepLearningConvolutional2017,
  title = {Deep Learning with Convolutional Neural Networks for {{EEG}} Decoding and Visualization: {{Convolutional Neural Networks}} in {{EEG Analysis}}},
  shorttitle = {Deep Learning with Convolutional Neural Networks for {{EEG}} Decoding and Visualization},
  author = {Schirrmeister, Robin Tibor and Springenberg, Jost Tobias and Fiederer, Lukas Dominique Josef and Glasstetter, Martin and Eggensperger, Katharina and Tangermann, Michael and Hutter, Frank and Burgard, Wolfram and Ball, Tonio},
  year = {2017},
  month = nov,
  volume = {38},
  pages = {5391--5420},
  issn = {10659471},
  doi = {10.1002/hbm.23730},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Schirrmeister et al_2017_Deep learning with convolutional neural networks for EEG decoding and.pdf},
  journal = {Human Brain Mapping},
  language = {en},
  number = {11}
}

@article{shamay-tsoory19_herdin_brain,
  title = {Herding Brains: A Core Neural Mechanism for Social Alignment},
  author = {{Shamay-Tsoory}, Simone G. and Saporta, Nira and {Marton-Alper}, Inbar Z. and Gvirts, Hila Z.},
  year = {2019},
  volume = {23},
  pages = {174--186},
  doi = {10.1016/j.tics.2019.01.002},
  date_added = {Sun May 24 16:17:03 2020},
  journal = {Trends in Cognitive Sciences},
  number = {3}
}

@article{solms19_hard_probl_consc_free_energ_princ,
  title = {The Hard Problem of Consciousness and the Free Energy Principle},
  author = {Solms, Mark},
  year = {2019},
  volume = {9},
  pages = {nil},
  doi = {10.3389/fpsyg.2018.02714},
  date_added = {Mon May 11 13:23:13 2020},
  journal = {Frontiers in Psychology},
  number = {nil}
}

@article{Solms2018-SOLHAW,
  title = {How and Why Consciousness Arises: {{Some}} Considerations from Physics and Physiology},
  author = {Solms, M. and Friston, K.},
  year = {2018},
  volume = {25},
  pages = {202--238},
  journal = {Journal of Consciousness Studies},
  number = {5-6}
}

@article{tononiIntegratedInformationTheory2016,
  title = {Integrated Information Theory: From Consciousness to Its Physical Substrate},
  shorttitle = {Integrated Information Theory},
  author = {Tononi, Giulio and Boly, Melanie and Massimini, Marcello and Koch, Christof},
  year = {2016},
  month = jul,
  volume = {17},
  pages = {450--461},
  issn = {1471-003X, 1471-0048},
  doi = {10.1038/nrn.2016.44},
  abstract = {In this Opinion article, we discuss how integrated information theory accounts for several aspects of the relationship between consciousness and the brain. Integrated information theory starts from the essential properties of phenomenal experience, from which it derives the requirements for the physical substrate of consciousness. It argues that the physical substrate of consciousness must be a maximum of intrinsic cause\textendash effect power and provides a means to determine, in principle, the quality and quantity of experience. The theory leads to some counterintuitive predictions and can be used to develop new tools for assessing consciousness in non-communicative patients.},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Tononi et al_2016_Integrated information theory.pdf},
  journal = {Nature Reviews Neuroscience},
  language = {en},
  number = {7}
}

@article{trumanAreIncongruentObjects2018,
  title = {Are Incongruent Objects Harder to Identify? {{The}} Functional Significance of the {{N300}} Component},
  shorttitle = {Are Incongruent Objects Harder to Identify?},
  author = {Truman, Alyssa and Mudrik, Liad},
  year = {2018},
  month = aug,
  volume = {117},
  pages = {222--232},
  issn = {00283932},
  doi = {10.1016/j.neuropsychologia.2018.06.004},
  abstract = {ent ones.},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Truman_Mudrik_2018_Are incongruent objects harder to identify.pdf},
  journal = {Neuropsychologia},
  language = {en}
}

@article{turk19_funct_connec_fetal_brain,
  title = {Functional Connectome of the Fetal Brain},
  author = {Turk, Elise and {van den Heuvel}, Marion I. and Benders, Manon J. and {de Heus}, Roel and Franx, Arie and Manning, Janessa H. and Hect, Jasmine L. and {Hernandez-Andrade}, Edgar and Hassan, Sonia S. and Romero, Roberto and Kahn, Ren{\'e} S. and Thomason, Moriah E. and {van den Heuvel}, Martijn P.},
  year = {2019},
  volume = {39},
  pages = {9716--9724},
  doi = {10.1523/jneurosci.2891-18.2019},
  date_added = {Mon Jul 27 12:49:26 2020},
  journal = {The Journal of Neuroscience},
  number = {49}
}

@article{wheelock19_sex_differ_funct_connec_durinffer_funct_connec_durin,
  title = {Sex Differences in Functional Connectivity during Fetal Brain Development},
  author = {Wheelock, M.D. and Hect, J.L. and {Hernandez-Andrade}, E. and Hassan, S.S. and Romero, R. and Eggebrecht, A.T. and Thomason, M.E.},
  year = {2019},
  volume = {36},
  pages = {100632},
  doi = {10.1016/j.dcn.2019.100632},
  date_added = {Mon Jul 27 12:24:09 2020},
  journal = {Developmental Cognitive Neuroscience},
  number = {nil}
}

@article{yeshurun17_same_story_differ_story,
  title = {Same Story, Different Story},
  author = {Yeshurun, Yaara and Swanson, Stephen and Simony, Erez and Chen, Janice and Lazaridi, Christina and Honey, Christopher J. and Hasson, Uri},
  year = {2017},
  volume = {28},
  pages = {307--319},
  doi = {10.1177/0956797616682029},
  date_added = {Wed Jun 3 14:53:50 2020},
  journal = {Psychological Science},
  number = {3}
}

@article{zhao19_graph_theor_model_baby_brain_networ,
  title = {Graph Theoretical Modeling of Baby Brain Networks},
  author = {Zhao, Tengda and Xu, Yuehua and He, Yong},
  year = {2019},
  volume = {185},
  pages = {711--727},
  doi = {10.1016/j.neuroimage.2018.06.038},
  date_added = {Mon Jul 27 12:54:46 2020},
  journal = {NeuroImage},
  number = {nil}
}

@article{zuckerUnderstandingAssociativeVs2019,
  title = {Understanding Associative vs. Abstract Pictorial Relations: {{An ERP}} Study},
  shorttitle = {Understanding Associative vs. Abstract Pictorial Relations},
  author = {Zucker, Leemor and Mudrik, Liad},
  year = {2019},
  month = oct,
  volume = {133},
  pages = {107127},
  issn = {00283932},
  doi = {10.1016/j.neuropsychologia.2019.107127},
  abstract = {One of the most remarkable human abilities .},
  file = {C\:\\Users\\Jonathan\\Google Drive\\.notes\\.bibliography\\zotero_pdf\\Zucker_Mudrik_2019_Understanding associative vs.pdf},
  journal = {Neuropsychologia},
  language = {en}
}

@article{zvielli15_target_biased_emotion_atten_to,
  title = {Targeting Biased Emotional Attention to Threat as a Dynamic Process in Time},
  author = {Zvielli, Ariel and Amir, Iftach and Goldstein, Pavel and Bernstein, Amit},
  year = {2015},
  volume = {4},
  pages = {287--298},
  doi = {10.1177/2167702615588048},
  date_added = {Thu Jun 18 18:59:34 2020},
  journal = {Clinical Psychological Science},
  number = {2}
}
fleimgruber commented 3 years ago

@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) before M-x org-ref and provide the contents of the *Backtrace* buffer to see where the error comes from within org-ref?

JonatanSahar commented 3 years ago

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 notifications@github.com 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 https://github.com/jkitchin/org-ref/issues/787#issuecomment-753930445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEL3S3E3NJDK34UTMDADUUTSYGTE5ANCNFSM4QSYIVLA .

jonathan-sahar-tau commented 3 years ago

Value "~/google_drive/.notes/.bibliography/references.bib" ```

(which is the correct value)

jkitchin commented 3 years ago

It should be a list, as in ("~/google_drive/.notes/.bibliography/references.bib") and not a string. That is most likely the problem.

JonatanSahar commented 3 years ago

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 notifications@github.com 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 https://github.com/jkitchin/org-ref/issues/787#issuecomment-753972393, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEL3S3BVXPLCDG766M2UM33SYG6ORANCNFSM4QSYIVLA .